You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is currently not possible to build the HPX execution space in Kokkos 4.0.01 (and older) using the current HPX master branch due to some missing overload.
I have looked a bit into the issue and it appears to be somewhat older than I initially thought, being introduced into HPX master on August 20, 2023 in PR #6309, (or more specifically in ca5e2d0 )
in the chunk_size.hpp file cause the compilation issue.
For GPU machines (such as Perlmutter) we can actually work around this problem by simply dropping these calls to prefer which allows compiling Kokkos again (see patch).
However, this does not address the underlying issue, of course! This is only a workaround meant for GPU machines where we use a different (CUDA) Kokkos Execution Space but have to still build the HPX Kokkos Execution Space (currently required for hpx-kokkos compilation).
@hkaiser Could you take a look at this for a proper fix? It seems like some overload is missing in #6309, but I am not quite certain where to look for it/introduce it.
In the future, we might also want to take a look at changing hpx-kokkos to allow for compilation without at the Kokkos HPX execution space present.
For the sake of completeness, here is the Kokkos compilation error (using gcc 11 / cuda 12):
/home/daissgr/workshop/KokkosTiger/build/hpx/include/hpx/properties/property.hpp(25): error: expected a ")"
detected during:
instantiation of "hpx::experimental::tag_fallback_invoke" based on template arguments <hpx::parallel::execution::with_processing_units_count_t, hpx::execution::detail::parallel_policy_shim<hpx::execution::parallel_executor, hpx::execution::experimental::default_parameters> &, const unsigned long &>
/home/daissgr/workshop/KokkosTiger/build/hpx/include/hpx/functional/invoke_result.hpp(38): here
instantiation of class "hpx::util::invoke_result<F, Ts...> [with F=const hpx::functional::detail::tag_fallback_invoke_t_ns::tag_fallback_invoke_t, Ts=<hpx::experimental::prefer_t, const hpx::parallel::execution::with_processing_units_count_t &, hpx::execution::detail::parallel_policy_shim<hpx::execution::parallel_executor, hpx::execution::experimental::default_parameters> &, const std::size_t &>]"
/home/daissgr/workshop/KokkosTiger/build/hpx/include/hpx/parallel/util/detail/chunk_size.hpp(173): here
instantiation of "hpx::util::iterator_range<hpx::parallel::util::detail::chunk_size_iterator<IterOrR>, hpx::parallel::util::detail::chunk_size_iterator<IterOrR>> hpx::parallel::util::detail::get_bulk_iteration_shape(ExPolicy &, IterOrR &, std::size_t &, Stride) [with ExPolicy=hpx::execution::detail::parallel_policy_shim<hpx::execution::parallel_executor, hpx::execution::experimental::default_parameters>, IterOrR=int64_t, Stride=std::size_t]"
/home/daissgr/workshop/KokkosTiger/build/hpx/include/hpx/parallel/algorithms/for_loop.hpp(1667): here
instantiation of "hpx::parallel::util::detail::algorithm_result_t<ExPolicy, void> hpx::experimental::tag_fallback_invoke(hpx::experimental::for_loop_strided_t, ExPolicy &&, std::decay_t<I>, I, S, Args &&...) [with ExPolicy=hpx::execution::detail::parallel_policy_shim<hpx::execution::parallel_executor, hpx::execution::experimental::default_parameters>, I=int64_t, S=int64_t, Args=<lambda [](int64_t)->void>, _concept_requires_1648=42, _concept_check_1648=0]"
/home/daissgr/workshop/KokkosTiger/build/hpx/include/hpx/functional/detail/tag_fallback_invoke.hpp(296): here
instantiation of "auto hpx::functional::detail::tag_base_ns::tag_fallback<Tag, Enable>::operator()(Args &&...) const->hpx::functional::detail::tag_fallback_invoke_result_t<Tag, Args &&...> [with Tag=hpx::experimental::for_loop_strided_t, Enable=hpx::meta::constant<std::integral_constant<__nv_bool, true>>, Args=<hpx::execution::detail::parallel_policy_shim<hpx::execution::parallel_executor, hpx::execution::experimental::default_parameters>, int64_t, int64_t, const int64_t &, lambda [](int64_t)->void>, <unnamed>=void]"
/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/Kokkos_HPX.hpp(1047): here
[ 3 instantiation contexts not shown ]
instantiation of "void Kokkos::Impl::ViewValueFunctor<DeviceType, ValueType, true>::parallel_for_implementation() [with DeviceType=Kokkos::Device<Kokkos::HostSpace::execution_space, Kokkos::HostSpace::memory_space>, ValueType=uint32_t]"
/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/impl/Kokkos_ViewMapping.hpp(3082): here
instantiation of "std::enable_if_t<<expression>, void> Kokkos::Impl::ViewValueFunctor<DeviceType, ValueType, true>::construct_shared_allocation() [with DeviceType=Kokkos::Device<Kokkos::HostSpace::execution_space, Kokkos::HostSpace::memory_space>, ValueType=uint32_t, Dummy=uint32_t]"
/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/impl/Kokkos_ViewMapping.hpp(3463): here
instantiation of "Kokkos::Impl::SharedAllocationRecord<void, void> *Kokkos::Impl::ViewMapping<Traits, std::enable_if_t<<expression>, void>>::allocate_shared(const Kokkos::Impl::ViewCtorProp<P...> &, const Traits::array_layout &, __nv_bool) [with Traits=Kokkos::ViewTraits<uint32_t *, Kokkos::HostSpace>, P=<std::string, Kokkos::HostSpace::memory_space, Kokkos::HostSpace::execution_space>]"
/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/Kokkos_View.hpp(1434): here
instantiation of "Kokkos::View<DataType, Properties...>::View(const Kokkos::Impl::ViewCtorProp<P...> &, const std::enable_if_t<<expression>, Kokkos::ViewTraits<DataType, Properties...>::array_layout> &) [with DataType=uint32_t *, Properties=<Kokkos::HostSpace>, P=<std::string>]"
/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/Kokkos_View.hpp(1536): here
instantiation of "Kokkos::View<DataType, Properties...>::View(const Label &, std::enable_if_t<Kokkos::Impl::is_view_label<Label>::value, const size_t>, size_t, size_t, size_t, size_t, size_t, size_t, size_t) [with DataType=uint32_t *, Properties=<Kokkos::HostSpace>, Label=char [27]]"
/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/Kokkos_HPX.hpp(557): here
/home/daissgr/workshop/KokkosTiger/build/hpx/include/hpx/properties/property.hpp(25): error: no instance of overloaded function "hpx::parallel::execution::with_processing_units_count_t::operator()" matches the argument list
argument types are: (hpx::execution::detail::parallel_policy_shim<hpx::execution::parallel_executor, hpx::execution::experimental::default_parameters>)
object type is: hpx::parallel::execution::with_processing_units_count_t
detected during:
instantiation of "hpx::experimental::tag_fallback_invoke" based on template arguments <hpx::parallel::execution::with_processing_units_count_t, hpx::execution::detail::parallel_policy_shim<hpx::execution::parallel_executor, hpx::execution::experimental::default_parameters> &, const unsigned long &>
/home/daissgr/workshop/KokkosTiger/build/hpx/include/hpx/functional/invoke_result.hpp(38): here
instantiation of class "hpx::util::invoke_result<F, Ts...> [with F=const hpx::functional::detail::tag_fallback_invoke_t_ns::tag_fallback_invoke_t, Ts=<hpx::experimental::prefer_t, const hpx::parallel::execution::with_processing_units_count_t &, hpx::execution::detail::parallel_policy_shim<hpx::execution::parallel_executor, hpx::execution::experimental::default_parameters> &, const std::size_t &>]"
/home/daissgr/workshop/KokkosTiger/build/hpx/include/hpx/parallel/util/detail/chunk_size.hpp(173): here
instantiation of "hpx::util::iterator_range<hpx::parallel::util::detail::chunk_size_iterator<IterOrR>, hpx::parallel::util::detail::chunk_size_iterator<IterOrR>> hpx::parallel::util::detail::get_bulk_iteration_shape(ExPolicy &, IterOrR &, std::size_t &, Stride) [with ExPolicy=hpx::execution::detail::parallel_policy_shim<hpx::execution::parallel_executor, hpx::execution::experimental::default_parameters>, IterOrR=int64_t, Stride=std::size_t]"
/home/daissgr/workshop/KokkosTiger/build/hpx/include/hpx/parallel/algorithms/for_loop.hpp(1667): here
instantiation of "hpx::parallel::util::detail::algorithm_result_t<ExPolicy, void> hpx::experimental::tag_fallback_invoke(hpx::experimental::for_loop_strided_t, ExPolicy &&, std::decay_t<I>, I, S, Args &&...) [with ExPolicy=hpx::execution::detail::parallel_policy_shim<hpx::execution::parallel_executor, hpx::execution::experimental::default_parameters>, I=int64_t, S=int64_t, Args=<lambda [](int64_t)->void>, _concept_requires_1648=42, _concept_check_1648=0]"
/home/daissgr/workshop/KokkosTiger/build/hpx/include/hpx/functional/detail/tag_fallback_invoke.hpp(296): here
instantiation of "auto hpx::functional::detail::tag_base_ns::tag_fallback<Tag, Enable>::operator()(Args &&...) const->hpx::functional::detail::tag_fallback_invoke_result_t<Tag, Args &&...> [with Tag=hpx::experimental::for_loop_strided_t, Enable=hpx::meta::constant<std::integral_constant<__nv_bool, true>>, Args=<hpx::execution::detail::parallel_policy_shim<hpx::execution::parallel_executor, hpx::execution::experimental::default_parameters>, int64_t, int64_t, const int64_t &, lambda [](int64_t)->void>, <unnamed>=void]"
/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/Kokkos_HPX.hpp(1047): here
[ 3 instantiation contexts not shown ]
instantiation of "void Kokkos::Impl::ViewValueFunctor<DeviceType, ValueType, true>::parallel_for_implementation() [with DeviceType=Kokkos::Device<Kokkos::HostSpace::execution_space, Kokkos::HostSpace::memory_space>, ValueType=uint32_t]"
/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/impl/Kokkos_ViewMapping.hpp(3082): here
instantiation of "std::enable_if_t<<expression>, void> Kokkos::Impl::ViewValueFunctor<DeviceType, ValueType, true>::construct_shared_allocation() [with DeviceType=Kokkos::Device<Kokkos::HostSpace::execution_space, Kokkos::HostSpace::memory_space>, ValueType=uint32_t, Dummy=uint32_t]"
/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/impl/Kokkos_ViewMapping.hpp(3463): here
instantiation of "Kokkos::Impl::SharedAllocationRecord<void, void> *Kokkos::Impl::ViewMapping<Traits, std::enable_if_t<<expression>, void>>::allocate_shared(const Kokkos::Impl::ViewCtorProp<P...> &, const Traits::array_layout &, __nv_bool) [with Traits=Kokkos::ViewTraits<uint32_t *, Kokkos::HostSpace>, P=<std::string, Kokkos::HostSpace::memory_space, Kokkos::HostSpace::execution_space>]"
/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/Kokkos_View.hpp(1434): here
instantiation of "Kokkos::View<DataType, Properties...>::View(const Kokkos::Impl::ViewCtorProp<P...> &, const std::enable_if_t<<expression>, Kokkos::ViewTraits<DataType, Properties...>::array_layout> &) [with DataType=uint32_t *, Properties=<Kokkos::HostSpace>, P=<std::string>]"
/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/Kokkos_View.hpp(1536): here
instantiation of "Kokkos::View<DataType, Properties...>::View(const Label &, std::enable_if_t<Kokkos::Impl::is_view_label<Label>::value, const size_t>, size_t, size_t, size_t, size_t, size_t, size_t, size_t) [with DataType=uint32_t *, Properties=<Kokkos::HostSpace>, Label=char [27]]"
/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/Kokkos_HPX.hpp(557): here
2 errors detected in the compilation of "/home/daissgr/workshop/KokkosTiger/src/kokkos/core/src/impl/Kokkos_Core.cpp".
make[2]: *** [core/src/CMakeFiles/kokkoscore.dir/build.make:104: core/src/CMakeFiles/kokkoscore.dir/impl/Kokkos_Core.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1041: core/src/CMakeFiles/kokkoscore.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
The text was updated successfully, but these errors were encountered:
It is currently not possible to build the HPX execution space in Kokkos 4.0.01 (and older) using the current HPX master branch due to some missing overload.
I have looked a bit into the issue and it appears to be somewhat older than I initially thought, being introduced into HPX master on August 20, 2023 in PR #6309, (or more specifically in ca5e2d0 )
Here, the calls to
in the chunk_size.hpp file cause the compilation issue.
For GPU machines (such as Perlmutter) we can actually work around this problem by simply dropping these calls to
prefer
which allows compiling Kokkos again (see patch).However, this does not address the underlying issue, of course! This is only a workaround meant for GPU machines where we use a different (CUDA) Kokkos Execution Space but have to still build the HPX Kokkos Execution Space (currently required for hpx-kokkos compilation).
@hkaiser Could you take a look at this for a proper fix? It seems like some overload is missing in #6309, but I am not quite certain where to look for it/introduce it.
In the future, we might also want to take a look at changing hpx-kokkos to allow for compilation without at the Kokkos HPX execution space present.
For the sake of completeness, here is the Kokkos compilation error (using gcc 11 / cuda 12):
The text was updated successfully, but these errors were encountered: