Update Kokkos library in LAMMPS to v4.5.0
This commit is contained in:
@ -19,9 +19,18 @@
|
||||
|
||||
namespace {
|
||||
|
||||
#ifdef KOKKOS_COMPILER_NVHPC
|
||||
#define THREAD_SAFETY_TEST_UNREACHABLE() __builtin_unreachable()
|
||||
#else
|
||||
#define THREAD_SAFETY_TEST_UNREACHABLE() static_assert(true)
|
||||
#endif
|
||||
|
||||
#ifdef KOKKOS_ENABLE_OPENMP
|
||||
template <class Lambda1, class Lambda2>
|
||||
void run_threaded_test(const Lambda1 l1, const Lambda2 l2) {
|
||||
if (omp_get_max_threads() < 2)
|
||||
GTEST_SKIP() << "insufficient number of supported concurrent threads";
|
||||
|
||||
#pragma omp parallel num_threads(2)
|
||||
{
|
||||
if (omp_get_thread_num() == 0) l1();
|
||||
@ -78,8 +87,10 @@ void run_exec_space_thread_safety_range() {
|
||||
|
||||
TEST(TEST_CATEGORY, exec_space_thread_safety_range) {
|
||||
#ifdef KOKKOS_ENABLE_OPENACC // FIXME_OPENACC
|
||||
if (std::is_same_v<TEST_EXECSPACE, Kokkos::Experimental::OpenACC>)
|
||||
GTEST_SKIP() << "skipping since test is known to fail with OpenACC";
|
||||
GTEST_SKIP()
|
||||
<< "skipping OpenACC test since unsupported host-side atomics cause "
|
||||
"race conditions during shared allocation reference counting";
|
||||
THREAD_SAFETY_TEST_UNREACHABLE();
|
||||
#endif
|
||||
#ifdef KOKKOS_ENABLE_OPENMPTARGET
|
||||
if (std::is_same_v<TEST_EXECSPACE, Kokkos::Experimental::OpenMPTarget>)
|
||||
@ -118,6 +129,12 @@ void run_exec_space_thread_safety_mdrange() {
|
||||
}
|
||||
|
||||
TEST(TEST_CATEGORY, exec_space_thread_safety_mdrange) {
|
||||
#ifdef KOKKOS_ENABLE_OPENACC // FIXME_OPENACC
|
||||
GTEST_SKIP()
|
||||
<< "skipping OpenACC test since unsupported host-side atomics cause "
|
||||
"race conditions during shared allocation reference counting";
|
||||
THREAD_SAFETY_TEST_UNREACHABLE();
|
||||
#endif
|
||||
#ifdef KOKKOS_ENABLE_OPENMPTARGET
|
||||
if (std::is_same_v<TEST_EXECSPACE, Kokkos::Experimental::OpenMPTarget>)
|
||||
GTEST_SKIP() << "skipping since test is known to fail for OpenMPTarget";
|
||||
@ -157,6 +174,12 @@ void run_exec_space_thread_safety_team_policy() {
|
||||
}
|
||||
|
||||
TEST(TEST_CATEGORY, exec_space_thread_safety_team_policy) {
|
||||
#ifdef KOKKOS_ENABLE_OPENACC // FIXME_OPENACC
|
||||
GTEST_SKIP()
|
||||
<< "skipping OpenACC test since unsupported host-side atomics cause "
|
||||
"race conditions during shared allocation reference counting";
|
||||
THREAD_SAFETY_TEST_UNREACHABLE();
|
||||
#endif
|
||||
// FIXME_OPENMPTARGET
|
||||
#ifdef KOKKOS_ENABLE_OPENMPTARGET
|
||||
if (std::is_same_v<TEST_EXECSPACE, Kokkos::Experimental::OpenMPTarget>)
|
||||
@ -196,6 +219,12 @@ void run_exec_space_thread_safety_range_reduce() {
|
||||
}
|
||||
|
||||
TEST(TEST_CATEGORY, exec_space_thread_safety_range_reduce) {
|
||||
#ifdef KOKKOS_ENABLE_OPENACC // FIXME_OPENACC
|
||||
GTEST_SKIP()
|
||||
<< "skipping OpenACC test since unsupported host-side atomics cause "
|
||||
"race conditions during shared allocation reference counting";
|
||||
THREAD_SAFETY_TEST_UNREACHABLE();
|
||||
#endif
|
||||
run_exec_space_thread_safety_range_reduce();
|
||||
}
|
||||
|
||||
@ -230,6 +259,12 @@ void run_exec_space_thread_safety_mdrange_reduce() {
|
||||
}
|
||||
|
||||
TEST(TEST_CATEGORY, exec_space_thread_safety_mdrange_reduce) {
|
||||
#ifdef KOKKOS_ENABLE_OPENACC // FIXME_OPENACC
|
||||
GTEST_SKIP()
|
||||
<< "skipping OpenACC test since unsupported host-side atomics cause "
|
||||
"race conditions during shared allocation reference counting";
|
||||
THREAD_SAFETY_TEST_UNREACHABLE();
|
||||
#endif
|
||||
// FIXME_INTEL
|
||||
#if defined(KOKKOS_COMPILER_INTEL) && defined(KOKKOS_ENABLE_OPENMP)
|
||||
if (std::is_same_v<TEST_EXECSPACE, Kokkos::OpenMP>)
|
||||
@ -271,6 +306,12 @@ void run_exec_space_thread_safety_team_policy_reduce() {
|
||||
}
|
||||
|
||||
TEST(TEST_CATEGORY, exec_space_thread_safety_team_policy_reduce) {
|
||||
#ifdef KOKKOS_ENABLE_OPENACC // FIXME_OPENACC
|
||||
GTEST_SKIP()
|
||||
<< "skipping OpenACC test since unsupported host-side atomics cause "
|
||||
"race conditions during shared allocation reference counting";
|
||||
THREAD_SAFETY_TEST_UNREACHABLE();
|
||||
#endif
|
||||
// FIXME_OPENMPTARGET
|
||||
#ifdef KOKKOS_ENABLE_OPENMPTARGET
|
||||
if (std::is_same_v<TEST_EXECSPACE, Kokkos::Experimental::OpenMPTarget>)
|
||||
@ -279,7 +320,7 @@ TEST(TEST_CATEGORY, exec_space_thread_safety_team_policy_reduce) {
|
||||
#endif
|
||||
// FIXME_SYCL
|
||||
#if defined(KOKKOS_ENABLE_SYCL) && defined(KOKKOS_IMPL_ARCH_NVIDIA_GPU)
|
||||
if (std::is_same_v<TEST_EXECSPACE, Kokkos::Experimental::SYCL>)
|
||||
if (std::is_same_v<TEST_EXECSPACE, Kokkos::SYCL>)
|
||||
GTEST_SKIP() << "skipping since test is know to fail with SYCL+Cuda";
|
||||
#endif
|
||||
run_exec_space_thread_safety_team_policy_reduce();
|
||||
@ -318,8 +359,10 @@ void run_exec_space_thread_safety_range_scan() {
|
||||
|
||||
TEST(TEST_CATEGORY, exec_space_thread_safety_range_scan) {
|
||||
#ifdef KOKKOS_ENABLE_OPENACC // FIXME_OPENACC
|
||||
if (std::is_same_v<TEST_EXECSPACE, Kokkos::Experimental::OpenACC>)
|
||||
GTEST_SKIP() << "skipping since test is known to fail with OpenACC";
|
||||
GTEST_SKIP()
|
||||
<< "skipping OpenACC test since unsupported host-side atomics cause "
|
||||
"race conditions during shared allocation reference counting";
|
||||
THREAD_SAFETY_TEST_UNREACHABLE();
|
||||
#endif
|
||||
run_exec_space_thread_safety_range_scan();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user