Tpetra::BlockCrsMatrix build errors when KOKKOS_ENABLE_DEPRECATED_CODE=OFF
Created by: mhoemmen
@trilinos/tpetra @trilinos/kokkos @ndellingwood
@vbrunini found this in a CUDA build with KOKKOS_ENABLE_DEPRECATED_CODE:BOOL=OFF
:
.../Kokkos_DualView.hpp(403): error: static assertion failed with "Template parameter to .sync() must exactly match one of the DualView's device types or one of the execution or memory spaces"
detected during:
instantiation of "int Kokkos::DualView<DataType, Arg1Type, Arg2Type, Arg3Type>::get_device_side<Device>() [with DataType=double *, Arg1Type=Kokkos::Device<Kokkos::CudaUVMSpace::execution_space, Kokkos::CudaUVMSpace::memory_space>, Arg2Type=void, Arg3Type=void, Device=Kokkos::HostSpace::memory_space]"
(472): here
instantiation of "void Kokkos::DualView<DataType, Arg1Type, Arg2Type, Arg3Type>::sync<Device>(const Kokkos::Impl::enable_if<<expression>, int>::type &) [with DataType=double *, Arg1Type=Kokkos::Device<Kokkos::CudaUVMSpace::execution_space, Kokkos::CudaUVMSpace::memory_space>, Arg2Type=void, Arg3Type=void, Device=Kokkos::HostSpace::memory_space]"
.../Tpetra_Experimental_BlockCrsMatrix_decl.hpp(953): here
This is a BlockCrsMatrix issue. I was able to replicate by calling BlockCrsMatrix's sync method with MemorySpace=Kokkos::HostSpace
.
Note that Kokkos::DualView
's templated methods only static_assert
on their template parameter if Kokkos disables deprecated code. Since Trilinos currently always enables Kokkos' deprecated code by default, these static_assert
s never get exercised.
I am working on a fix in BlockCrsMatrix, and a test that failed before but passes with my fix.