KokkosKernels: Gauss-Seidel test build error
Created by: mhoemmen
@trilinos/tpetra @trilinos/ifpack2 KokkosKernels' Gauss-Seidel test has a build error:
.../Trilinos/packages/tpetra/kernels/unit_test/graph/KokkosKernels_Test_GaussSeidel.cpp: In instantiation of ‘scalar_view_t create_x_vector(size_t, typename scalar_view_t::value_type) [with scalar_view_t = Kokkos::View<Kokkos::complex<double>*, Kokkos::LayoutRight, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<0u> >; size_t = long unsigned int; typename scalar_view_t::value_type = Kokkos::complex<double>]’:
.../Trilinos/packages/tpetra/kernels/unit_test/graph/KokkosKernels_Test_GaussSeidel.cpp:178:66: required from ‘void test_gauss_seidel(KokkosKernels::Experimental::Graph::GSAlgorithm) [with scalar_t = Kokkos::complex<double>; lno_t = int; device = Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>]’
.../Trilinos/packages/tpetra/kernels/unit_test/graph/KokkosKernels_Test_GaussSeidel.cpp:232:3: required from here
.../Trilinos/packages/tpetra/kernels/unit_test/graph/KokkosKernels_Test_GaussSeidel.cpp:140:68: error: no match for ‘operator/’ (operand types are ‘int’ and ‘Kokkos::ViewTraits<Kokkos::complex<double>*, Kokkos::LayoutRight, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<0u> >::value_type {aka Kokkos::complex<double>}’)
static_cast <typename scalar_view_t::value_type> (RAND_MAX / max_value);
^
I think the code itself is fine; at least it builds and runs correctly in Ifpack2. This looks like an issue with the test not accounting for complex numbers.