From 5540f17522bc64d9e6b463509e207b2cb4a40c4c Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Wed, 23 Oct 2024 11:51:03 +0200 Subject: [PATCH 1/2] Add clang 19 CI configuration --- .gitlab/includes/clang19_pipeline.yml | 58 ++++++++++++++++++++++ .gitlab/includes/common_spack_pipeline.yml | 2 +- .gitlab/pipelines_on_merge.yml | 1 + 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 .gitlab/includes/clang19_pipeline.yml diff --git a/.gitlab/includes/clang19_pipeline.yml b/.gitlab/includes/clang19_pipeline.yml new file mode 100644 index 000000000..52a735916 --- /dev/null +++ b/.gitlab/includes/clang19_pipeline.yml @@ -0,0 +1,58 @@ +# Copyright (c) 2023 ETH Zurich +# +# SPDX-License-Identifier: BSL-1.0 +# Distributed under the Boost Software License, Version 1.0. (See accompanying +# file BOOST_LICENSE_1_0.rst or copy at http://www.boost.org/LICENSE_1_0.txt) + +include: + - local: '.gitlab/includes/common_pipeline.yml' + - local: '.gitlab/includes/common_spack_pipeline.yml' + +.variables_clang19_config: + variables: + SPACK_ARCH: linux-ubuntu22.04-zen2 + COMPILER: clang@19.1.0 + CXXSTD: 23 + SPACK_SPEC: "pika@main arch=$SPACK_ARCH %${COMPILER} \ + cxxflags=-stdlib=libc++ cxxflags=-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG \ + malloc=system \ + cxxstd=$CXXSTD +stdexec ^boost@1.86.0 ^hwloc@2.11.1 \ + ^fmt cxxflags=-stdlib=libc++ cxxflags=-DLIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG \ + ^spdlog cxxflags=-stdlib=libc++ cxxflags=-DLIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG \ + ^stdexec@24.09" + CMAKE_FLAGS: "-DPIKA_WITH_CXX_STANDARD=$CXXSTD \ + -DCMAKE_CXX_FLAGS='-stdlib=libc++ -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG' \ + -DPIKA_WITH_MALLOC=system -DPIKA_WITH_SPINLOCK_DEADLOCK_DETECTION=ON \ + -DPIKA_WITH_STDEXEC=ON" + +clang19_spack_compiler_image: + extends: + - .variables_clang19_config + - .compiler_image_template_rosa + +clang19_spack_image: + needs: [clang19_spack_compiler_image] + extends: + - .variables_clang19_config + - .dependencies_image_template_rosa + +clang19_build: + needs: [clang19_spack_image] + extends: + - .variables_clang19_config + - .build_template_rosa + +.clang19_test_common: + needs: [clang19_build] + extends: + - .variables_clang19_config + - .test_common_eiger_mc + - .test_template + +clang19_test_release: + extends: [.clang19_test_common] + image: $PERSIST_IMAGE_NAME_RELEASE + +clang19_test_debug: + extends: [.clang19_test_common] + image: $PERSIST_IMAGE_NAME_DEBUG diff --git a/.gitlab/includes/common_spack_pipeline.yml b/.gitlab/includes/common_spack_pipeline.yml index 753f3497e..6c8ef3aaf 100644 --- a/.gitlab/includes/common_spack_pipeline.yml +++ b/.gitlab/includes/common_spack_pipeline.yml @@ -8,7 +8,7 @@ include: - local: '.gitlab/includes/common_pipeline.yml' variables: - SPACK_COMMIT: develop-2024-09-15 + SPACK_COMMIT: develop-2024-10-06 .base_spack_image: timeout: 1 hours diff --git a/.gitlab/pipelines_on_merge.yml b/.gitlab/pipelines_on_merge.yml index 9989c8888..7d201d119 100644 --- a/.gitlab/pipelines_on_merge.yml +++ b/.gitlab/pipelines_on_merge.yml @@ -21,4 +21,5 @@ include: - local: '.gitlab/includes/clang16_pipeline.yml' - local: '.gitlab/includes/clang17_pipeline.yml' - local: '.gitlab/includes/clang18_pipeline.yml' + - local: '.gitlab/includes/clang19_pipeline.yml' - local: '.gitlab/includes/nvhpc24_7_pipeline.yml' From accda7408346cc992ff57af22090e9b4dfaa5da5 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Thu, 31 Oct 2024 10:03:20 +0100 Subject: [PATCH 2/2] Remove unused member functions from deque_anchor Starting with clang 19, the unused member functions cas that take a deque_anchor fail to compile because they attempt to call load directly on the deque_anchor type, whereas they should be calling load on the atomic stored in the deque_anchor. Neither GCC nor clang until version 18 failed to compile the broken member functions (because they were unused they were never instantiatied). Since the functions are unused, simply remove them. Related llvm issue: https://github.com/llvm/llvm-project/issues/102177. --- .../include/pika/concurrency/deque.hpp | 41 ------------------- 1 file changed, 41 deletions(-) diff --git a/libs/pika/concurrency/include/pika/concurrency/deque.hpp b/libs/pika/concurrency/include/pika/concurrency/deque.hpp index 5eb8da8d1..83007ddd0 100644 --- a/libs/pika/concurrency/include/pika/concurrency/deque.hpp +++ b/libs/pika/concurrency/include/pika/concurrency/deque.hpp @@ -123,47 +123,6 @@ namespace pika::concurrency::detail { pair lrs(std::memory_order mo = std::memory_order_acquire) const { return pair_.load(mo); } - node* left(std::memory_order mo = std::memory_order_acquire) const - { - return pair_.load(mo).get_left_ptr(); - } - - node* right(std::memory_order mo = std::memory_order_acquire) const - { - return pair_.load(mo).get_right_ptr(); - } - - tag_t status(std::memory_order mo = std::memory_order_acquire) const - { - return pair_.load(mo).get_left_tag(); - } - - tag_t tag(std::memory_order mo = std::memory_order_acquire) const - { - return pair_.load(mo).get_right_tag(); - } - - bool cas(deque_anchor& expected, deque_anchor const& desired, - std::memory_order mo = std::memory_order_acq_rel) - { - return pair_.compare_exchange_strong(expected.load(std::memory_order_acquire), - desired.load(std::memory_order_acquire), mo); - } - - bool cas(pair& expected, deque_anchor const& desired, - std::memory_order mo = std::memory_order_acq_rel) - { - return pair_.compare_exchange_strong( - expected, desired.load(std::memory_order_acquire), mo); - } - - bool cas(deque_anchor& expected, pair const& desired, - std::memory_order mo = std::memory_order_acq_rel) - { - return pair_.compare_exchange_strong( - expected.load(std::memory_order_acquire), desired, mo); - } - bool cas( pair& expected, pair const& desired, std::memory_order mo = std::memory_order_acq_rel) {