From cc618264a0bce55c5c69b6a94c148e19fb09ace5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 6 Mar 2022 04:47:22 -0500 Subject: [PATCH] allow only one accelerator type enabled for neighbor lists --- src/neighbor.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 0935b7a9e7..68e8112745 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -1090,8 +1090,8 @@ int Neighbor::init_pair() } /* ---------------------------------------------------------------------- - scan NeighRequests to set additional flags - only for custom cutoff lists + scan NeighRequests to set additional flags: + custom cutoff lists and accelerator lists ------------------------------------------------------------------------- */ void Neighbor::morph_unique() @@ -1105,6 +1105,14 @@ void Neighbor::morph_unique() // this forces Pair,Stencil,Bin styles to be instantiated separately if (irq->cut) irq->unique = 1; + + // avoid flagging a neighbor list as both INTEL and OPENMP + + if (irq->intel) irq->omp = 0; + + // avoid flagging a neighbor list as both KOKKOS and INTEL or OPENMP + + if (irq->kokkos_host || irq->kokkos_device) irq->omp = irq->intel = 0; } }