the INTEL package does not support pair_modify nofdotr
- no need to test for it - add a check and report an error if the nofdotr setting is used
This commit is contained in:
@ -292,6 +292,8 @@ void PairAIREBOIntel::compute(
|
|||||||
ev_init(eflag,vflag);
|
ev_init(eflag,vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
pvector[0] = pvector[1] = pvector[2] = 0.0;
|
pvector[0] = pvector[1] = pvector[2] = 0.0;
|
||||||
|
|
||||||
|
|||||||
@ -77,6 +77,8 @@ void PairBuckCoulCutIntel::compute(int eflag, int vflag,
|
|||||||
ev_init(eflag,vflag);
|
ev_init(eflag,vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
const int inum = list->inum;
|
const int inum = list->inum;
|
||||||
const int nthreads = comm->nthreads;
|
const int nthreads = comm->nthreads;
|
||||||
|
|||||||
@ -77,6 +77,8 @@ void PairBuckCoulLongIntel::compute(int eflag, int vflag,
|
|||||||
ev_init(eflag,vflag);
|
ev_init(eflag,vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
const int inum = list->inum;
|
const int inum = list->inum;
|
||||||
const int nthreads = comm->nthreads;
|
const int nthreads = comm->nthreads;
|
||||||
|
|||||||
@ -70,6 +70,8 @@ void PairBuckIntel::compute(int eflag, int vflag,
|
|||||||
ev_init(eflag,vflag);
|
ev_init(eflag,vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
const int inum = list->inum;
|
const int inum = list->inum;
|
||||||
const int nthreads = comm->nthreads;
|
const int nthreads = comm->nthreads;
|
||||||
|
|||||||
@ -89,6 +89,8 @@ void PairDPDIntel::compute(int eflag, int vflag,
|
|||||||
ev_init(eflag, vflag);
|
ev_init(eflag, vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
const int inum = list->inum;
|
const int inum = list->inum;
|
||||||
const int nthreads = comm->nthreads;
|
const int nthreads = comm->nthreads;
|
||||||
|
|||||||
@ -82,6 +82,8 @@ void PairEAMIntel::compute(int eflag, int vflag,
|
|||||||
ev_init(eflag, vflag);
|
ev_init(eflag, vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
const int inum = list->inum;
|
const int inum = list->inum;
|
||||||
const int nthreads = comm->nthreads;
|
const int nthreads = comm->nthreads;
|
||||||
|
|||||||
@ -76,6 +76,8 @@ void PairGayBerneIntel::compute(int eflag, int vflag,
|
|||||||
ev_init(eflag, vflag);
|
ev_init(eflag, vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
const int inum = list->inum;
|
const int inum = list->inum;
|
||||||
const int nall = atom->nlocal + atom->nghost;
|
const int nall = atom->nlocal + atom->nghost;
|
||||||
|
|||||||
@ -73,6 +73,8 @@ void PairLJCharmmCoulCharmmIntel::compute(int eflag, int vflag,
|
|||||||
ev_init(eflag,vflag);
|
ev_init(eflag,vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
const int inum = list->inum;
|
const int inum = list->inum;
|
||||||
const int nthreads = comm->nthreads;
|
const int nthreads = comm->nthreads;
|
||||||
|
|||||||
@ -77,6 +77,8 @@ void PairLJCharmmCoulLongIntel::compute(int eflag, int vflag,
|
|||||||
ev_init(eflag,vflag);
|
ev_init(eflag,vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
const int inum = list->inum;
|
const int inum = list->inum;
|
||||||
const int nthreads = comm->nthreads;
|
const int nthreads = comm->nthreads;
|
||||||
|
|||||||
@ -76,6 +76,8 @@ void PairLJCutCoulLongIntel::compute(int eflag, int vflag,
|
|||||||
ev_init(eflag,vflag);
|
ev_init(eflag,vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
const int inum = list->inum;
|
const int inum = list->inum;
|
||||||
const int nthreads = comm->nthreads;
|
const int nthreads = comm->nthreads;
|
||||||
|
|||||||
@ -68,6 +68,8 @@ void PairLJCutIntel::compute(int eflag, int vflag,
|
|||||||
ev_init(eflag, vflag);
|
ev_init(eflag, vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
const int inum = list->inum;
|
const int inum = list->inum;
|
||||||
const int nthreads = comm->nthreads;
|
const int nthreads = comm->nthreads;
|
||||||
|
|||||||
@ -97,6 +97,8 @@ void PairSWIntel::compute(int eflag, int vflag,
|
|||||||
ev_init(eflag, vflag);
|
ev_init(eflag, vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
const int inum = list->inum;
|
const int inum = list->inum;
|
||||||
const int nthreads = comm->nthreads;
|
const int nthreads = comm->nthreads;
|
||||||
|
|||||||
@ -91,6 +91,8 @@ void PairTersoffIntel::compute(int eflag, int vflag,
|
|||||||
ev_init(eflag,vflag);
|
ev_init(eflag,vflag);
|
||||||
if (vflag_atom)
|
if (vflag_atom)
|
||||||
error->all(FLERR,"INTEL package does not support per-atom stress");
|
error->all(FLERR,"INTEL package does not support per-atom stress");
|
||||||
|
if (vflag && !vflag_fdotr)
|
||||||
|
error->all(FLERR,"INTEL package does not support pair_modify nofdotr");
|
||||||
|
|
||||||
const int inum = list->inum;
|
const int inum = list->inum;
|
||||||
const int nthreads = comm->nthreads;
|
const int nthreads = comm->nthreads;
|
||||||
|
|||||||
@ -1093,42 +1093,6 @@ TEST(PairStyle, intel)
|
|||||||
EXPECT_FP_LE_WITH_EPS((pair->eng_vdwl + pair->eng_coul), energy, epsilon);
|
EXPECT_FP_LE_WITH_EPS((pair->eng_vdwl + pair->eng_coul), energy, epsilon);
|
||||||
if (print_stats) std::cerr << "run_energy stats:" << stats << std::endl;
|
if (print_stats) std::cerr << "run_energy stats:" << stats << std::endl;
|
||||||
|
|
||||||
// pair styles sw and tersoff and airebo INTEL package variants require newton on,
|
|
||||||
// but that also requires fdotr for /intel
|
|
||||||
if ((test_config.pair_style != "sw") && (test_config.pair_style != "tersoff") &&
|
|
||||||
(test_config.pair_style != "rebo") && (test_config.pair_style != "airebo") &&
|
|
||||||
(test_config.pair_style != "airebo/morse")) {
|
|
||||||
|
|
||||||
if (!verbose) ::testing::internal::CaptureStdout();
|
|
||||||
restart_lammps(lmp, test_config, true, true);
|
|
||||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
|
||||||
f = lmp->atom->f;
|
|
||||||
tag = lmp->atom->tag;
|
|
||||||
stats.reset();
|
|
||||||
ASSERT_EQ(nlocal + 1, f_ref.size());
|
|
||||||
for (int i = 0; i < nlocal; ++i) {
|
|
||||||
EXPECT_FP_LE_WITH_EPS(f[i][0], f_ref[tag[i]].x, 5 * epsilon);
|
|
||||||
EXPECT_FP_LE_WITH_EPS(f[i][1], f_ref[tag[i]].y, 5 * epsilon);
|
|
||||||
EXPECT_FP_LE_WITH_EPS(f[i][2], f_ref[tag[i]].z, 5 * epsilon);
|
|
||||||
}
|
|
||||||
if (print_stats) std::cerr << "nofdotr_forces stats:" << stats << std::endl;
|
|
||||||
|
|
||||||
pair = lmp->force->pair;
|
|
||||||
stress = pair->virial;
|
|
||||||
stats.reset();
|
|
||||||
EXPECT_FP_LE_WITH_EPS(stress[0], test_config.init_stress.xx, 10 * epsilon);
|
|
||||||
EXPECT_FP_LE_WITH_EPS(stress[1], test_config.init_stress.yy, 10 * epsilon);
|
|
||||||
EXPECT_FP_LE_WITH_EPS(stress[2], test_config.init_stress.zz, 10 * epsilon);
|
|
||||||
EXPECT_FP_LE_WITH_EPS(stress[3], test_config.init_stress.xy, 10 * epsilon);
|
|
||||||
EXPECT_FP_LE_WITH_EPS(stress[4], test_config.init_stress.xz, 10 * epsilon);
|
|
||||||
EXPECT_FP_LE_WITH_EPS(stress[5], test_config.init_stress.yz, 10 * epsilon);
|
|
||||||
if (print_stats) std::cerr << "nofdotr_stress stats:" << stats << std::endl;
|
|
||||||
|
|
||||||
stats.reset();
|
|
||||||
EXPECT_FP_LE_WITH_EPS(pair->eng_vdwl, test_config.init_vdwl, 5 * epsilon);
|
|
||||||
EXPECT_FP_LE_WITH_EPS(pair->eng_coul, test_config.init_coul, 5 * epsilon);
|
|
||||||
if (print_stats) std::cerr << "nofdotr_energy stats:" << stats << std::endl;
|
|
||||||
}
|
|
||||||
if (!verbose) ::testing::internal::CaptureStdout();
|
if (!verbose) ::testing::internal::CaptureStdout();
|
||||||
cleanup_lammps(lmp, test_config);
|
cleanup_lammps(lmp, test_config);
|
||||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||||
|
|||||||
Reference in New Issue
Block a user