trilinos / Trilinos

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

Sacado, Stokhos: `Kokkos::Impl::Mirror[DRV]Type` have been removed upstream #13517

Closed dalg24 closed 1 month ago

dalg24 commented 1 month ago

Bug Report

See these two bug reports on the Kokkos side: https://github.com/kokkos/kokkos/issues/7413 and https://github.com/kokkos/kokkos/issues/7415

Following the merge of https://github.com/kokkos/kokkos/pull/7339 where we got rid of the Kokkos::Impl::Mirror[DRV]Type trait classes, our Trilinos nightly builds are failing due to Sacado and Stokhos relying on these private implementation details.

cc @etphipp @ndellingwood

Description

These are the places in Sacado and Stokhos that need to be updated:

Here you'd probably want to change Impl::MirrorType -> Impl::MirrorViewType

packages/sacado/src/KokkosExp_View_Fad.hpp:487:  typename Impl::MirrorType<Space,T,P ...>::view_type>::type
packages/sacado/src/KokkosExp_View_Fad.hpp:493:  return typename Impl::MirrorType<Space,T,P ...>::view_type(src.label(),layout);
packages/sacado/src/KokkosExp_View_Fad.hpp:568:  typename Impl::MirrorType<Space,T,P ...>::view_type>::type
packages/sacado/src/KokkosExp_View_Fad.hpp:575:  return typename Impl::MirrorType<Space,T,P ...>::view_type(
packages/sacado/src/Kokkos_View_Fad_Fwd.hpp:73:struct MirrorType;
packages/sacado/src/Kokkos_View_Fad_Fwd.hpp:113:  typename Impl::MirrorType<Space,T,P ...>::view_type>::type
packages/sacado/src/Kokkos_View_Fad_Fwd.hpp:149:  typename Impl::MirrorType<Space,T,P ...>::view_type>::type
packages/stokhos/src/sacado/kokkos/pce/KokkosExp_View_UQ_PCE_Contiguous.hpp:232:  typename Impl::MirrorType<Space,T,P ...>::view_type>::type
packages/stokhos/src/sacado/kokkos/pce/KokkosExp_View_UQ_PCE_Contiguous.hpp:238:  return typename Impl::MirrorType<Space,T,P ...>::view_type(
packages/stokhos/src/sacado/kokkos/pce/KokkosExp_View_UQ_PCE_Contiguous.hpp:307:  typename Impl::MirrorType<Space,T,P ...>::view_type>::type
packages/stokhos/src/sacado/kokkos/pce/KokkosExp_View_UQ_PCE_Contiguous.hpp:314:  return typename Impl::MirrorType<Space,T,P ...>::view_type(
packages/stokhos/src/sacado/kokkos/pce/Kokkos_View_UQ_PCE_Fwd.hpp:41:    struct MirrorType;
packages/stokhos/src/sacado/kokkos/pce/Kokkos_View_UQ_PCE_Fwd.hpp:88:  typename Impl::MirrorType<Space,T,P ...>::view_type>::type
packages/stokhos/src/sacado/kokkos/pce/Kokkos_View_UQ_PCE_Fwd.hpp:119:  typename Impl::MirrorType<Space,T,P ...>::view_type>::type
packages/stokhos/src/sacado/kokkos/vector/KokkosExp_View_MP_Vector_Contiguous.hpp:131:    return typename Impl::MirrorType<typename Impl::ViewCtorProp<ViewCtorArgs...>::memory_space, T, P ...>::view_type(prop_copy, layout);
packages/stokhos/src/sacado/kokkos/vector/Kokkos_View_MP_Vector_Fwd.hpp:41:    struct MirrorType;

and there for DynRankView you'd want Impl::MirrorDRVType -> Impl::MirrorDRViewType

packages/sacado/src/Kokkos_DynRankView_Fad.hpp:47:struct MirrorDRVType;
packages/sacado/src/Kokkos_DynRankView_Fad.hpp:96:typename Impl::MirrorDRVType<Space,T,P ...>::view_type
packages/sacado/src/Kokkos_DynRankView_Fad.hpp:1249:typename Impl::MirrorDRVType<Space,T,P ...>::view_type
packages/sacado/src/Kokkos_DynRankView_Fad.hpp:1260:  return typename Impl::MirrorDRVType<Space,T,P ...>::view_type(
pzehner commented 1 month ago

I could build the code by expunging the use of Kokkos::Impl::MirrorType in packages/stokhos:

Kokkos::Impl::MirrorType</* ... */>::view_type

becomes

Kokkos::Impl::MirrorViewType</* ... */>::dest_view_type
ndellingwood commented 1 month ago

@dalg24 @pzehner thanks for helping diagnose, looks like a simple enough update. I'll gather this into a PR and list you as co-authors, unless you already have PR in progress

dalg24 commented 1 month ago

(Per Kokkos developer meeting Nathan will open a PR)

ndellingwood commented 1 month ago

I'm open a PR once my local testing is complete with kokkos@develop

dalg24 commented 1 month ago

Fixed by #13521 Thanks