Removed the newton checks in the gpu pair styles; reverted to mixed precision in Makefile.cuda

This commit is contained in:
Trung Nguyen
2021-11-13 07:00:12 -06:00
parent 906e78c198
commit 766f975b74
59 changed files with 1 additions and 235 deletions

View File

@ -138,10 +138,6 @@ void PairBeckGPU::compute(int eflag, int vflag)
void PairBeckGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style beck/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -157,10 +157,6 @@ void PairBornCoulLongCSGPU::init_style()
{
if (!atom->q_flag)
error->all(FLERR, "Pair style born/coul/long/cs/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR, "Pair style born/coul/long/cs/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -152,10 +152,6 @@ void PairBornCoulLongGPU::init_style()
{
if (!atom->q_flag)
error->all(FLERR, "Pair style born/coul/long/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR, "Pair style born/coul/long/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -147,10 +147,6 @@ void PairBornCoulWolfCSGPU::init_style()
{
if (!atom->q_flag)
error->all(FLERR, "Pair style born/coul/wolf/cs/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR, "Pair style born/coul/wolf/cs/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -145,10 +145,6 @@ void PairBornCoulWolfGPU::init_style()
{
if (!atom->q_flag)
error->all(FLERR, "Pair style born/coul/wolf/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR, "Pair style born/coul/wolf/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -134,10 +134,6 @@ void PairBornGPU::compute(int eflag, int vflag)
void PairBornGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style born/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -139,10 +139,6 @@ void PairBuckCoulCutGPU::init_style()
{
if (!atom->q_flag)
error->all(FLERR, "Pair style buck/coul/cut/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR, "Pair style buck/coul/cut/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -148,10 +148,6 @@ void PairBuckCoulLongGPU::init_style()
{
if (!atom->q_flag)
error->all(FLERR, "Pair style buck/coul/long/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR, "Pair style buck/coul/long/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -132,10 +132,6 @@ void PairBuckGPU::compute(int eflag, int vflag)
void PairBuckGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style buck/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -133,10 +133,6 @@ void PairColloidGPU::compute(int eflag, int vflag)
void PairColloidGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style colloid/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -137,10 +137,6 @@ void PairCoulCutGPU::init_style()
if (!atom->q_flag)
error->all(FLERR,"Pair style coul/cut/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style coul/cut/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -138,10 +138,6 @@ void PairCoulDebyeGPU::init_style()
if (!atom->q_flag)
error->all(FLERR,"Pair style coul/debye/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style coul/debye/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -149,10 +149,6 @@ void PairCoulDSFGPU::init_style()
if (!atom->q_flag)
error->all(FLERR,"Pair style coul/dsf/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style coul/dsf/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -152,10 +152,6 @@ void PairCoulLongCSGPU::init_style()
if (!atom->q_flag)
error->all(FLERR,"Pair style coul/long/cs/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style coul/long/cs/gpu requires newton pair off");
*/
// Call init_one calculation make sure scale is correct
for (int i = 1; i <= atom->ntypes; i++) {

View File

@ -147,10 +147,6 @@ void PairCoulLongGPU::init_style()
if (!atom->q_flag)
error->all(FLERR,"Pair style coul/long/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style coul/long/gpu requires newton pair off");
*/
// Call init_one calculation make sure scale is correct
for (int i = 1; i <= atom->ntypes; i++) {

View File

@ -279,10 +279,6 @@ void PairDPDGPU::compute(int eflag, int vflag)
void PairDPDGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style dpd/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -298,10 +298,6 @@ void PairDPDTstatGPU::compute(int eflag, int vflag)
void PairDPDTstatGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style dpd/tstat/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -156,10 +156,6 @@ void PairEAMAlloyGPU::compute(int eflag, int vflag)
void PairEAMAlloyGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style eam/alloy/gpu requires newton pair off");
*/
// convert read-in file(s) to arrays and spline them

View File

@ -155,10 +155,6 @@ void PairEAMFSGPU::compute(int eflag, int vflag)
void PairEAMFSGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style eam/fs/gpu requires newton pair off");
*/
// convert read-in file(s) to arrays and spline them

View File

@ -1,4 +1,3 @@
// clang-format off
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
@ -155,11 +154,6 @@ void PairEAMGPU::compute(int eflag, int vflag)
void PairEAMGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style eam/gpu requires newton pair off");
*/
// convert read-in file(s) to arrays and spline them
file2array();

View File

@ -130,10 +130,6 @@ void PairGaussGPU::compute(int eflag, int vflag)
void PairGaussGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style gauss/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -160,10 +160,6 @@ void PairGayBerneGPU::init_style()
avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
if (!avec)
error->all(FLERR,"Pair gayberne/gpu requires atom style ellipsoid");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style gayberne/gpu requires newton pair off");
*/
if (!atom->ellipsoid_flag)
error->all(FLERR,"Pair gayberne/gpu requires atom style ellipsoid");

View File

@ -131,10 +131,6 @@ void PairLJ96CutGPU::init_style()
{
cut_respa = nullptr;
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj96/cut/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -129,10 +129,6 @@ void PairLJCharmmCoulCharmmGPU::init_style()
{
if (!atom->q_flag)
error->all(FLERR, "Pair style lj/charmm/coul/long/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR, "Pair style lj/charmm/coul/long/gpu requires newton pair off");
*/
// Repeated cutsq calculation in init_one() is required for GPU package

View File

@ -152,10 +152,6 @@ void PairLJCharmmCoulLongGPU::init_style()
if (!atom->q_flag)
error->all(FLERR,"Pair style lj/charmm/coul/long/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/charmm/coul/long/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style

View File

@ -147,10 +147,6 @@ void PairLJClass2CoulLongGPU::init_style()
{
if (!atom->q_flag)
error->all(FLERR,"Pair style lj/class2/coul/long/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/class2/coul/long/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -129,10 +129,6 @@ void PairLJClass2GPU::compute(int eflag, int vflag)
void PairLJClass2GPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/class2/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -135,10 +135,6 @@ void PairLJCubicGPU::compute(int eflag, int vflag)
void PairLJCubicGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/cubic/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -139,10 +139,6 @@ void PairLJCutCoulCutGPU::init_style()
if (!atom->q_flag)
error->all(FLERR,"Pair style lj/cut/coul/cut/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/cut/coul/cut/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -141,10 +141,6 @@ void PairLJCutCoulDebyeGPU::init_style()
if (!atom->q_flag)
error->all(FLERR,"Pair style lj/cut/coul/debye/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/cut/coul/debye/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -151,10 +151,6 @@ void PairLJCutCoulDSFGPU::init_style()
if (!atom->q_flag)
error->all(FLERR,"Pair style lj/cut/coul/dsf/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/cut/coul/dsf/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -152,10 +152,6 @@ void PairLJCutCoulLongGPU::init_style()
if (!atom->q_flag)
error->all(FLERR,"Pair style lj/cut/coul/long/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/cut/coul/long/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -144,10 +144,6 @@ void PairLJCutCoulMSMGPU::init_style()
if (!atom->q_flag)
error->all(FLERR,"Pair style lj/cut/coul/cut/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/cut/coul/msm/gpu requires newton pair off");
*/
if (force->kspace->scalar_pressure_flag)
error->all(FLERR,"Must use 'kspace_modify pressure/scalar no' with GPU MSM Pair styles");

View File

@ -143,10 +143,6 @@ void PairLJCutDipoleCutGPU::init_style()
if (!atom->q_flag || !atom->mu_flag || !atom->torque_flag)
error->all(FLERR,"Pair dipole/cut/gpu requires atom attributes q, mu, torque");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style dipole/cut/gpu requires newton pair off");
*/
if (strcmp(update->unit_style,"electron") == 0)
error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles");

View File

@ -155,10 +155,6 @@ void PairLJCutDipoleLongGPU::init_style()
if (!atom->q_flag || !atom->mu_flag || !atom->torque_flag)
error->all(FLERR,"Pair dipole/cut/gpu requires atom attributes q, mu, torque");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style dipole/cut/gpu requires newton pair off");
*/
if (strcmp(update->unit_style,"electron") == 0)
error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles");

View File

@ -135,10 +135,6 @@ void PairLJCutGPU::init_style()
{
cut_respa = nullptr;
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/cut/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -168,10 +168,6 @@ void PairLJCutTIP4PLongGPU::init_style()
error->all(FLERR,"Pair style lj/cut/tip4p/long/gpu requires atom IDs");
if (!atom->q_flag)
error->all(FLERR, "Pair style lj/cut/tip4p/long/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/cut/tip4p/long/gpu requires newton pair off");
*/
if (force->bond == nullptr)
error->all(FLERR,"Must use a bond style with TIP4P potential");
if (force->angle == nullptr)

View File

@ -152,10 +152,6 @@ void PairLJExpandCoulLongGPU::init_style()
if (!atom->q_flag)
error->all(FLERR,"Pair style lj/cut/coul/long/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/cut/coul/long/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -132,10 +132,6 @@ void PairLJExpandGPU::compute(int eflag, int vflag)
void PairLJExpandGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/expand/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -134,10 +134,6 @@ void PairLJGromacsGPU::compute(int eflag, int vflag)
void PairLJGromacsGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/gromacs/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -156,10 +156,6 @@ void PairLJSDKCoulLongGPU::init_style()
{
if (!atom->q_flag)
error->all(FLERR,"Pair style lj/sdk/coul/long/gpu requires atom attribute q");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/sdk/coul/long/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -137,10 +137,6 @@ void PairLJSDKGPU::compute(int eflag, int vflag)
void PairLJSDKGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style lj/sdk/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -142,10 +142,6 @@ void PairLJSFDipoleSFGPU::init_style()
if (!atom->q_flag || !atom->mu_flag || !atom->torque_flag)
error->all(FLERR,"Pair dipole/sf/gpu requires atom attributes q, mu, torque");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style dipole/sf/gpu requires newton pair off");
*/
if (strcmp(update->unit_style,"electron") == 0)
error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles");

View File

@ -136,10 +136,6 @@ void PairLJSmoothGPU::compute(int eflag, int vflag)
void PairLJSmoothGPU::init_style()
{
//cut_respa = nullptr;
/*
if (force->newton_pair) error->all(FLERR, "Pair style lj/smooth/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -132,10 +132,6 @@ void PairMIECutGPU::init_style()
{
cut_respa = nullptr;
/*
if (force->newton_pair)
error->all(FLERR,"Pair style mie/cut/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -128,10 +128,6 @@ void PairMorseGPU::compute(int eflag, int vflag)
void PairMorseGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style morse/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -159,10 +159,6 @@ void PairRESquaredGPU::compute(int eflag, int vflag)
void PairRESquaredGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style resquared/gpu requires newton pair off");
*/
if (!atom->ellipsoid_flag)
error->all(FLERR,"Pair resquared/gpu requires atom style ellipsoid");

View File

@ -133,10 +133,6 @@ void PairSoftGPU::compute(int eflag, int vflag)
void PairSoftGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style soft/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -148,10 +148,6 @@ void PairSWGPU::init_style()
if (atom->tag_enable == 0)
error->all(FLERR,"Pair style sw/gpu requires atom IDs");
/*
if (force->newton_pair != 0)
error->all(FLERR,"Pair style sw/gpu requires newton pair off");
*/
double **c1, **c2, **c3, **c4, **c5, **c6;
double **ncutsq, **ncut, **sigma, **powerp, **powerq, **sigma_gamma;

View File

@ -132,10 +132,6 @@ void PairTableGPU::compute(int eflag, int vflag)
void PairTableGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style table/gpu requires newton pair off");
*/
int ntypes = atom->ntypes;

View File

@ -154,10 +154,6 @@ void PairTersoffGPU::init_style()
if (atom->tag_enable == 0)
error->all(FLERR,"Pair style tersoff/gpu requires atom IDs");
/*
if (force->newton_pair != 0)
error->all(FLERR,"Pair style tersoff/gpu requires newton pair off");
*/
double *lam1, *lam2, *lam3, *powermint;
double *biga, *bigb, *bigr, *bigd;

View File

@ -148,10 +148,6 @@ void PairTersoffMODGPU::init_style()
if (atom->tag_enable == 0)
error->all(FLERR,"Pair style tersoff/mod/gpu requires atom IDs");
/*
if (force->newton_pair != 0)
error->all(FLERR,"Pair style tersoff/mod/gpu requires newton pair off");
*/
double *lam1, *lam2, *lam3, *powermint;
double *biga, *bigb, *bigr, *bigd;

View File

@ -155,10 +155,6 @@ void PairTersoffZBLGPU::init_style()
if (atom->tag_enable == 0)
error->all(FLERR,"Pair style tersoff/zbl/gpu requires atom IDs");
/*
if (force->newton_pair != 0)
error->all(FLERR,"Pair style tersoff/zbl/gpu requires newton pair off");
*/
double *lam1, *lam2, *lam3, *powermint;
double *biga, *bigb, *bigr, *bigd;

View File

@ -136,10 +136,6 @@ void PairUFMGPU::init_style()
{
// cut_respa = nullptr;
/*
if (force->newton_pair)
error->all(FLERR,"Pair style ufm/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -156,10 +156,6 @@ void PairVashishtaGPU::init_style()
if (atom->tag_enable == 0)
error->all(FLERR,"Pair style vashishta/gpu requires atom IDs");
/*
if (force->newton_pair != 0)
error->all(FLERR,"Pair style vashishta/gpu requires newton pair off");
*/
double *cutsq, *r0, *gamma, *eta;
double *lam1inv, *lam4inv, *zizj, *mbigd;

View File

@ -141,10 +141,6 @@ void PairYukawaColloidGPU::init_style()
if (!atom->sphere_flag)
error->all(FLERR,"Pair yukawa/colloid/gpu requires atom style sphere");
/*
if (force->newton_pair)
error->all(FLERR,"Pair style yukawa/colloid/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -130,10 +130,6 @@ void PairYukawaGPU::compute(int eflag, int vflag)
void PairYukawaGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style yukawa/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -132,10 +132,6 @@ void PairZBLGPU::compute(int eflag, int vflag)
void PairZBLGPU::init_style()
{
/*
if (force->newton_pair)
error->all(FLERR,"Pair style zbl/gpu requires newton pair off");
*/
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;