NVIDIA / stdexec

`std::execution`, the proposed C++ framework for asynchronous and parallel programming.
Apache License 2.0
1.56k stars 159 forks source link

is latest sync_wait() broken? #1150

Closed weilewei closed 10 months ago

weilewei commented 11 months ago

I cannot compile examples with latest stdexec as of today Nov 20. See the simple hello world example using the latest stdexec library. https://godbolt.org/z/q461foj41. It would work if not pulling the latest stdexec version. Thanks.

maikel commented 11 months ago

The readme states

If using stdexec from GitHub, then nvc++ 23.3 is required.

Can you try to update your toolchain and report whether this works?

weilewei commented 11 months ago

yes, the simple hello world program works with 23.7 locally in my machine. The godbolt has some issue with stdexec when nvc++ >= 23.1.

but in a more complicated example, I got the following error after weekend's commits. and my code is here: https://github.com/NERSC/hpcpp/blob/main/apps/heat-equation/heat-equation-stdexec.cpp

"/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/detail/basic_sender.hpp", line 162: error: no instance of function template "stdexec::sexpr<_ImplFn>::apply [with _ImplFn=lambda [](_Cvref, _Fun &&) mutable->decltype(())]" matches the argument list argument types are: (stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::detail::get_data) object type is: stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())> return sndr.apply((_Sender&&) sndr, get_data()); ^ detected during: instantiation of "decltype(auto) stdexec::detail::default_basis_ops::get_state(_Sender &&, _Receiver &) [with _Sender=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple>>, stdexec::__schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_stopped_t>, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::t]" at line 186 instantiation of type "stdexec::detail::state_type_t<stdexec::just::just_t, stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::__receivers::set_error_t, cudaError_t>, std::tuple<stdexec::receivers::set_value_t>>>, stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::sync_wait::receiver<>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>>>, __env_t>::rcvr_, lambda [](auto )->decltype(auto) noexcept{}>::t>" at line 226 instantiation of class "stdexec::detail::op_base<_Sexpr, _Receiver> [with _Sexpr=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::__receivers::set_error_t, cudaError_t>, std::tuple<stdexec::receivers::set_value_t>>>, stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto )->decltype(auto) noexcept{}>>>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>::t]" at line 299 instantiation of class "stdexec::detail::op_state<_Sexpr, _Receiver> [with _Sexpr=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple>>, stdexec::__schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_stopped_t>, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::__t]" at line 409 instantiation of "stdexec::tag_invoke" based on template arguments <stdexec::connect::connect_t, stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::detail::receiver_with<&stdexec::_write::operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_value_t>>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::__receivers::set_error_t, cudaError_t>, std::tuple<stdexec::receivers::set_value_t>>>, stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::sync_wait::receiver<>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>>>, __env_t>::rcvr_, lambda [](auto )->decltype(auto) noexcept{}>::t> at line 6793 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/execution.hpp" instantiation of "auto stdexec::sync_wait::__diagnose_error<_Sender>() [with _Sender=stdexec::__sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>]" at line 119 of "/global/homes/w/wwei/src/hpcpp/apps/heat-equation/heat-equation-stdexec.cpp" instantiation of "void heat_equation(stdexec::scheduler auto, Real_t , Real_t , Real_t , Real_t, Real_t, int, int, bool) [with =exec::static_thread_pool::scheduler]" at line 169 of "/global/homes/w/wwei/src/hpcpp/apps/heat-equation/heat-equation-stdexec.cpp"

"/opt/cray/pe/gcc/12.2.0/snos/include/g++/type_traits", line 2199: error: incomplete type is not allowed typedef typename decay_selector<__remove_type>::type type; ^ detected during: instantiation of class "std::decay<_Tp> [with _Tp=]" at line 2610 instantiation of type "std::decay_t<>" at line 37 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/detail/type_traits.hpp" instantiation of type "stdexec::decay_t<>" at line 186 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/detail/basic_sender.hpp" instantiation of type "stdexec::detail::state_type_t<stdexec::just::just_t, stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::detail::receiver_with<&stdexec::_write::operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_value_t>>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::__receivers::set_error_t, cudaError_t>, std::tuple<stdexec::receivers::set_value_t>>>, stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::sync_wait::receiver<>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>>>, __env_t>::rcvr_, lambda [](auto )->decltype(auto) noexcept{}>::t>" at line 226 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/detail/basic_sender.hpp" instantiation of class "stdexec::detail::op_base<_Sexpr, _Receiver> [with _Sexpr=stdexec::__sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::detail::receiver_with<&stdexec::_write::operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_value_t>>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::__receivers::set_error_t, cudaError_t>, std::tuple<stdexec::receivers::set_value_t>>>, stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto )->decltype(auto) noexcept{}>>>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>::t]" at line 299 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/detail/basic_sender.hpp" instantiation of class "stdexec::detail::op_state<_Sexpr, _Receiver> [with _Sexpr=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple>>, stdexec::__schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_stopped_t>, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::t]" at line 409 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/detail/basic_sender.hpp" instantiation of "stdexec::tag_invoke" based on template arguments <stdexec::connect::connect_t, stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::__receivers::set_error_t, cudaError_t>, std::tuple<stdexec::receivers::set_value_t>>>, stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::sync_wait::receiver<>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>>>, __env_t>::rcvr_, lambda [](auto )->decltype(auto) noexcept{}>::t> at line 6793 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/execution.hpp" instantiation of "auto stdexec::sync_wait::__diagnose_error<_Sender>() [with _Sender=stdexec::__sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>]" at line 119 of "/global/homes/w/wwei/src/hpcpp/apps/heat-equation/heat-equation-stdexec.cpp" instantiation of "void heat_equation(stdexec::scheduler auto, Real_t , Real_t , Real_t , Real_t, Real_t, int, int, bool) [with =exec::static_thread_pool::scheduler]" at line 169 of "/global/homes/w/wwei/src/hpcpp/apps/heat-equation/heat-equation-stdexec.cpp"

