skip KokkosOpenMP tests when Kokkos includes GPU support

This commit is contained in:
Axel Kohlmeyer
2024-10-05 03:05:04 -04:00
parent 248070c4b8
commit e4dcdcd221
6 changed files with 24 additions and 0 deletions

View File

@ -633,6 +633,10 @@ TEST(PairStyle, kokkos_omp)
if (!LAMMPS::is_installed_pkg("KOKKOS")) GTEST_SKIP();
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
if (!Info::has_accelerator_feature("KOKKOS", "api", "openmp")) GTEST_SKIP();
// if KOKKOS has GPU support enabled, it *must* be used. We cannot test OpenMP only.
if (Info::has_accelerator_feature("KOKKOS", "api", "cuda") ||
Info::has_accelerator_feature("KOKKOS", "api", "hip") ||
Info::has_accelerator_feature("KOKKOS", "api", "sycl")) GTEST_SKIP();
LAMMPS::argv args = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite",
"-k", "on", "t", "4", "-sf", "kk"};