diff --git a/.circleci/config.yml b/.circleci/config.yml index 2111850e65..69ac4fc5dc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,7 @@ setup_arm64_machine: &setup_arm64_machine docker_default: &docker_default docker: - - image: pikaorg/pika-ci-base:14 + - image: pikaorg/pika-ci-base:15 defaults: &defaults <<: *working_dir_default diff --git a/.github/workflows/linux_coverage.yml b/.github/workflows/linux_coverage.yml index cc2182ac36..508be29380 100644 --- a/.github/workflows/linux_coverage.yml +++ b/.github/workflows/linux_coverage.yml @@ -15,7 +15,7 @@ jobs: build: name: github/linux/coverage runs-on: ubuntu-latest - container: pikaorg/pika-ci-base:14 + container: pikaorg/pika-ci-base:15 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/linux_debug.yml b/.github/workflows/linux_debug.yml index f9e68ee529..0aa4b251dd 100644 --- a/.github/workflows/linux_debug.yml +++ b/.github/workflows/linux_debug.yml @@ -20,7 +20,7 @@ jobs: build: name: github/linux/debug/fast runs-on: ubuntu-latest - container: pikaorg/pika-ci-base:14 + container: pikaorg/pika-ci-base:15 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/linux_hip.yml b/.github/workflows/linux_hip.yml index f4c63adc75..7ea639155e 100644 --- a/.github/workflows/linux_hip.yml +++ b/.github/workflows/linux_hip.yml @@ -20,7 +20,7 @@ jobs: build: name: github/linux/hip/fast runs-on: ubuntu-latest - container: pikaorg/pika-ci-hip:7 + container: pikaorg/pika-ci-hip:8 steps: - uses: actions/checkout@v3 - name: Update apt repositories for ccache diff --git a/.github/workflows/linux_release_fetchcontent.yml b/.github/workflows/linux_release_fetchcontent.yml index d3608e1387..d618cc3d04 100644 --- a/.github/workflows/linux_release_fetchcontent.yml +++ b/.github/workflows/linux_release_fetchcontent.yml @@ -20,7 +20,7 @@ jobs: build: name: github/linux/fetchcontent/fast runs-on: ubuntu-latest - container: pikaorg/pika-ci-base:14 + container: pikaorg/pika-ci-base:15 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/linux_sanitizers.yml b/.github/workflows/linux_sanitizers.yml index 2a04cdfa4e..e5ecb049cf 100644 --- a/.github/workflows/linux_sanitizers.yml +++ b/.github/workflows/linux_sanitizers.yml @@ -20,7 +20,7 @@ jobs: build: name: github/linux/sanitizers/fast runs-on: ubuntu-latest - container: pikaorg/pika-ci-base:14 + container: pikaorg/pika-ci-base:15 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/linux_tracy.yml b/.github/workflows/linux_tracy.yml index 43f9601757..c5150ff45a 100644 --- a/.github/workflows/linux_tracy.yml +++ b/.github/workflows/linux_tracy.yml @@ -20,7 +20,7 @@ jobs: build: name: github/linux/tracy/fast runs-on: ubuntu-latest - container: pikaorg/pika-ci-base:14 + container: pikaorg/pika-ci-base:15 steps: - name: Check out Tracy diff --git a/.jenkins/cscs-ault/env-hipcc.sh b/.jenkins/cscs-ault/env-hipcc.sh index 3a95f02a32..5cdc4e5e16 100644 --- a/.jenkins/cscs-ault/env-hipcc.sh +++ b/.jenkins/cscs-ault/env-hipcc.sh @@ -12,7 +12,7 @@ hip_version="5.3.3" hwloc_version="2.6.0" spack_compiler="gcc@${gcc_version}" spack_arch="linux-centos8-zen" -stdexec_version="c0fe16f451137b00ceb85d912ec3a288990ce766" +stdexec_version="6510f5bd69cc03b24668f26eda3dd3cca7e81bb2" # The xnack- architectures are not supported by rocblas@5.3.3 spack_spec="pika@main+rocm+p2300 amdgpu_target='gfx906:xnack-' arch=${spack_arch} %${spack_compiler} malloc=system cxxstd=${cxx_std} ^boost@${boost_version} ^hwloc@${hwloc_version} ^hip@${hip_version} ^whip amdgpu_target='gfx906:xnack-' ^stdexec@${stdexec_version}" diff --git a/.jenkins/cscs/env-clang-13.sh b/.jenkins/cscs/env-clang-13.sh index d46dac2eca..a0053f539a 100644 --- a/.jenkins/cscs/env-clang-13.sh +++ b/.jenkins/cscs/env-clang-13.sh @@ -10,7 +10,7 @@ boost_version="1.79.0" hwloc_version="2.6.0" spack_compiler="clang@${clang_version}" spack_arch="cray-cnl7-broadwell" -stdexec_version="c0fe16f451137b00ceb85d912ec3a288990ce766" +stdexec_version="6510f5bd69cc03b24668f26eda3dd3cca7e81bb2" spack_spec="pika@main arch=${spack_arch} %${spack_compiler} cxxflags=-stdlib=libc++ malloc=system cxxstd=${cxx_std} +p2300 ^boost@${boost_version} ^hwloc@${hwloc_version} ^fmt cxxflags=-stdlib=libc++ ^stdexec@${stdexec_version}" diff --git a/.jenkins/cscs/env-clang-14-cuda.sh b/.jenkins/cscs/env-clang-14-cuda.sh index b7f8db6fad..b945872b23 100644 --- a/.jenkins/cscs/env-clang-14-cuda.sh +++ b/.jenkins/cscs/env-clang-14-cuda.sh @@ -11,7 +11,7 @@ hwloc_version="2.7.0" cuda_version="11.5.0" spack_compiler="clang@${clang_version}" spack_arch="cray-cnl7-haswell" -stdexec_version="c0fe16f451137b00ceb85d912ec3a288990ce766" +stdexec_version="6510f5bd69cc03b24668f26eda3dd3cca7e81bb2" spack_spec="pika@main arch=${spack_arch} %${spack_compiler} +cuda malloc=system cxxstd=${cxx_std} +p2300 ^boost@${boost_version} ^cuda@${cuda_version} +allow-unsupported-compilers ^hwloc@${hwloc_version} ^stdexec@${stdexec_version}" diff --git a/README.rst b/README.rst index 8d03ecdd8b..42f1d17748 100644 --- a/README.rst +++ b/README.rst @@ -49,8 +49,8 @@ pika optionally requires: * `Boost.Context, Thread, and Chrono `_ on macOS * `stdexec `_ when ``PIKA_WITH_P2300_REFERENCE_IMPLEMENTATION`` is enabled (currently tested with commit - `c0fe16f451137b00ceb85d912ec3a288990ce766 - `). + `6510f5bd69cc03b24668f26eda3dd3cca7e81bb2 + `). The integration is experimental. diff --git a/libs/pika/async_cuda/include/pika/async_cuda/then_on_host.hpp b/libs/pika/async_cuda/include/pika/async_cuda/then_on_host.hpp index f61b8b8792..712bc6b0d7 100644 --- a/libs/pika/async_cuda/include/pika/async_cuda/then_on_host.hpp +++ b/libs/pika/async_cuda/include/pika/async_cuda/then_on_host.hpp @@ -39,6 +39,8 @@ namespace pika::cuda::experimental { struct then_on_host_receiver_impl::then_on_host_receiver_type { + using is_receiver = void; + PIKA_NO_UNIQUE_ADDRESS std::decay_t receiver; PIKA_NO_UNIQUE_ADDRESS std::decay_t f; cuda_scheduler sched; @@ -117,7 +119,7 @@ namespace pika::cuda::experimental { }); } - friend constexpr pika::execution::experimental::detail::empty_env + friend constexpr pika::execution::experimental::empty_env tag_invoke(pika::execution::experimental::get_env_t, then_on_host_receiver_type const&) noexcept { @@ -138,6 +140,8 @@ namespace pika::cuda::experimental { template struct then_on_host_sender_impl::then_on_host_sender_type { + using is_sender = void; + std::decay_t sender; std::decay_t f; cuda_scheduler sched; @@ -169,7 +173,7 @@ namespace pika::cuda::experimental { using completion_signatures = pika::execution::experimental::make_completion_signatures< - Sender, pika::execution::experimental::detail::empty_env, + Sender, pika::execution::experimental::empty_env, pika::execution::experimental::completion_signatures< pika::execution::experimental::set_error_t( std::exception_ptr)>, @@ -226,12 +230,11 @@ namespace pika::cuda::experimental { PIKA_FORWARD(Receiver, receiver), s.f, s.sched}); } - friend cuda_scheduler tag_invoke( - pika::execution::experimental::get_completion_scheduler_t< - pika::execution::experimental::set_value_t>, - then_on_host_sender_type const& s) noexcept + friend constexpr auto tag_invoke( + pika::execution::experimental::get_env_t, + then_on_host_sender_type const& s) { - return s.sched; + return pika::execution::experimental::get_env(s.sender); } }; } // namespace then_on_host_detail diff --git a/libs/pika/async_cuda/include/pika/async_cuda/then_with_stream.hpp b/libs/pika/async_cuda/include/pika/async_cuda/then_with_stream.hpp index 65036c39bf..c83ece7c91 100644 --- a/libs/pika/async_cuda/include/pika/async_cuda/then_with_stream.hpp +++ b/libs/pika/async_cuda/include/pika/async_cuda/then_with_stream.hpp @@ -149,6 +149,8 @@ namespace pika::cuda::experimental::then_with_stream_detail { struct then_with_cuda_stream_sender_impl::then_with_cuda_stream_sender_type { + using is_sender = void; + PIKA_NO_UNIQUE_ADDRESS std::decay_t sender; PIKA_NO_UNIQUE_ADDRESS std::decay_t f; cuda_scheduler sched; @@ -185,8 +187,7 @@ namespace pika::cuda::experimental::then_with_stream_detail { using completion_signatures = pika::execution::experimental::make_completion_signatures< - std::decay_t, - pika::execution::experimental::detail::empty_env, + std::decay_t, pika::execution::experimental::empty_env, pika::execution::experimental::completion_signatures< pika::execution::experimental::set_error_t( std::exception_ptr)>, @@ -249,6 +250,7 @@ namespace pika::cuda::experimental::then_with_stream_detail { struct then_with_cuda_stream_receiver { + using is_receiver = void; using then_with_cuda_stream_receiver_tag = void; operation_state& op_state; @@ -465,10 +467,9 @@ namespace pika::cuda::experimental::then_with_stream_detail { }); } - friend constexpr pika::execution::experimental::detail:: - empty_env - tag_invoke(pika::execution::experimental::get_env_t, - then_with_cuda_stream_receiver const&) noexcept + friend constexpr pika::execution::experimental::empty_env + tag_invoke(pika::execution::experimental::get_env_t, + then_with_cuda_stream_receiver const&) noexcept { return {}; } @@ -502,8 +503,8 @@ namespace pika::cuda::experimental::then_with_stream_detail { pika::util::detail::transform_t< pika::execution::experimental::value_types_of_t< std::decay_t, - pika::execution::experimental::detail::empty_env, - std::tuple, pika::detail::variant>, + pika::execution::experimental::empty_env, std::tuple, + pika::detail::variant>, value_types_helper>, pika::detail::monostate>; #else @@ -551,7 +552,7 @@ namespace pika::cuda::experimental::then_with_stream_detail { pika::util::detail::transform_t< pika::execution::experimental::value_types_of_t< then_with_cuda_stream_sender_type, - pika::execution::experimental::detail::empty_env, + pika::execution::experimental::empty_env, pika::util::detail::pack, pika::util::detail::pack>, result_types_helper>, pika::detail::monostate>>>; @@ -603,12 +604,11 @@ namespace pika::cuda::experimental::then_with_stream_detail { PIKA_FORWARD(Receiver, receiver), s.f, s.sched, s.sender); } - friend cuda_scheduler tag_invoke( - pika::execution::experimental::get_completion_scheduler_t< - pika::execution::experimental::set_value_t>, - then_with_cuda_stream_sender_type const& s) noexcept + friend constexpr auto tag_invoke( + pika::execution::experimental::get_env_t, + then_with_cuda_stream_sender_type const& s) { - return s.sched; + return pika::execution::experimental::get_env(s.sender); } }; @@ -619,7 +619,8 @@ namespace pika::cuda::experimental::then_with_stream_detail { { auto completion_sched = pika::execution::experimental::get_completion_scheduler< - pika::execution::experimental::set_value_t>(sender); + pika::execution::experimental::set_value_t>( + pika::execution::experimental::get_env(sender)); static_assert(std::is_same_v, cuda_scheduler>, "then_with_cuda_stream can only be used with senders whose " diff --git a/libs/pika/async_mpi/include/pika/async_mpi/transform_mpi.hpp b/libs/pika/async_mpi/include/pika/async_mpi/transform_mpi.hpp index 18b1bb8a77..0edf35339b 100644 --- a/libs/pika/async_mpi/include/pika/async_mpi/transform_mpi.hpp +++ b/libs/pika/async_mpi/include/pika/async_mpi/transform_mpi.hpp @@ -101,6 +101,8 @@ namespace pika::mpi::experimental { template struct transform_mpi_sender_impl::transform_mpi_sender_type { + using is_sender = void; + std::decay_t sender; std::decay_t f; stream_type stream; @@ -117,7 +119,7 @@ namespace pika::mpi::experimental { using completion_signatures = pika::execution::experimental::make_completion_signatures< std::decay_t, - pika::execution::experimental::detail::empty_env, + pika::execution::experimental::empty_env, pika::execution::experimental::completion_signatures< pika::execution::experimental::set_error_t( std::exception_ptr)>, @@ -164,6 +166,8 @@ namespace pika::mpi::experimental { struct transform_mpi_receiver { + using is_receiver = void; + operation_state& op_state; template @@ -264,10 +268,9 @@ namespace pika::mpi::experimental { }); } - friend constexpr pika::execution::experimental::detail:: - empty_env - tag_invoke(pika::execution::experimental::get_env_t, - transform_mpi_receiver const&) noexcept + friend constexpr pika::execution::experimental::empty_env + tag_invoke(pika::execution::experimental::get_env_t, + transform_mpi_receiver const&) noexcept { return {}; } @@ -290,7 +293,7 @@ namespace pika::mpi::experimental { pika::util::detail::transform_t< pika::execution::experimental::value_types_of_t< std::decay_t, - pika::execution::experimental::detail::empty_env, + pika::execution::experimental::empty_env, std::tuple, pika::detail::variant>, value_types_helper>, pika::detail::monostate>; @@ -342,8 +345,7 @@ namespace pika::mpi::experimental { pika::util::detail::transform_t< pika::execution::experimental::value_types_of_t< transform_mpi_sender_type, - pika::execution::experimental::detail:: - empty_env, + pika::execution::experimental::empty_env, pika::util::detail::pack, pika::util::detail::pack>, result_types_helper>, diff --git a/libs/pika/execution/include/pika/execution/algorithms/bulk.hpp b/libs/pika/execution/include/pika/execution/algorithms/bulk.hpp index c48c1961cb..173d06125b 100644 --- a/libs/pika/execution/include/pika/execution/algorithms/bulk.hpp +++ b/libs/pika/execution/include/pika/execution/algorithms/bulk.hpp @@ -64,20 +64,10 @@ namespace pika::bulk_detail { static constexpr bool sends_done = false; - template && - pika::execution::experimental::detail::has_completion_scheduler_v< - CPO, std::decay_t>) - // clang-format on - > - friend constexpr auto tag_invoke( - pika::execution::experimental::get_completion_scheduler_t, - bulk_sender_type const& sender) + friend constexpr decltype(auto) tag_invoke( + pika::execution::experimental::get_env_t, bulk_sender_type const& s) { - return pika::execution::experimental::get_completion_scheduler( - sender.sender); + return pika::execution::experimental::get_env(s.sender); } template @@ -183,7 +173,8 @@ namespace pika::execution::experimental { { auto scheduler = pika::execution::experimental::get_completion_scheduler< - pika::execution::experimental::set_value_t>(sender); + pika::execution::experimental::set_value_t>( + tag_invoke(pika::execution::experimental::get_env, sender)); return pika::functional::tag_invoke(bulk_t{}, PIKA_MOVE(scheduler), PIKA_FORWARD(Sender, sender), shape, PIKA_FORWARD(F, f)); } diff --git a/libs/pika/execution/include/pika/execution/algorithms/drop_value.hpp b/libs/pika/execution/include/pika/execution/algorithms/drop_value.hpp index 942642192c..9b31f0e255 100644 --- a/libs/pika/execution/include/pika/execution/algorithms/drop_value.hpp +++ b/libs/pika/execution/include/pika/execution/algorithms/drop_value.hpp @@ -34,6 +34,8 @@ namespace pika::drop_value_detail { template struct drop_value_receiver_impl::drop_value_receiver_type { + using is_receiver = void; + PIKA_NO_UNIQUE_ADDRESS std::decay_t receiver; template @@ -57,8 +59,8 @@ namespace pika::drop_value_detail { pika::execution::experimental::set_value(PIKA_MOVE(r.receiver)); } - friend constexpr pika::execution::experimental::detail::empty_env - tag_invoke(pika::execution::experimental::get_env_t, + friend constexpr pika::execution::experimental::empty_env tag_invoke( + pika::execution::experimental::get_env_t, drop_value_receiver_type const&) noexcept { return {}; @@ -78,6 +80,8 @@ namespace pika::drop_value_detail { template struct drop_value_sender_impl::drop_value_sender_type { + using is_sender = void; + PIKA_NO_UNIQUE_ADDRESS std::decay_t sender; #if defined(PIKA_HAVE_P2300_REFERENCE_IMPLEMENTATION) @@ -88,7 +92,7 @@ namespace pika::drop_value_detail { using completion_signatures = pika::execution::experimental::make_completion_signatures, empty_set_value>; #else @@ -106,22 +110,6 @@ namespace pika::drop_value_detail { static constexpr bool sends_done = false; #endif - template && - pika::execution::experimental::detail::has_completion_scheduler_v< - CPO, std::decay_t>) - // clang-format on - > - friend constexpr auto tag_invoke( - pika::execution::experimental::get_completion_scheduler_t, - drop_value_sender_type const& sender) - { - return pika::execution::experimental::get_completion_scheduler( - sender.sender); - } - template friend auto tag_invoke(pika::execution::experimental::connect_t, drop_value_sender_type&& s, Receiver&& receiver) @@ -139,6 +127,13 @@ namespace pika::drop_value_detail { drop_value_receiver{ PIKA_FORWARD(Receiver, receiver)}); } + + friend constexpr decltype(auto) tag_invoke( + pika::execution::experimental::get_env_t, + drop_value_sender_type const& s) + { + return pika::execution::experimental::get_env(s.sender); + } }; } // namespace pika::drop_value_detail diff --git a/libs/pika/execution/include/pika/execution/algorithms/keep_future.hpp b/libs/pika/execution/include/pika/execution/algorithms/keep_future.hpp index b44c7feb48..5c93152d6a 100644 --- a/libs/pika/execution/include/pika/execution/algorithms/keep_future.hpp +++ b/libs/pika/execution/include/pika/execution/algorithms/keep_future.hpp @@ -62,6 +62,8 @@ namespace pika::keep_future_detail { template struct keep_future_sender_base { + using is_sender = void; + std::decay_t future; template