"/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/detail/basic_sender.hpp", line 162: error: no instance of function template "stdexec::sexpr<_ImplFn>::apply [with _ImplFn=lambda [](_Cvref, _Fun &&) mutable->decltype(())]" matches the argument list argument types are: (stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::detail::get_data) object type is: stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())> return sndr.apply((_Sender&&) sndr, get_data()); ^ detected during: instantiation of "decltype(auto) stdexec::detail::default_basis_ops::get_state(_Sender &&, _Receiver &) [with _Sender=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple>>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::bulk::bulk_t, int, lambda ->void>>, stdexec::__schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_stopped_t>, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::t]" at line 186 instantiation of type "stdexec::detail::state_type_t<stdexec::just::just_t, stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple>>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::t>" at line 226 instantiation of class "stdexec::detail::op_base<_Sexpr, _Receiver> [with _Sexpr=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::detail::receiver_with<&stdexec::_write::operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_value_t>>>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::t]" at line 299 instantiation of class "stdexec::detail::op_state<_Sexpr, _Receiver> [with _Sexpr=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::detail::receiver_with<&stdexec::_write::operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_value_t>>>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::__t]" at line 409 instantiation of "stdexec::tag_invoke" based on template arguments <stdexec::connect::connect_t, stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::detail::receiver_with<&stdexec::_write::operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_value_t>>>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::t> at line 328 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/detail/meta.hpp" [ 2 instantiation contexts not shown ] instantiation of type "stdexec::call_result_t<stdexec::__connect::connect_t, stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>>>" at line 130 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/detail/execution_fwd.hpp" instantiation of type "stdexec::connect_result_t<stdexec::__sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::bulk::bulk_t, int, lambda ->void>>, stdexec::__schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_stopped_t>, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>>>" at line 247 of "/global/homes/w/wwei/src/hpcpp/apps/heat-equation/../../include/repeat_n/repeat_n.cuh" instantiation of class "repeat_n_detail::operation_state_t<SenderId, Closure, ReceiverId> [with SenderId=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, Closure=stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::bulk::bulk_t, int, lambda ->void>>, ReceiverId=stdexec::__schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_stopped_t>, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>]" at line 6793 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/execution.hpp" instantiation of "auto stdexec::sync_wait::__diagnose_error<_Sender>() [with _Sender=stdexec::__sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>]" at line 119 of "/global/homes/w/wwei/src/hpcpp/apps/heat-equation/heat-equation-stdexec.cpp" instantiation of "void heat_equation(stdexec::scheduler auto, Real_t , Real_t , Real_t *, Real_t, Real_t, int, int, bool) [with =exec::static_thread_pool::scheduler]" at line 169 of "/global/homes/w/wwei/src/hpcpp/apps/heat-equation/heat-equation-stdexec.cpp"

