trilinos / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
1.22k stars 570 forks source link

Kokkos: compiling with HIP on Frontier #13572

Closed kgottiparthi closed 2 weeks ago

kgottiparthi commented 3 weeks ago

We compiled Trilinos-16 on Frontier and configured it with HIP. We have a code that uses this installation and the following compilation error occurs

PenaltyParameter_impl.hpp:76:49: error: host function 'operator()' cannot overload host device function 'operator()' void ViscousPenaltyParameter<EvalType, Traits>::operator()( ^ PenaltyParameter.hpp:40:10: note: previous declaration is here void operator()( ^ 1 error generated when compiling for gfx90a.

The location the code complains uses

KOKKOS_INLINE_FUNCTION
void operator()(
    const Kokkos::

We are not sure if we need to update this to compile with HIP. Please advice us how to proceed.

Thank you, Kalyan

cgcgcg commented 3 weeks ago

I cannot find that code in Trilinos. Can you point me to it?

jhux2 commented 2 weeks ago

@kgottiparthi You might ask on the Kokkos slack channel instead.

kgottiparthi commented 2 weeks ago

We were able to fix this by defining every operator instance with KOKKOS_INLINE_FUNCTION. This is not an issue now.

Thank you, Kalyan