Merge pull request #313 from stanmoore1/kokkos_bugfixes
Kokkos bugfixes
This commit is contained in:
@ -1593,7 +1593,7 @@ int AtomVecAngleKokkos::unpack_restart(double *buf)
|
||||
|
||||
double **extra = atom->extra;
|
||||
if (atom->nextra_store) {
|
||||
int size = static_cast<int> (ubuf(buf[m++]).i) - m;
|
||||
int size = static_cast<int> (buf[0]) - m;
|
||||
for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++];
|
||||
}
|
||||
|
||||
|
||||
@ -1232,7 +1232,7 @@ int AtomVecAtomicKokkos::unpack_restart(double *buf)
|
||||
|
||||
double **extra = atom->extra;
|
||||
if (atom->nextra_store) {
|
||||
int size = static_cast<int> (ubuf(buf[m++]).i) - m;
|
||||
int size = static_cast<int> (buf[0]) - m;
|
||||
for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++];
|
||||
}
|
||||
|
||||
|
||||
@ -1460,7 +1460,7 @@ int AtomVecBondKokkos::unpack_restart(double *buf)
|
||||
|
||||
double **extra = atom->extra;
|
||||
if (atom->nextra_store) {
|
||||
int size = static_cast<int> (ubuf(buf[m++]).i) - m;
|
||||
int size = static_cast<int> (buf[0]) - m;
|
||||
for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++];
|
||||
}
|
||||
|
||||
|
||||
@ -1314,7 +1314,7 @@ int AtomVecChargeKokkos::unpack_restart(double *buf)
|
||||
|
||||
double **extra = atom->extra;
|
||||
if (atom->nextra_store) {
|
||||
int size = static_cast<int> (ubuf(buf[m++]).i) - m;
|
||||
int size = static_cast<int> (buf[0]) - m;
|
||||
for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++];
|
||||
}
|
||||
|
||||
|
||||
@ -1936,7 +1936,7 @@ int AtomVecFullKokkos::unpack_restart(double *buf)
|
||||
|
||||
double **extra = atom->extra;
|
||||
if (atom->nextra_store) {
|
||||
int size = static_cast<int> (ubuf(buf[m++]).i) - m;
|
||||
int size = static_cast<int> (buf[0]) - m;
|
||||
for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++];
|
||||
}
|
||||
|
||||
|
||||
@ -1850,7 +1850,7 @@ int AtomVecMolecularKokkos::unpack_restart(double *buf)
|
||||
|
||||
double **extra = atom->extra;
|
||||
if (atom->nextra_store) {
|
||||
int size = static_cast<int> (ubuf(buf[m++]).i) - m;
|
||||
int size = static_cast<int> (buf[0]) - m;
|
||||
for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++];
|
||||
}
|
||||
|
||||
|
||||
@ -262,5 +262,5 @@ void CommTiledKokkos::forward_comm_array(int nsize, double **array)
|
||||
|
||||
int CommTiledKokkos::exchange_variable(int n, double *inbuf, double *&outbuf)
|
||||
{
|
||||
CommTiled::exchange_variable(n,inbuf,outbuf);
|
||||
}
|
||||
return CommTiled::exchange_variable(n,inbuf,outbuf);
|
||||
}
|
||||
|
||||
@ -45,14 +45,13 @@ namespace LAMMPS_NS {
|
||||
}
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
volatile s_CTEMP& operator+=(const volatile s_CTEMP &rhs) volatile {
|
||||
void operator+=(const volatile s_CTEMP &rhs) volatile {
|
||||
t0 += rhs.t0;
|
||||
t1 += rhs.t1;
|
||||
t2 += rhs.t2;
|
||||
t3 += rhs.t3;
|
||||
t4 += rhs.t4;
|
||||
t5 += rhs.t5;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
typedef s_CTEMP CTEMP;
|
||||
|
||||
@ -43,11 +43,10 @@ struct s_double_3 {
|
||||
}
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
volatile s_double_3& operator+=(const volatile s_double_3 &rhs) volatile {
|
||||
void operator+=(const volatile s_double_3 &rhs) volatile {
|
||||
d0 += rhs.d0;
|
||||
d1 += rhs.d1;
|
||||
d2 += rhs.d2;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
typedef s_double_3 double_3;
|
||||
|
||||
@ -75,7 +75,7 @@ class PairBuckCoulCutKokkos : public PairBuckCoulCut {
|
||||
Kokkos::DualView<params_buck_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_buck_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_buck_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -76,7 +76,7 @@ class PairBuckCoulLongKokkos : public PairBuckCoulLong {
|
||||
Kokkos::DualView<params_buck_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_buck_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_buck_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -68,7 +68,7 @@ class PairBuckKokkos : public PairBuck {
|
||||
|
||||
Kokkos::DualView<params_buck**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_buck**,Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
params_buck m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 15 atom types
|
||||
params_buck m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 12 atom types
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
typename ArrayTypes<DeviceType>::t_x_array_randomread x;
|
||||
typename ArrayTypes<DeviceType>::t_x_array c_x;
|
||||
|
||||
@ -81,7 +81,7 @@ class PairCoulCutKokkos : public PairCoulCut {
|
||||
Kokkos::DualView<params_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -79,7 +79,7 @@ class PairCoulDebyeKokkos : public PairCoulDebye {
|
||||
Kokkos::DualView<params_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -80,7 +80,7 @@ class PairCoulLongKokkos : public PairCoulLong {
|
||||
Kokkos::DualView<params_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -490,14 +490,11 @@ double PairLJCharmmCoulCharmmImplicitKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_cut_coulsq[j][i] = m_cut_coulsq[i][j] = cut_coulsqm;
|
||||
}
|
||||
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
k_cutsq.h_view(j,i) = k_cutsq.h_view(i,j);
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_cut_ljsq.h_view(i,j) = cut_ljsqm;
|
||||
k_cut_ljsq.h_view(j,i) = k_cut_ljsq.h_view(i,j);
|
||||
k_cut_ljsq.h_view(i,j) = k_cut_ljsq.h_view(j,i) = cut_ljsqm;
|
||||
k_cut_ljsq.template modify<LMPHostType>();
|
||||
k_cut_coulsq.h_view(i,j) = cut_coulsqm;
|
||||
k_cut_coulsq.h_view(j,i) = k_cut_coulsq.h_view(i,j);
|
||||
k_cut_coulsq.h_view(i,j) = k_cut_coulsq.h_view(j,i) = cut_coulsqm;
|
||||
k_cut_coulsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ class PairLJCharmmCoulCharmmImplicitKokkos : public PairLJCharmmCoulCharmmImplic
|
||||
Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_lj_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -491,14 +491,11 @@ double PairLJCharmmCoulCharmmKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_cut_coulsq[j][i] = m_cut_coulsq[i][j] = cut_coulsqm;
|
||||
}
|
||||
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
k_cutsq.h_view(j,i) = k_cutsq.h_view(i,j);
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_cut_ljsq.h_view(i,j) = cut_ljsqm;
|
||||
k_cut_ljsq.h_view(j,i) = k_cut_ljsq.h_view(i,j);
|
||||
k_cut_ljsq.h_view(i,j) = k_cut_ljsq.h_view(j,i) = cut_ljsqm;
|
||||
k_cut_ljsq.template modify<LMPHostType>();
|
||||
k_cut_coulsq.h_view(i,j) = cut_coulsqm;
|
||||
k_cut_coulsq.h_view(j,i) = k_cut_coulsq.h_view(i,j);
|
||||
k_cut_coulsq.h_view(i,j) = k_cut_coulsq.h_view(j,i) = cut_coulsqm;
|
||||
k_cut_coulsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ class PairLJCharmmCoulCharmmKokkos : public PairLJCharmmCoulCharmm {
|
||||
Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_lj_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -521,14 +521,11 @@ double PairLJCharmmCoulLongKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_cut_coulsq[j][i] = m_cut_coulsq[i][j] = cut_coulsqm;
|
||||
}
|
||||
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
k_cutsq.h_view(j,i) = k_cutsq.h_view(i,j);
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_cut_ljsq.h_view(i,j) = cut_ljsqm;
|
||||
k_cut_ljsq.h_view(j,i) = k_cut_ljsq.h_view(i,j);
|
||||
k_cut_ljsq.h_view(i,j) = k_cut_ljsq.h_view(j,i) = cut_ljsqm;
|
||||
k_cut_ljsq.template modify<LMPHostType>();
|
||||
k_cut_coulsq.h_view(i,j) = cut_coulsqm;
|
||||
k_cut_coulsq.h_view(j,i) = k_cut_coulsq.h_view(i,j);
|
||||
k_cut_coulsq.h_view(i,j) = k_cut_coulsq.h_view(j,i) = cut_coulsqm;
|
||||
k_cut_coulsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ class PairLJCharmmCoulLongKokkos : public PairLJCharmmCoulLong {
|
||||
Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_lj_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -326,11 +326,12 @@ double PairLJClass2CoulCutKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_cut_ljsq[j][i] = m_cut_ljsq[i][j] = cut_ljsqm;
|
||||
m_cut_coulsq[j][i] = m_cut_coulsq[i][j] = cut_coulsqm;
|
||||
}
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_cut_ljsq.h_view(i,j) = cut_ljsqm;
|
||||
k_cut_ljsq.h_view(i,j) = k_cut_ljsq.h_view(j,i) = cut_ljsqm;
|
||||
k_cut_ljsq.template modify<LMPHostType>();
|
||||
k_cut_coulsq.h_view(i,j) = cut_coulsqm;
|
||||
k_cut_coulsq.h_view(i,j) = k_cut_coulsq.h_view(j,i) = cut_coulsqm;
|
||||
k_cut_coulsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ class PairLJClass2CoulCutKokkos : public PairLJClass2CoulCut {
|
||||
Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_lj_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -480,11 +480,11 @@ double PairLJClass2CoulLongKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_cut_coulsq[j][i] = m_cut_coulsq[i][j] = cut_coulsqm;
|
||||
}
|
||||
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_cut_ljsq.h_view(i,j) = cut_ljsqm;
|
||||
k_cut_ljsq.h_view(i,j) = k_cut_ljsq.h_view(j,i) = cut_ljsqm;
|
||||
k_cut_ljsq.template modify<LMPHostType>();
|
||||
k_cut_coulsq.h_view(i,j) = cut_coulsqm;
|
||||
k_cut_coulsq.h_view(i,j) = k_cut_coulsq.h_view(j,i) = cut_coulsqm;
|
||||
k_cut_coulsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ class PairLJClass2CoulLongKokkos : public PairLJClass2CoulLong {
|
||||
Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_lj_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -258,7 +258,7 @@ double PairLJClass2Kokkos<DeviceType>::init_one(int i, int j)
|
||||
m_params[i][j] = m_params[j][i] = k_params.h_view(i,j);
|
||||
m_cutsq[j][i] = m_cutsq[i][j] = cutone*cutone;
|
||||
}
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ class PairLJClass2Kokkos : public PairLJClass2 {
|
||||
|
||||
Kokkos::DualView<params_lj**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj**,Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 15 atom types
|
||||
params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 12 atom types
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
typename ArrayTypes<DeviceType>::t_x_array_randomread x;
|
||||
typename ArrayTypes<DeviceType>::t_x_array c_x;
|
||||
|
||||
@ -317,11 +317,12 @@ double PairLJCutCoulCutKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_cut_ljsq[j][i] = m_cut_ljsq[i][j] = cut_ljsqm;
|
||||
m_cut_coulsq[j][i] = m_cut_coulsq[i][j] = cut_coulsqm;
|
||||
}
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_cut_ljsq.h_view(i,j) = cut_ljsqm;
|
||||
k_cut_ljsq.h_view(i,j) = k_cut_ljsq.h_view(j,i) = cut_ljsqm;
|
||||
k_cut_ljsq.template modify<LMPHostType>();
|
||||
k_cut_coulsq.h_view(i,j) = cut_coulsqm;
|
||||
k_cut_coulsq.h_view(i,j) = k_cut_coulsq.h_view(j,i) = cut_coulsqm;
|
||||
k_cut_coulsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ class PairLJCutCoulCutKokkos : public PairLJCutCoulCut {
|
||||
Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_lj_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -347,11 +347,12 @@ double PairLJCutCoulDebyeKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_cut_ljsq[j][i] = m_cut_ljsq[i][j] = cut_ljsqm;
|
||||
m_cut_coulsq[j][i] = m_cut_coulsq[i][j] = cut_coulsqm;
|
||||
}
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_cut_ljsq.h_view(i,j) = cut_ljsqm;
|
||||
k_cut_ljsq.h_view(i,j) = k_cut_ljsq.h_view(j,i) = cut_ljsqm;
|
||||
k_cut_ljsq.template modify<LMPHostType>();
|
||||
k_cut_coulsq.h_view(i,j) = cut_coulsqm;
|
||||
k_cut_coulsq.h_view(i,j) = k_cut_coulsq.h_view(j,i) = cut_coulsqm;
|
||||
k_cut_coulsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ class PairLJCutCoulDebyeKokkos : public PairLJCutCoulDebye {
|
||||
Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_lj_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -338,11 +338,12 @@ double PairLJCutCoulDSFKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_cut_ljsq[j][i] = m_cut_ljsq[i][j] = cut_ljsqm;
|
||||
m_cut_coulsq[j][i] = m_cut_coulsq[i][j] = cut_coulsqm;
|
||||
}
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_cut_ljsq.h_view(i,j) = cut_ljsqm;
|
||||
k_cut_ljsq.h_view(i,j) = k_cut_ljsq.h_view(j,i) = cut_ljsqm;
|
||||
k_cut_ljsq.template modify<LMPHostType>();
|
||||
k_cut_coulsq.h_view(i,j) = cut_coulsqm;
|
||||
k_cut_coulsq.h_view(i,j) = k_cut_coulsq.h_view(j,i) = cut_coulsqm;
|
||||
k_cut_coulsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ class PairLJCutCoulDSFKokkos : public PairLJCutCoulDSF {
|
||||
Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_lj_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -499,11 +499,11 @@ double PairLJCutCoulLongKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_cut_coulsq[j][i] = m_cut_coulsq[i][j] = cut_coulsqm;
|
||||
}
|
||||
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_cut_ljsq.h_view(i,j) = cut_ljsqm;
|
||||
k_cut_ljsq.h_view(i,j) = k_cut_ljsq.h_view(j,i) = cut_ljsqm;
|
||||
k_cut_ljsq.template modify<LMPHostType>();
|
||||
k_cut_coulsq.h_view(i,j) = cut_coulsqm;
|
||||
k_cut_coulsq.h_view(i,j) = k_cut_coulsq.h_view(j,i) = cut_coulsqm;
|
||||
k_cut_coulsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ class PairLJCutCoulLongKokkos : public PairLJCutCoulLong {
|
||||
Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_lj_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -276,7 +276,8 @@ double PairLJCutKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_params[i][j] = m_params[j][i] = k_params.h_view(i,j);
|
||||
m_cutsq[j][i] = m_cutsq[i][j] = cutone*cutone;
|
||||
}
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ class PairLJCutKokkos : public PairLJCut {
|
||||
|
||||
Kokkos::DualView<params_lj**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj**,Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 15 atom types
|
||||
params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 12 atom types
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
typename ArrayTypes<DeviceType>::t_x_array_randomread x;
|
||||
typename ArrayTypes<DeviceType>::t_x_array c_x;
|
||||
|
||||
@ -262,7 +262,8 @@ double PairLJExpandKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_params[i][j] = m_params[j][i] = k_params.h_view(i,j);
|
||||
m_cutsq[j][i] = m_cutsq[i][j] = cutone*cutone;
|
||||
}
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ class PairLJExpandKokkos : public PairLJExpand {
|
||||
|
||||
Kokkos::DualView<params_lj**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj**,Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 15 atom types
|
||||
params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 12 atom types
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
typename ArrayTypes<DeviceType>::t_x_array_randomread x;
|
||||
typename ArrayTypes<DeviceType>::t_x_array c_x;
|
||||
|
||||
@ -478,11 +478,11 @@ double PairLJGromacsCoulGromacsKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_cut_coulsq[j][i] = m_cut_coulsq[i][j] = cut_coulsqm;
|
||||
}
|
||||
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_cut_ljsq.h_view(i,j) = cut_ljsqm;
|
||||
k_cut_ljsq.h_view(i,j) = k_cut_ljsq.h_view(j,i) = cut_ljsqm;
|
||||
k_cut_ljsq.template modify<LMPHostType>();
|
||||
k_cut_coulsq.h_view(i,j) = cut_coulsqm;
|
||||
k_cut_coulsq.h_view(i,j) = k_cut_coulsq.h_view(j,i) = cut_coulsqm;
|
||||
k_cut_coulsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ class PairLJGromacsCoulGromacsKokkos : public PairLJGromacsCoulGromacs {
|
||||
Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj_coul**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_lj_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -314,9 +314,9 @@ double PairLJGromacsKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_cut_inner_sq[j][i] = m_cut_inner_sq[i][j] = cut_inner_sqm;
|
||||
}
|
||||
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_cut_inner_sq.h_view(i,j) = cut_inner_sqm;
|
||||
k_cut_inner_sq.h_view(i,j) = k_cut_inner_sq.h_view(j,i) = cut_inner_sqm;
|
||||
k_cut_inner_sq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ class PairLJGromacsKokkos : public PairLJGromacs {
|
||||
Kokkos::DualView<params_lj**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj**,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
@ -290,7 +290,8 @@ double PairLJSDKKokkos<DeviceType>::init_one(int i, int j)
|
||||
m_params[i][j] = m_params[j][i] = k_params.h_view(i,j);
|
||||
m_cutsq[j][i] = m_cutsq[i][j] = cutone*cutone;
|
||||
}
|
||||
k_cutsq.h_view(i,j) = cutone*cutone;
|
||||
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ class PairLJSDKKokkos : public PairLJSDK {
|
||||
|
||||
Kokkos::DualView<params_lj**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_lj**,Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 15 atom types
|
||||
params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 12 atom types
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
typename ArrayTypes<DeviceType>::t_x_array_randomread x;
|
||||
typename ArrayTypes<DeviceType>::t_x_array c_x;
|
||||
|
||||
@ -31,7 +31,7 @@ namespace LAMMPS_NS {
|
||||
|
||||
template<class Device,int TABSTYLE>
|
||||
struct S_TableCompute {
|
||||
enum {TabStyle = TABSTYLE};
|
||||
static constexpr int TabStyle = TABSTYLE;
|
||||
};
|
||||
|
||||
template <class DeviceType, int NEIGHFLAG, int TABSTYLE>
|
||||
|
||||
@ -99,6 +99,9 @@ void PairTersoffKokkos<DeviceType>::init_style()
|
||||
neighbor->requests[irequest]->
|
||||
kokkos_device = Kokkos::Impl::is_same<DeviceType,LMPDeviceType>::value;
|
||||
|
||||
if (neighflag == FULL)
|
||||
error->all(FLERR,"Cannot (yet) use full neighbor list style with tersoff/kk");
|
||||
|
||||
if (neighflag == FULL || neighflag == HALF || neighflag == HALFTHREAD) {
|
||||
//if (neighflag == FULL || neighflag == HALFTHREAD) {
|
||||
neighbor->requests[irequest]->full = 1;
|
||||
|
||||
@ -186,7 +186,7 @@ class PairTersoffKokkos : public PairTersoff {
|
||||
Kokkos::DualView<params_ters***,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_ters***,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um paramskk;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
//params_ters m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
int inum;
|
||||
@ -225,6 +225,10 @@ class PairTersoffKokkos : public PairTersoff {
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
E: Cannot (yet) use full neighbor list style with tersoff/kk
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
E: Cannot use chosen neighbor list style with tersoff/kk
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
@ -99,6 +99,9 @@ void PairTersoffMODKokkos<DeviceType>::init_style()
|
||||
neighbor->requests[irequest]->
|
||||
kokkos_device = Kokkos::Impl::is_same<DeviceType,LMPDeviceType>::value;
|
||||
|
||||
if (neighflag == FULL)
|
||||
error->all(FLERR,"Cannot (yet) use full neighbor list style with tersoff/mod/kk");
|
||||
|
||||
if (neighflag == FULL || neighflag == HALF || neighflag == HALFTHREAD) {
|
||||
neighbor->requests[irequest]->full = 1;
|
||||
neighbor->requests[irequest]->half = 0;
|
||||
@ -107,7 +110,7 @@ void PairTersoffMODKokkos<DeviceType>::init_style()
|
||||
else
|
||||
neighbor->requests[irequest]->ghost = 0;
|
||||
} else {
|
||||
error->all(FLERR,"Cannot use chosen neighbor list style with tersoff/kk");
|
||||
error->all(FLERR,"Cannot use chosen neighbor list style with tersoff/mod/kk");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -186,7 +186,7 @@ class PairTersoffMODKokkos : public PairTersoffMOD {
|
||||
Kokkos::DualView<params_ters***,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_ters***,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um paramskk;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
//params_ters m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
int inum;
|
||||
@ -225,7 +225,11 @@ class PairTersoffMODKokkos : public PairTersoffMOD {
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
E: Cannot use chosen neighbor list style with tersoff/kk
|
||||
E: Cannot (yet) use full neighbor list style with tersoff/mod/kk
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
E: Cannot use chosen neighbor list style with tersoff/mod/kk
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
|
||||
@ -110,6 +110,9 @@ void PairTersoffZBLKokkos<DeviceType>::init_style()
|
||||
neighbor->requests[irequest]->
|
||||
kokkos_device = Kokkos::Impl::is_same<DeviceType,LMPDeviceType>::value;
|
||||
|
||||
if (neighflag == FULL)
|
||||
error->all(FLERR,"Cannot (yet) use full neighbor list style with tersoff/zbl/kk");
|
||||
|
||||
if (neighflag == FULL || neighflag == HALF || neighflag == HALFTHREAD) {
|
||||
neighbor->requests[irequest]->full = 1;
|
||||
neighbor->requests[irequest]->half = 0;
|
||||
|
||||
@ -191,7 +191,7 @@ class PairTersoffZBLKokkos : public PairTersoffZBL {
|
||||
Kokkos::DualView<params_ters***,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_ters***,
|
||||
Kokkos::LayoutRight,DeviceType>::t_dev_const_um paramskk;
|
||||
// hardwired to space for 15 atom types
|
||||
// hardwired to space for 12 atom types
|
||||
//params_ters m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
|
||||
int inum;
|
||||
@ -239,6 +239,10 @@ E: Pair tersoff/zbl/kk requires metal or real units
|
||||
|
||||
This is a current restriction of this pair potential.
|
||||
|
||||
E: Cannot (yet) use full neighbor list style with tersoff/zbl/kk
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
E: Cannot use chosen neighbor list style with tersoff/zbl/kk
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
@ -46,7 +46,7 @@ RegBlockKokkos<DeviceType>::~RegBlockKokkos()
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
int RegBlockKokkos<DeviceType>::inside(double x, double y, double z) const
|
||||
int RegBlockKokkos<DeviceType>::k_inside(double x, double y, double z) const
|
||||
{
|
||||
if (x >= xlo && x <= xhi && y >= ylo && y <= yhi && z >= zlo && z <= zhi)
|
||||
return 1;
|
||||
@ -85,7 +85,7 @@ void RegBlockKokkos<DeviceType>::operator()(TagRegBlockMatchAll, const int &i) c
|
||||
/* ----------------------------------------------------------------------
|
||||
determine if point x,y,z is a match to region volume
|
||||
XOR computes 0 if 2 args are the same, 1 if different
|
||||
note that inside() returns 1 for points on surface of region
|
||||
note that k_inside() returns 1 for points on surface of region
|
||||
thus point on surface of exterior region will not match
|
||||
if region has variable shape, invoke shape_update() once per timestep
|
||||
if region is dynamic, apply inverse transform to x,y,z
|
||||
@ -99,7 +99,7 @@ KOKKOS_INLINE_FUNCTION
|
||||
int RegBlockKokkos<DeviceType>::match(double x, double y, double z) const
|
||||
{
|
||||
if (dynamic) inverse_transform(x,y,z);
|
||||
return !(inside(x,y,z) ^ interior);
|
||||
return !(k_inside(x,y,z) ^ interior);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -52,7 +52,7 @@ class RegBlockKokkos : public RegBlock {
|
||||
typename AT::t_int_1d_randomread mask;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
int inside(double, double, double) const;
|
||||
int k_inside(double, double, double) const;
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
int match(double, double, double) const;
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
|
||||
Reference in New Issue
Block a user