"/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/detail/basic_sender.hpp", line 308: error: no instance of function template "stdexec::sexpr<_ImplFn>::apply [with _ImplFn=lambda [](_Cvref, _Fun &&) mutable->decltype(())]" matches the argument list argument types are: (stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::detail::connect_fn<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::detail::receiver_with<&stdexec::_write::operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_value_t>>>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::t>) object type is: stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())> return __sexpr.apply((_Sexpr&&) sexpr, connect_t{self}); ^ detected during: instantiation of "auto stdexec::detail::__op_state<_Sexpr, _Receiver>::connect(stdexec::detail::op_state<_Sexpr, _Receiver> , _Sexpr &&)->stdexec::call_result_t<stdexec::detail::impl_of<_Sexpr>, stdexec::copy_cvref_fn<_Sexpr>, stdexec::detail::op_state<_Sexpr, _Receiver>::connect_t> [with _Sexpr=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple>>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, __env_t>::_rcvr, lambda [](auto )->decltype(auto) noexcept{}>>>>>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>::t]" at line 322 instantiation of "stdexec::detail::op_state<_Sexpr, _Receiver>::op_state(_Sexpr &&, _Receiver) [with _Sexpr=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple>>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::t]" at line 168 instantiation of "auto stdexec::detail::default_basis_ops::connect(_Sender &&, _Receiver)->stdexec::detail::op_state<_Sender, _Receiver> [with _Sender=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::detail::receiver_with<&stdexec::_write::operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple<stdexec::receivers::set_value_t>>>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::t]" at line 413 instantiation of "auto stdexec::tag_invoke(_Tag, _Self &&, _Receiver &&)->stdexec::msecond<stdexec::__if_c<stdexec::std_concepts::same_as<...>, void>, decltype(())> [with _Tag=stdexec::connect::connect_t, _Self=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple>>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::t]" at line 347 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/functional.hpp" instantiation of "auto stdexec::tag_invoke::tag_invoke_t::operator()(_Tag, _Args &&...) const->stdexec::tag_invoke::tag_invoke_result_t<_Tag, _Args...> [with _Tag=stdexec::connect::connect_t, _Args=<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::detail::receiver_with<&stdexec::write_::__operation_base<stdexec::schedule_from::receiver1<exec::static_thread_pool::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple>>, repeat_n_detail::receiver_t<repeat_n_detail::operation_state_t<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::closure::compose<stdexec::closure::compose<stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::closure::binder_back<stdexec::__bulk::bulk_t, int, lambda ->void>>, stdexec::schedule_from::receiver1<stdexec::loop::run_loop::scheduler::id, stdexec::_Yp<std::variant<std::monostate, std::tuple, std::tuple<stdexec::receivers::set_error_t, std::exception_ptr::exception_ptr>, std::tuple<stdexec::receivers::set_error_t, cudaError_t>, std::tuple>>, stdexec::detail::receiver_with<&stdexec::write_::operation_base<stdexec::__sync_wait::receiver<>, env_t>::_rcvr, lambda [](auto *)->decltype(auto) noexcept{}>>>>>, env_t>::rcvr_, lambda [](auto *)->decltype(auto) noexcept{}>::t>]" at line 2163 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/execution.hpp" [ 38 instantiation contexts not shown ] instantiation of "auto stdexec::tag_invoke(_Tag, _Self &&, _Receiver &&)->stdexec::msecond<stdexec::__if_c<stdexec::std_concepts::same_as<...>, void>, decltype(())> [with _Tag=stdexec::connect::connect_t, _Self=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::sync_wait::receiver<>::t]" at line 347 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/functional.hpp" instantiation of "auto stdexec::__tag_invoke::tag_invoke_t::operator()(_Tag, _Args &&...) const->stdexec::tag_invoke::tag_invoke_result_t<_Tag, _Args...> [with _Tag=stdexec::connect::connect_t, _Args=<stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, stdexec::sync_wait::receiver<>::t>]" at line 2163 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/execution.hpp" instantiation of "auto stdexec::__connect::connect_t::operator()(_Sender &&, _Receiver &&) const->stdexec::call_result_t<stdexec::connect::connect_t::__select_impl_t<_Sender, _Receiver>> [with _Sender=stdexec::sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>, _Receiver=stdexec::sync_wait::receiver<>::t]" at line 6848 of "/global/homes/w/wwei/src/hpcpp/build_main/_deps/stdexec-src/include/stdexec/execution.hpp" instantiation of "auto stdexec::__sync_wait::sync_wait_t::apply_sender(_Sender &&) const->std::optional<stdexec::sync_wait::__sync_wait_result_t<_Sender>> [with _Sender=stdexec::__sexpr<lambda [](_Cvref, _Fun &&) mutable->decltype(())>]" at line 119 of "/global/homes/w/wwei/src/hpcpp/apps/heat-equation/heat-equation-stdexec.cpp" instantiation of "void heat_equation(stdexec::scheduler auto, Real_t , Real_t , Real_t *, Real_t, Real_t, int, int, bool) [with =exec::static_thread_pool::scheduler]" at line 169 of "/global/homes/w/wwei/src/hpcpp/apps/heat-equation/heat-equation-stdexec.cpp"

ericniebler commented 11 months ago

@weilewei is it possible for you to give us a self-contained repro of the issue? The bit of code you link to has dependencies on other parts of your app.

weilewei commented 10 months ago

@ericniebler and @maikel, we found out the issue is on our end after some debugging. The fixes are 1) we forgot to enable CMAKE_GNU_EXTENSIONS and 2) some updates are needed for our local copy on repeat_n.cuh. details: https://github.com/NERSC/hpcpp/pull/18.

I am closing issue.

ericniebler commented 10 months ago

from NERSC/hpcpp#18:

Probably a recent in stdexec fails compilation without GNU exts which triggered this

I would consider that a stdexec bug. we should have fallbacks for any language extensions we use. i'll investigate, thanks.