diff --git a/src/USER-INTEL/pair_airebo_intel.cpp b/src/USER-INTEL/pair_airebo_intel.cpp index f8f094ec9f..dfd1e58dc4 100644 --- a/src/USER-INTEL/pair_airebo_intel.cpp +++ b/src/USER-INTEL/pair_airebo_intel.cpp @@ -179,12 +179,10 @@ PairAIREBOIntel::~PairAIREBOIntel() void PairAIREBOIntel::init_style() { PairAIREBO::init_style(); - neighbor->requests[neighbor->nrequest-1]->intel = 1; + neighbor->find_request(this)->intel = 1; - const int nrequest = neighbor->nrequest; - for (int i = 0; i < nrequest; ++i) - if (neighbor->requests[i]->skip) - error->all(FLERR, "Cannot yet use airebo/intel with hybrid."); + if (utils::strmatch(force->pair_style,"^hybrid")) + error->all(FLERR, "Cannot yet use airebo/intel with hybrid."); int ifix = modify->find_fix("package_intel"); if (ifix < 0) diff --git a/src/USER-INTEL/pair_buck_coul_cut_intel.cpp b/src/USER-INTEL/pair_buck_coul_cut_intel.cpp index 010237dcdf..f4c6ced010 100644 --- a/src/USER-INTEL/pair_buck_coul_cut_intel.cpp +++ b/src/USER-INTEL/pair_buck_coul_cut_intel.cpp @@ -15,25 +15,25 @@ Contributing author: Rodrigo Canales (RWTH Aachen University) ------------------------------------------------------------------------- */ -#include -#include - -#include #include "pair_buck_coul_cut_intel.h" + #include "atom.h" #include "comm.h" +#include "error.h" +#include "force.h" #include "force.h" #include "group.h" #include "kspace.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "math_const.h" #include "memory.h" -#include "error.h" -#include "suffix.h" -#include "force.h" #include "modify.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "neighbor.h" +#include "suffix.h" + +#include +#include using namespace LAMMPS_NS; using namespace MathConst; @@ -402,11 +402,12 @@ void PairBuckCoulCutIntel::eval(const int offload, const int vflag, void PairBuckCoulCutIntel::init_style() { PairBuckCoulCut::init_style(); + auto request = neighbor->find_request(this); if (force->newton_pair == 0) { - neighbor->requests[neighbor->nrequest-1]->half = 0; - neighbor->requests[neighbor->nrequest-1]->full = 1; + request->half = 0; + request->full = 1; } - neighbor->requests[neighbor->nrequest-1]->intel = 1; + request->intel = 1; int ifix = modify->find_fix("package_intel"); if (ifix < 0) diff --git a/src/USER-INTEL/pair_buck_coul_long_intel.cpp b/src/USER-INTEL/pair_buck_coul_long_intel.cpp index 72d78fb6c7..4c012a885b 100644 --- a/src/USER-INTEL/pair_buck_coul_long_intel.cpp +++ b/src/USER-INTEL/pair_buck_coul_long_intel.cpp @@ -15,25 +15,25 @@ Contributing author: Rodrigo Canales (RWTH Aachen University) ------------------------------------------------------------------------- */ -#include -#include - -#include #include "pair_buck_coul_long_intel.h" + #include "atom.h" #include "comm.h" +#include "error.h" +#include "force.h" #include "force.h" #include "group.h" #include "kspace.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "math_const.h" #include "memory.h" -#include "error.h" -#include "suffix.h" -#include "force.h" #include "modify.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "neighbor.h" +#include "suffix.h" + +#include +#include using namespace LAMMPS_NS; using namespace MathConst; @@ -478,11 +478,13 @@ void PairBuckCoulLongIntel::eval(const int offload, const int vflag, void PairBuckCoulLongIntel::init_style() { PairBuckCoulLong::init_style(); + auto request = neighbor->find_request(this); + if (force->newton_pair == 0) { - neighbor->requests[neighbor->nrequest-1]->half = 0; - neighbor->requests[neighbor->nrequest-1]->full = 1; + request->half = 0; + request->full = 1; } - neighbor->requests[neighbor->nrequest-1]->intel = 1; + request->intel = 1; int ifix = modify->find_fix("package_intel"); if (ifix < 0) diff --git a/src/USER-INTEL/pair_buck_intel.cpp b/src/USER-INTEL/pair_buck_intel.cpp index df81b6852f..8ed0243ccf 100644 --- a/src/USER-INTEL/pair_buck_intel.cpp +++ b/src/USER-INTEL/pair_buck_intel.cpp @@ -362,11 +362,14 @@ void PairBuckIntel::eval(const int offload, const int vflag, void PairBuckIntel::init_style() { PairBuck::init_style(); + + // augment neighbor list request + auto request = neighbor->find_request(this); if (force->newton_pair == 0) { - neighbor->requests[neighbor->nrequest-1]->half = 0; - neighbor->requests[neighbor->nrequest-1]->full = 1; + request->half = 0; + request->full = 1; } - neighbor->requests[neighbor->nrequest-1]->intel = 1; + request->intel = 1; int ifix = modify->find_fix("package_intel"); if (ifix < 0) diff --git a/src/USER-INTEL/pair_dpd_intel.cpp b/src/USER-INTEL/pair_dpd_intel.cpp index 45da3cccd7..9f36887ac4 100644 --- a/src/USER-INTEL/pair_dpd_intel.cpp +++ b/src/USER-INTEL/pair_dpd_intel.cpp @@ -13,17 +13,20 @@ Shun Xu (Computer Network Information Center, CAS) ------------------------------------------------------------------------- */ -#include #include "pair_dpd_intel.h" + #include "atom.h" #include "comm.h" #include "force.h" #include "memory.h" #include "modify.h" -#include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" +#include "neighbor.h" #include "suffix.h" + +#include + using namespace LAMMPS_NS; #define LMP_MKL_RNG VSL_BRNG_MT19937 @@ -468,11 +471,13 @@ void PairDPDIntel::settings(int narg, char **arg) { void PairDPDIntel::init_style() { PairDPD::init_style(); + auto request = neighbor->find_request(this); + if (force->newton_pair == 0) { - neighbor->requests[neighbor->nrequest-1]->half = 0; - neighbor->requests[neighbor->nrequest-1]->full = 1; + request->half = 0; + request->full = 1; } - neighbor->requests[neighbor->nrequest-1]->intel = 1; + request->intel = 1; int ifix = modify->find_fix("package_intel"); if (ifix < 0) diff --git a/src/USER-INTEL/pair_eam_intel.cpp b/src/USER-INTEL/pair_eam_intel.cpp index 206bdd5ee6..83ddaaa5ee 100644 --- a/src/USER-INTEL/pair_eam_intel.cpp +++ b/src/USER-INTEL/pair_eam_intel.cpp @@ -637,11 +637,13 @@ void PairEAMIntel::eval(const int offload, const int vflag, void PairEAMIntel::init_style() { PairEAM::init_style(); + auto request = neighbor->find_request(this); + if (force->newton_pair == 0) { - neighbor->requests[neighbor->nrequest-1]->half = 0; - neighbor->requests[neighbor->nrequest-1]->full = 1; + request->half = 0; + request->full = 1; } - neighbor->requests[neighbor->nrequest-1]->intel = 1; + request->intel = 1; int ifix = modify->find_fix("package_intel"); if (ifix < 0) diff --git a/src/USER-INTEL/pair_gayberne_intel.cpp b/src/USER-INTEL/pair_gayberne_intel.cpp index fd79b5812b..44f36fa58e 100644 --- a/src/USER-INTEL/pair_gayberne_intel.cpp +++ b/src/USER-INTEL/pair_gayberne_intel.cpp @@ -24,16 +24,16 @@ #endif #include "atom.h" -#include "comm.h" #include "atom_vec_ellipsoid.h" +#include "comm.h" #include "force.h" #include "memory.h" #include "modify.h" -#include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" - +#include "neighbor.h" #include "suffix.h" + using namespace LAMMPS_NS; #define FC_PACKED1_T typename ForceConst::fc_packed1 @@ -873,11 +873,13 @@ void PairGayBerneIntel::eval(const int offload, const int vflag, void PairGayBerneIntel::init_style() { PairGayBerne::init_style(); + auto request = neighbor->find_request(this); + if (force->newton_pair == 0) { - neighbor->requests[neighbor->nrequest-1]->half = 0; - neighbor->requests[neighbor->nrequest-1]->full = 1; + request->half = 0; + request->full = 1; } - neighbor->requests[neighbor->nrequest-1]->intel = 1; + request->intel = 1; int ifix = modify->find_fix("package_intel"); if (ifix < 0) diff --git a/src/USER-INTEL/pair_lj_charmm_coul_charmm_intel.cpp b/src/USER-INTEL/pair_lj_charmm_coul_charmm_intel.cpp index 850af0de6f..630b5e9f1e 100644 --- a/src/USER-INTEL/pair_lj_charmm_coul_charmm_intel.cpp +++ b/src/USER-INTEL/pair_lj_charmm_coul_charmm_intel.cpp @@ -447,11 +447,13 @@ void PairLJCharmmCoulCharmmIntel::eval(const int offload, const int vflag, void PairLJCharmmCoulCharmmIntel::init_style() { PairLJCharmmCoulCharmm::init_style(); + auto request = neighbor->find_request(this); + if (force->newton_pair == 0) { - neighbor->requests[neighbor->nrequest-1]->half = 0; - neighbor->requests[neighbor->nrequest-1]->full = 1; + request->half = 0; + request->full = 1; } - neighbor->requests[neighbor->nrequest-1]->intel = 1; + request->intel = 1; int ifix = modify->find_fix("package_intel"); if (ifix < 0) diff --git a/src/USER-INTEL/pair_lj_charmm_coul_long_intel.cpp b/src/USER-INTEL/pair_lj_charmm_coul_long_intel.cpp index b89deacc0b..d3a7cef83a 100644 --- a/src/USER-INTEL/pair_lj_charmm_coul_long_intel.cpp +++ b/src/USER-INTEL/pair_lj_charmm_coul_long_intel.cpp @@ -12,20 +12,23 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ -#include #include "pair_lj_charmm_coul_long_intel.h" + #include "atom.h" #include "comm.h" #include "force.h" #include "group.h" #include "kspace.h" #include "memory.h" +#include "memory.h" #include "modify.h" -#include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "memory.h" +#include "neighbor.h" #include "suffix.h" + +#include + using namespace LAMMPS_NS; #define LJ_T typename IntelBuffers::vec2_t @@ -509,11 +512,13 @@ void PairLJCharmmCoulLongIntel::eval(const int offload, const int vflag, void PairLJCharmmCoulLongIntel::init_style() { PairLJCharmmCoulLong::init_style(); + auto request = neighbor->find_request(this); + if (force->newton_pair == 0) { - neighbor->requests[neighbor->nrequest-1]->half = 0; - neighbor->requests[neighbor->nrequest-1]->full = 1; + request->half = 0; + request->full = 1; } - neighbor->requests[neighbor->nrequest-1]->intel = 1; + request->intel = 1; int ifix = modify->find_fix("package_intel"); if (ifix < 0) diff --git a/src/USER-INTEL/pair_lj_cut_coul_long_intel.cpp b/src/USER-INTEL/pair_lj_cut_coul_long_intel.cpp index 111f5610b6..c0edde3c0a 100644 --- a/src/USER-INTEL/pair_lj_cut_coul_long_intel.cpp +++ b/src/USER-INTEL/pair_lj_cut_coul_long_intel.cpp @@ -475,11 +475,13 @@ void PairLJCutCoulLongIntel::eval(const int offload, const int vflag, void PairLJCutCoulLongIntel::init_style() { PairLJCutCoulLong::init_style(); + auto request = neighbor->find_request(this); + if (force->newton_pair == 0) { - neighbor->requests[neighbor->nrequest-1]->half = 0; - neighbor->requests[neighbor->nrequest-1]->full = 1; + request->half = 0; + request->full = 1; } - neighbor->requests[neighbor->nrequest-1]->intel = 1; + request->intel = 1; int ifix = modify->find_fix("package_intel"); if (ifix < 0) diff --git a/src/USER-INTEL/pair_lj_cut_intel.cpp b/src/USER-INTEL/pair_lj_cut_intel.cpp index 6499f1cec8..36bbebdd88 100644 --- a/src/USER-INTEL/pair_lj_cut_intel.cpp +++ b/src/USER-INTEL/pair_lj_cut_intel.cpp @@ -12,18 +12,20 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ -#include #include "pair_lj_cut_intel.h" + #include "atom.h" #include "comm.h" #include "force.h" #include "memory.h" #include "modify.h" -#include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" - +#include "neighbor.h" #include "suffix.h" + +#include + using namespace LAMMPS_NS; #define FC_PACKED1_T typename ForceConst::fc_packed1 @@ -379,11 +381,13 @@ void PairLJCutIntel::eval(const int offload, const int vflag, void PairLJCutIntel::init_style() { PairLJCut::init_style(); + auto request = neighbor->find_request(this); + if (force->newton_pair == 0) { - neighbor->requests[neighbor->nrequest-1]->half = 0; - neighbor->requests[neighbor->nrequest-1]->full = 1; + request->half = 0; + request->full = 1; } - neighbor->requests[neighbor->nrequest-1]->intel = 1; + request->intel = 1; int ifix = modify->find_fix("package_intel"); if (ifix < 0) diff --git a/src/USER-INTEL/pair_sw_intel.cpp b/src/USER-INTEL/pair_sw_intel.cpp index bc5c40a258..5c339e059f 100644 --- a/src/USER-INTEL/pair_sw_intel.cpp +++ b/src/USER-INTEL/pair_sw_intel.cpp @@ -1101,7 +1101,8 @@ void PairSWIntel::allocate() void PairSWIntel::init_style() { PairSW::init_style(); - neighbor->requests[neighbor->nrequest-1]->intel = 1; + neighbor->find_request(this)->intel = 1; + map[0] = map[1]; int ifix = modify->find_fix("package_intel");