From 4cfb8777c03b88065bbb73a31ec0d894a1c2ff3f Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 5 Nov 2024 12:58:59 -0500 Subject: [PATCH 1/2] fix cuda without kokkos build #116, run_test_r3d is failing --- src/Omega_h_array.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Omega_h_array.hpp b/src/Omega_h_array.hpp index 30a94407e..e688a41af 100644 --- a/src/Omega_h_array.hpp +++ b/src/Omega_h_array.hpp @@ -10,6 +10,7 @@ #include #else #include +#include //shared_ptr #include #endif @@ -136,7 +137,7 @@ class HostRead { #if defined(OMEGA_H_USE_KOKKOS) typename Kokkos::View mirror_; #elif defined(OMEGA_H_USE_CUDA) - std::shared_ptr mirror_; + std::shared_ptr mirror_; #endif public: using value_type = T; @@ -155,7 +156,7 @@ class HostWrite { #ifdef OMEGA_H_USE_KOKKOS typename View::HostMirror mirror_; #elif defined(OMEGA_H_USE_CUDA) - std::shared_ptr mirror_; + std::shared_ptr mirror_; #endif public: using value_type = T; From 956c46d00baf8dfab53a809ac57e0e14ba406135 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 5 Nov 2024 13:15:02 -0500 Subject: [PATCH 2/2] cuda arch flags for library sources --- src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b9e15ab06..3f6d3a1a7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -196,6 +196,9 @@ add_library(Omega_h::omega_h ALIAS omega_h) set_property(TARGET omega_h PROPERTY CXX_STANDARD "17") set_property(TARGET omega_h PROPERTY CXX_STANDARD_REQUIRED ON) set_property(TARGET omega_h PROPERTY CXX_EXTENSIONS OFF) +if (Omega_h_USE_CUDA) + set_property(TARGET omega_h PROPERTY CUDA_ARCHITECTURES ${Omega_h_CUDA_ARCH}) +endif() bob_library_includes(omega_h)