Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KokkosKernels: Compilation errors with TPL_ENABLE_MKL=ON #6957

Closed
etphipp opened this issue Mar 4, 2020 · 2 comments
Closed

KokkosKernels: Compilation errors with TPL_ENABLE_MKL=ON #6957

etphipp opened this issue Mar 4, 2020 · 2 comments
Labels
pkg: KokkosKernels type: bug The primary issue is a bug in Trilinos code or tests

Comments

@etphipp
Copy link
Contributor

etphipp commented Mar 4, 2020

@trilinos/kokkos-kernels

Kokkos-Kernels does not compile when enabling the Trilinos option TPL_ENABLE_MKL=ON.

There are two issues. First the file src/sparse/impl/KokkosSparse_spgemm_mkl_impl.hpp generates errors such as

/home/etphipp/Trilinos/Trilinos/packages/kokkos-kernels/src/sparse/impl/KokkosSparse_spgemm_mkl_impl.hpp:212:9: error: 
      unknown type name 'sparse_index_base_t'; did you mean
      'KokkosBatched::sparse_index_base_t'?
        sparse_index_base_t c_indexing;
        ^~~~~~~~~~~~~~~~~~~
        KokkosBatched::sparse_index_base_t
/home/software/intel/compilers_and_libraries_2019.3.199/linux/mkl/include/mkl_spblas.h:658:7: note: 
      'KokkosBatched::sparse_index_base_t' declared here
    } sparse_index_base_t;

/home/etphipp/Trilinos/Trilinos/packages/kokkos-kernels/src/sparse/impl/KokkosSparse_spgemm_mkl_impl.hpp:216:13: error: 
      use of undeclared identifier 'SPARSE_STATUS_SUCCESS'; did you mean
      'KokkosBatched::SPARSE_STATUS_SUCCESS'?
        if (SPARSE_STATUS_SUCCESS !=
            ^~~~~~~~~~~~~~~~~~~~~
            KokkosBatched::SPARSE_STATUS_SUCCESS
/home/software/intel/compilers_and_libraries_2019.3.199/linux/mkl/include/mkl_spblas.h:624:9: note: 
      'KokkosBatched::SPARSE_STATUS_SUCCESS' declared here
        SPARSE_STATUS_SUCCESS           = 0,    /* the operation was suc...

Looking through that file, I thought I was seeing these because I had KokkosKernels_ENABLE_TPL_MKL=OFF (which is the default, regardless of TPL_ENABLE_MKL), but even turning that on doesn't fix it.

Second, files such as src/batched/KokkosBatched_Gemm_Serial_Impl.hpp and src/batched/KokkosBatched_Trsm_Serial_Impl.hpp also include MKL-specific specializations that generate errors if deprecated code in Kokkos is turned off, e.g.,

/home/etphipp/Trilinos/Trilinos/packages/kokkos-kernels/src/batched/KokkosBatched_Gemm_Serial_Impl.hpp:49:13: error: cannot refer to type member 'dimension' in 'const Kokkos::View<KokkosBatched::Vector<KokkosBatched::SIMD<double>, 4> **, Kokkos::LayoutStride, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<1> >' with '.'
      m = C.dimension(0),

Replacing those lines with extent(0) fixes those errors. However those specializations appear to be compiled even with KokkosKernels_ENABLE_TPL_MKL=OFF, which I'm guessing they shouldn't be.

@etphipp etphipp added the type: bug The primary issue is a bug in Trilinos code or tests label Mar 4, 2020
@srajama1
Copy link
Contributor

srajama1 commented Mar 4, 2020

@kyungjoo-kim : Can you take care of both of these please ?

@etphipp
Copy link
Contributor Author

etphipp commented Mar 4, 2020

I verified Trilinos now builds with TPL_ENABLEP_MKL=ON with #6959 merged. Thanks @kyungjoo-kim!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: KokkosKernels type: bug The primary issue is a bug in Trilinos code or tests
Projects
None yet
Development

No branches or pull requests

3 participants