From: Daniel Arndt Date: Fri, 2 Dec 2022 16:42:07 +0000 (-0500) Subject: Guard CUDA instantiations X-Git-Tag: v9.5.0-rc1~697^2~30 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bce4dea1f3c14ddeaeeaa7e34807aca726d1976;p=dealii.git Guard CUDA instantiations --- diff --git a/source/base/kokkos.cc b/source/base/kokkos.cc index 38e78d6cf1..93ccad321b 100644 --- a/source/base/kokkos.cc +++ b/source/base/kokkos.cc @@ -33,10 +33,12 @@ namespace Impl LinearAlgebra::distributed::Vector>{}; GrowingVectorMemory< LinearAlgebra::distributed::Vector>{}; +#ifdef DEAL_II_WITH_CUDA GrowingVectorMemory< - LinearAlgebra::distributed::Vector>{}; + LinearAlgebra::distributed::Vector>{}; GrowingVectorMemory< - LinearAlgebra::distributed::Vector>{}; + LinearAlgebra::distributed::Vector>{}; +#endif Kokkos::push_finalize_hook( GrowingVectorMemory< LinearAlgebra::distributed::Vector>:: @@ -45,14 +47,16 @@ namespace Impl GrowingVectorMemory< LinearAlgebra::distributed::Vector>:: release_unused_memory); +#ifdef DEAL_II_WITH_CUDA Kokkos::push_finalize_hook( GrowingVectorMemory< - LinearAlgebra::distributed::Vector>:: + LinearAlgebra::distributed::Vector>:: release_unused_memory); Kokkos::push_finalize_hook( GrowingVectorMemory< - LinearAlgebra::distributed::Vector>:: + LinearAlgebra::distributed::Vector>:: release_unused_memory); +#endif Kokkos::initialize(); std::atexit(Kokkos::finalize); }