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: Missing dependency on CUBLAS #10807

Closed
bartlettroscoe opened this issue Jul 29, 2022 · 2 comments
Closed

KokkosKernels: Missing dependency on CUBLAS #10807

bartlettroscoe opened this issue Jul 29, 2022 · 2 comments
Labels
type: bug The primary issue is a bug in Trilinos code or tests

Comments

@bartlettroscoe
Copy link
Member

Bug Report

@trilinos/kokkos-kernels

Description

A Trilinos users reports that building Trilinos on LLNL ATS2 system with CUDA enabled results in undefined references to CUBLAS functions like:

.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas1_iamax_tpl_spec_decl.hpp:339: undefined reference to `cublasGetPointerMode_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas1_iamax_tpl_spec_decl.hpp:339: undefined reference to `cublasIzamax_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas1_iamax_tpl_spec_decl.hpp:339: undefined reference to `cublasSetPointerMode_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas1_iamax_tpl_spec_decl.hpp:339: undefined reference to `cublasSetPointerMode_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas1_scal_tpl_spec_decl.hpp:236: undefined reference to `cublasZscal_v2'
.../packages/adelus/src/BlasWrapper_copy_spec.hpp:436: undefined reference to `cublasZcopy_v2'
.../packages/adelus/src/BlasWrapper_copy_spec.hpp:442: undefined reference to `cublasZcopy_v2'
.../packages/adelus/src/BlasWrapper_copy_spec.hpp:438: undefined reference to `cublasZcopy_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas2_gemv_tpl_spec_decl.hpp:530: undefined reference to `cublasSetStream_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas2_gemv_tpl_spec_decl.hpp:530: undefined reference to `cublasZgemv_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas2_gemv_tpl_spec_decl.hpp:530: undefined reference to `cublasSetStream_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas3_gemm_tpl_spec_decl.hpp:343: undefined reference to `cublasSetStream_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas3_gemm_tpl_spec_decl.hpp:343: undefined reference to `cublasZgemm_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas3_gemm_tpl_spec_decl.hpp:343: undefined reference to `cublasSetStream_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas3_trsm_tpl_spec_decl.hpp:731: undefined reference to `cublasDtrsm_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas2_gemv_tpl_spec_decl.hpp:512: undefined reference to `cublasSetStream_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas2_gemv_tpl_spec_decl.hpp:512: undefined reference to `cublasDgemv_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas2_gemv_tpl_spec_decl.hpp:512: undefined reference to `cublasSetStream_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas1_scal_tpl_spec_decl.hpp:226: undefined reference to `cublasDscal_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas1_scal_tpl_spec_decl.hpp:246: undefined reference to `cublasDscal_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas3_trsm_tpl_spec_decl.hpp:767: undefined reference to `cublasZtrsm_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas2_gemv_tpl_spec_decl.hpp:530: undefined reference to `cublasSetStream_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas2_gemv_tpl_spec_decl.hpp:530: undefined reference to `cublasZgemv_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas2_gemv_tpl_spec_decl.hpp:530: undefined reference to `cublasSetStream_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas1_scal_tpl_spec_decl.hpp:236: undefined reference to `cublasZscal_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas1_scal_tpl_spec_decl.hpp:236: undefined reference to `cublasZscal_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas1_scal_tpl_spec_decl.hpp:256: undefined reference to `cublasZscal_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas1_scal_tpl_spec_decl.hpp:256: undefined reference to `cublasZscal_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas_Cuda_tpl.hpp:15: undefined reference to `cublasDestroy_v2'
.../packages/kokkos-kernels/src/impl/tpls/KokkosBlas_Cuda_tpl.hpp:11: undefined reference to `cublasCreate_v2'

The problem seems to be that the KokkosKernels package is missing a dependency on the CUBLAS TPL.

Steps to Reproduce

Ask @vqd8a for details

@bartlettroscoe bartlettroscoe added the type: bug The primary issue is a bug in Trilinos code or tests label Jul 29, 2022
@bartlettroscoe
Copy link
Member Author

NOTE: This bug not really related to the TriBITS CMake upgrade work but this was brought to my attention by @vqd8a as the change triggered a build error with the workaround that was being used.

I will put in a PR for @vqd8a to test.

bartlettroscoe added a commit that referenced this issue Jul 29, 2022
This should fix link errors on an ATS2 configuration missing cublas link
symboles (see #10807).
bartlettroscoe added a commit that referenced this issue Jul 29, 2022
This should fix link errors on an ATS2 configuration missing cublas link
symboles (see #10807).
bartlettroscoe added a commit that referenced this issue Jul 29, 2022
This should fix link errors on an ATS2 configuration missing cublas link
symboles (see #10807).
bartlettroscoe added a commit that referenced this issue Aug 8, 2022
…ls-cublas (#10807, #10840)

I am manually merging the tip of 'develop' into this topic branch so that I
can see if the PR testing results change (see #10840).
trilinos-autotester added a commit that referenced this issue Aug 18, 2022
…-cublas

Automatically Merged using Trilinos Pull Request AutoTester
PR Title: KokkosKernels: Add missing dependency on CUBLAS (#10807)
PR Author: bartlettroscoe
@bartlettroscoe
Copy link
Member Author

With the merge of #10808 just now, this issue should be resolved. Closing as complete.

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

No branches or pull requests

1 participant