Assignment between dynamic and static rank views broken in Sacado for contiguous layout
Created by: etphipp
@trilinos/sacado
As reported by @rppawlo, this code:
Kokkos::View<FadType**,typename PHX::DevLayout<FadType>::type,PHX::Device> static_a("static_a",100,8,64);
Kokkos::Experimental::DynRankView<FadType,typename PHX::DevLayout<FadType>::type,PHX::Device> dyn_a;
dyn_a = static_a;
Generates the following compiler error on Cuda (with LayoutLeft):
[100%] Building CXX object packages/phalanx/test/Kokkos/CMakeFiles/Phalanx_tKokkos.dir/tKokkos.cpp.o
/home/rppawlo/Trilinos/packages/phalanx/test/Kokkos/tKokkos.cpp(880): error: identifier "static_a_llcc" is undefined
/home/rppawlo/Trilinos/packages/sacado/src/Kokkos_DynRankView_Fad_Contiguous.hpp(740): error: no operator "=" matches these operands
operand types are: Kokkos::Impl::ViewDimension<0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL> = const Kokkos::Impl::ViewDimension<0UL, 0UL, 0UL>
detected during:
instantiation of "void Kokkos::Impl::ViewMapping<DstTraits, SrcTraits, std::enable_if<<expression>, Kokkos::Experimental::Impl::ViewToDynRankViewTag>::type>::assign(Kokkos::DynRankView<DT, DP...> &, const Kokkos::View<ST, SP...> &) [with DstTraits=Kokkos::ViewTraits<Sacado::Fad::DFad<double> *******, PHX::DefaultFadLayout, PHX::Device>, SrcTraits=Kokkos::ViewTraits<Sacado::Fad::DFad<double> **, PHX::DefaultFadLayout, PHX::Device>, DT=Sacado::Fad::DFad<double>, DP=<PHX::DefaultFadLayout, PHX::Device>, ST=Sacado::Fad::DFad<double> **, SP=<PHX::DefaultFadLayout, PHX::Device>]"
/home/rppawlo/Trilinos/packages/kokkos/containers/src/Kokkos_DynRankView.hpp(855): here
instantiation of "Kokkos::Experimental::DynRankView<DataType, Properties...> &Kokkos::Experimental::DynRankView<DataType, Properties...>::operator=(const Kokkos::View<RT, RP...> &) [with DataType=Sacado::Fad::DFad<double>, Properties=<PHX::DefaultFadLayout, PHX::Device>, RT=Sacado::Fad::DFad<double> **, RP=<PHX::DefaultFadLayout, PHX::Device>]"
/home/rppawlo/Trilinos/packages/phalanx/test/Kokkos/tKokkos.cpp(876): here
/home/rppawlo/Trilinos/packages/sacado/src/Kokkos_DynRankView_Fad_Contiguous.hpp(748): error: no operator "=" matches these operands
operand types are: Kokkos::Impl::ViewDimension<0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL> = const Kokkos::Impl::ViewDimension<0UL, 0UL>
detected during:
instantiation of "void Kokkos::Impl::ViewMapping<DstTraits, SrcTraits, std::enable_if<<expression>, Kokkos::Experimental::Impl::ViewToDynRankViewTag>::type>::assign(Kokkos::DynRankView<DT, DP...> &, const Kokkos::View<ST, SP...> &) [with DstTraits=Kokkos::ViewTraits<Sacado::Fad::DFad<double> *******, PHX::DefaultFadLayout, PHX::Device>, SrcTraits=Kokkos::ViewTraits<Sacado::Fad::DFad<double> **, PHX::DefaultFadLayout, PHX::Device>, DT=Sacado::Fad::DFad<double>, DP=<PHX::DefaultFadLayout, PHX::Device>, ST=Sacado::Fad::DFad<double> **, SP=<PHX::DefaultFadLayout, PHX::Device>]"
/home/rppawlo/Trilinos/packages/kokkos/containers/src/Kokkos_DynRankView.hpp(855): here
instantiation of "Kokkos::Experimental::DynRankView<DataType, Properties...> &Kokkos::Experimental::DynRankView<DataType, Properties...>::operator=(const Kokkos::View<RT, RP...> &) [with DataType=Sacado::Fad::DFad<double>, Properties=<PHX::DefaultFadLayout, PHX::Device>, RT=Sacado::Fad::DFad<double> **, RP=<PHX::DefaultFadLayout, PHX::Device>]"
/home/rppawlo/Trilinos/packages/phalanx/test/Kokkos/tKokkos.cpp(876): here
3 errors detected in the compilation of "/tmp/tmpxft_00006517_00000000-7_tKokkos.cpp1.ii".
make[2]: *** [packages/phalanx/test/Kokkos/CMakeFiles/Phalanx_tKokkos.dir/build.make:62: packages/phalanx/test/Kokkos/CMakeFiles/Phalanx_tKokkos.dir/tKokkos.cpp.o] Error 2
make[1]: *** [CMakeFiles/Makefile2:15159: packages/phalanx/test/Kokkos/CMakeFiles/Phalanx_tKokkos.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
bash-4.1$