Albany icon indicating copy to clipboard operation
Albany copied to clipboard

Avoid accessing memebers in Implementation namespaces

Open mperego opened this issue 2 years ago • 3 comments

We are using functions/classes in Impl namespaces.

>> git grep "::Impl::"
src/PHAL_Utilities_Def.hpp:  auto layout = Kokkos::Impl::reconstructLayout(src.layout(), src.rank());
src/PHAL_Utilities_Def.hpp:  auto ml = Kokkos::Impl::reconstructLayout(sl, real_rank);

This is not recommended because functions/classes in Impl namespaces can change frequently. Kokkos developers are pushing applications to avoid doing so.

@jewatkins @kliegeois @bartgol any volunteer to address this issue?

mperego avatar Feb 01 '23 20:02 mperego

Looks like @ibaned might have put this in based on some const issues? See https://github.com/sandialabs/Albany/commit/7c34226ba3020f9005b55f334408e322b2789b62#diff-f65ed18732c81ee5d12806153e9984789d4aca4f6bdbc649866b2dd65992e244R224 & https://github.com/sandialabs/Albany/issues/34 Unless it predates that merge and it was moved around. Dan is there an easy way to get rid of this? No problem if you don't recall what the original issue was. It looks like create_copy() is only used in some of the core/demo pdes.

jewatkins avatar Feb 01 '23 21:02 jewatkins

Yea, I have no memory of this. I would recommend either opening and issue on the Kokkos GitHub repository or asking on the Kokkos Slack channel what the best way is to write these create_copy functions without calling Kokkos implementation functions. Also, the developers of Sacado may be able to answer that same question.

ibaned avatar Feb 01 '23 21:02 ibaned

I have no clue what those routines are trying to achieve. I am also not a big expert of DynRankView details. I think Dan is right, asking on kokkos channels might be a good idea.

bartgol avatar Feb 01 '23 21:02 bartgol