From 9a09378136930f8ca6cb7df7409f761b3be739a9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 27 Apr 2021 09:53:20 -0400 Subject: [PATCH] can only use and test fdotr with USER-INTEL when newton pair is off --- unittest/force-styles/test_pair_style.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unittest/force-styles/test_pair_style.cpp b/unittest/force-styles/test_pair_style.cpp index fb38de54ad..ca03c34fc9 100644 --- a/unittest/force-styles/test_pair_style.cpp +++ b/unittest/force-styles/test_pair_style.cpp @@ -158,7 +158,7 @@ void run_lammps(LAMMPS *lmp) command("run 4 post no"); } -void restart_lammps(LAMMPS *lmp, const TestConfig &cfg, bool nofdotr = false) +void restart_lammps(LAMMPS *lmp, const TestConfig &cfg, bool nofdotr = false, bool newton = true) { // utility lambda to improve readability auto command = [&](const std::string &line) { @@ -166,6 +166,8 @@ void restart_lammps(LAMMPS *lmp, const TestConfig &cfg, bool nofdotr = false) }; command("clear"); + if (newton) command("newton on"); + else command("newton off"); command("read_restart " + cfg.basename + ".restart"); if (!lmp->force->pair) { @@ -1085,7 +1087,7 @@ TEST(PairStyle, intel) if (print_stats) std::cerr << "run_energy stats:" << stats << std::endl; if (!verbose) ::testing::internal::CaptureStdout(); - restart_lammps(lmp, test_config, true); + restart_lammps(lmp, test_config, true, false); if (!verbose) ::testing::internal::GetCapturedStdout(); f = lmp->atom->f;