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

nested namespace holding kk mkl implementation #2143

Open
lucbv opened this issue Mar 13, 2024 · 1 comment
Open

nested namespace holding kk mkl implementation #2143

lucbv opened this issue Mar 13, 2024 · 1 comment
Assignees
Labels
Cleanup Code maintenance that isn't a bugfix or new feature

Comments

@lucbv
Copy link
Contributor

lucbv commented Mar 13, 2024

@maartenarnst
A compilation error occurs when compiling Trilinos/kokkos-kernels when both mkl and rocsparse are enabled.

/Trilinos-sources/packages/kokkos-kernels/sparse/tpls/KokkosSparse_spmv_bsrmatrix_tpl_spec_decl.hpp:35:7: error: no member named 'mode_kk_to_mkl' in namespace 'KokkosSparse::Experimental::Impl::KokkosSparse::Impl'; did you mean '::KokkosSparse::Impl::mode_kk_to_mkl'?

PR #2100 proposed an initial fix and was then superceded by PR #2134 waiting for feedback on whether this is now working properly or if more work is needed? In general I would expect that pre-qualifying the namespace with :: to indicate the top level should not be necessary and would be to permissive for macro usage outside of Kokkos Kernels.

@lucbv lucbv self-assigned this Mar 13, 2024
@lucbv lucbv added the Cleanup Code maintenance that isn't a bugfix or new feature label Mar 13, 2024
@maartenarnst
Copy link

Hi @lucbv,

Thanks for your work on this issue!

I've just made the changes from PR #2134 in our Trilinos build. Unfortunately, the issue remains.

The error message reads as:

INFO:root:#21 388.7 /Trilinos-sources/packages/kokkos-kernels/sparse/src/KokkosSparse_Utils_mkl.hpp:128:5: error: no member named 'mkl_internal_safe_call' in namespace 'KokkosSparse::Impl::KokkosSparse::Impl'; did you mean simply 'mkl_internal_safe_call'?
INFO:root:#21 388.7     KOKKOSKERNELS_MKL_SAFE_CALL(mkl_sparse_destroy(mtx));
INFO:root:#21 388.7     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
INFO:root:#21 388.7 /Trilinos-sources/packages/kokkos-kernels/sparse/src/KokkosSparse_Utils_mkl.hpp:69:3: note: expanded from macro 'KOKKOSKERNELS_MKL_SAFE_CALL'
INFO:root:#21 388.7   KokkosSparse::Impl::mkl_internal_safe_call(call, #call, __FILE__, __LINE__)
INFO:root:#21 388.7   ^~~~~~~~~~~~~~~~~~~~

It appears that the compiler is still looking for mkl_internal_safe_call in the wrong (nested) namespace. Do you think we should re-introduce the initial fix with the pre-qualification with ::? Or do you think of a good alternative?

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup Code maintenance that isn't a bugfix or new feature
Projects
None yet
Development

No branches or pull requests

2 participants