Skip to content

Commit

Permalink
Merge #6277
Browse files Browse the repository at this point in the history
6277: add llvm/15, gcc/13 and boost/1.82 to jenkins r=hkaiser a=akheir



## Proposed Changes

  - Remove gcc/9 and clang/11 from jenkins builders
  -  Add gcc/12 and clang/15 to the builders
  - Add boost 1.82



Co-authored-by: Alireza Kheirkhahan <kheirkhahan@gmail.com>
Co-authored-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>
  • Loading branch information
3 people committed Jun 23, 2023
2 parents 4aa2e74 + ede59e9 commit 1cbb0d6
Show file tree
Hide file tree
Showing 31 changed files with 217 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .jenkins/lsu/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pipeline {
axes {
axis {
name 'configuration_name'
values 'gcc-9', 'gcc-10', 'gcc-11', 'gcc-12', 'clang-11', 'clang-12', 'clang-13', 'clang-14', 'gcc-10-cuda-11', 'gcc-12-cuda-12-dgx', 'hipcc'
values 'gcc-10', 'gcc-11', 'gcc-12', 'gcc-13', 'clang-12', 'clang-13', 'clang-14', 'clang-15', 'gcc-10-cuda-11', 'gcc-12-cuda-12-dgx', 'hipcc'
}
axis {
name 'build_type'
Expand Down
36 changes: 36 additions & 0 deletions .jenkins/lsu/env-clang-15.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (c) 2020 ETH Zurich
#
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

module purge
module load cmake
module load llvm/15
module load boost/1.82.0-${build_type,,}
module load hwloc
module load openmpi
module load pwrapi/1.1.1

export HPXRUN_RUNWRAPPER=srun
export CXX_STD="20"

configure_extra_options+=" -DCMAKE_BUILD_TYPE=${build_type}"
configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}"
configure_extra_options+=" -DHPX_WITH_MALLOC=system"
configure_extra_options+=" -DHPX_WITH_FETCH_ASIO=ON"
configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS=ON"
configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=ON"
configure_extra_options+=" -DHPX_WITH_PARCELPORT_MPI=ON"
configure_extra_options+=" -DHPX_WITH_PARCELPORT_LCI=ON"
configure_extra_options+=" -DHPX_WITH_FETCH_LCI=ON"
configure_extra_options+=" -DHPX_WITH_LOGGING=OFF"
configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE"
configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON"

# The pwrapi library still needs to be set up properly on rostam
# configure_extra_options+=" -DHPX_WITH_POWER_COUNTER=ON"

# Make sure HWLOC does not report 'cores'. This is purely an option to enable
# testing the topology code under conditions close to those on FreeBSD.
configure_extra_options+=" -DHPX_TOPOLOGY_WITH_ADDITIONAL_HWLOC_TESTING=ON"
31 changes: 31 additions & 0 deletions .jenkins/lsu/env-gcc-13.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2020 ETH Zurich
#
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

module purge
module load cmake
module load gcc/13
module load boost/1.82.0-${build_type,,}
module load hwloc
module load openmpi
module load pwrapi/1.1.1

export HPXRUN_RUNWRAPPER=srun
export CXX_STD="20"

configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}"
configure_extra_options+=" -DHPX_WITH_MALLOC=system"
configure_extra_options+=" -DHPX_WITH_FETCH_ASIO=ON"
configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS=ON"
configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=ON"
configure_extra_options+=" -DHPX_WITH_PARCELPORT_MPI=ON"
configure_extra_options+=" -DHPX_WITH_PARCELPORT_LCI=ON"
configure_extra_options+=" -DHPX_WITH_FETCH_LCI=ON"
configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE"
configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON"
configure_extra_options+=" -DHPX_WITH_EVE_TAG=main"

# The pwrapi library still needs to be set up properly on rostam
# configure_extra_options+=" -DHPX_WITH_POWER_COUNTER=ON"
8 changes: 8 additions & 0 deletions .jenkins/lsu/slurm-configuration-clang-15.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2020 ETH Zurich
#
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

configuration_slurm_partition="jenkins-compute"
configuration_slurm_num_nodes="1"
8 changes: 8 additions & 0 deletions .jenkins/lsu/slurm-configuration-gcc-13.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2020 ETH Zurich
#
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

configuration_slurm_partition="jenkins-compute"
configuration_slurm_num_nodes="1"
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1842,8 +1842,6 @@ if(HPX_WITH_COMPILER_WARNINGS)

else() # Trial and error approach for any other compiler ...
hpx_add_compile_flag_if_available(-Wall)
hpx_add_compile_flag_if_available(-Wextra)
hpx_add_compile_flag_if_available(-Wpedantic)
hpx_add_compile_flag_if_available(-Wno-strict-aliasing)
hpx_add_compile_flag_if_available(-Wno-sign-promo)
hpx_add_compile_flag_if_available(-Wno-attributes)
Expand All @@ -1856,6 +1854,16 @@ if(HPX_WITH_COMPILER_WARNINGS)
# caused by the use of std::destructive_interference_size
hpx_add_compile_flag_if_available(-Wno-interference-size)
endif()
if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER_EQUAL "13.0")
# gcc V13.x is overeager to report dangling references where there are
# none
hpx_add_compile_flag_if_available(-Wextra)
hpx_add_compile_flag_if_available(-Wpedantic)
hpx_add_compile_flag_if_available(-Wno-self-move)
endif()
else()
hpx_add_compile_flag_if_available(-Wextra)
hpx_add_compile_flag_if_available(-Wpedantic)
endif()

# We do not in general guarantee ABI compatibility between C++ standards, so
Expand Down
27 changes: 23 additions & 4 deletions cmake/HPX_AddConfigTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,15 @@ function(hpx_check_for_cxx11_std_atomic)
unset(HPX_CXX11_STD_ATOMIC_LIBRARIES CACHE)
endif()

# we shouldn't delete this key if the user has pre-set the atomic libraries to
# use
if(HPX_CXX11_STD_ATOMIC_LIBRARIES)
set(__std_atomic_libraries
TRUE
CACHE STRING "std::atomics need separate library" FORCE
)
endif()

# first see if we can build atomics with no -latomics
add_hpx_config_test(
HPX_WITH_CXX11_ATOMIC
Expand All @@ -301,12 +310,18 @@ function(hpx_check_for_cxx11_std_atomic)
LIBRARIES ${HPX_CXX11_STD_ATOMIC_LIBRARIES}
FILE ${ARGN}
)
if(NOT HPX_WITH_CXX11_ATOMIC)
unset(HPX_CXX11_STD_ATOMIC_LIBRARIES CACHE)
unset(HPX_WITH_CXX11_ATOMIC CACHE)
if(HPX_WITH_CXX11_ATOMIC)
set(__std_atomic_libraries
TRUE
CACHE STRING "std::atomics need separate library" FORCE
)
endif()
endif()
endif()

if(NOT HPX_WITH_CXX11_ATOMIC)
hpx_error("HPX needs support for C++11 std::atomic")
endif()
endfunction()

# Separately check for 128 bit atomics
Expand Down Expand Up @@ -334,11 +349,15 @@ function(hpx_check_for_cxx11_std_atomic_128bit)
)
if(NOT HPX_WITH_CXX11_ATOMIC_128BIT)
# Adding -latomic did not help, so we don't attempt to link to it later
unset(HPX_CXX11_STD_ATOMIC_LIBRARIES CACHE)
# but only if normal atomics don't require it
if(NOT __std_atomic_libraries)
unset(HPX_CXX11_STD_ATOMIC_LIBRARIES CACHE)
endif()
unset(HPX_WITH_CXX11_ATOMIC_128BIT CACHE)
endif()
endif()
endif()
unset(__std_atomic_libraries CACHE)
endfunction()

# ##############################################################################
Expand Down
3 changes: 1 addition & 2 deletions cmake/HPX_PerformCxxFeatureTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ function(hpx_perform_cxx_feature_tests)
endif()

hpx_check_for_cxx11_std_atomic(
REQUIRED "HPX needs support for C++11 std::atomic"
${atomics_additional_flags}
DEFINITIONS HPX_HAVE_CXX11_STD_ATOMIC ${atomics_additional_flags}
)

# Separately check for 128 bit atomics
Expand Down
4 changes: 2 additions & 2 deletions cmake/tests/c11_aligned_alloc.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020 Hartmut Kaiser
// Copyright (c) 2020-2023 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
Expand All @@ -10,7 +10,7 @@

int main()
{
char* s = aligned_alloc(1024, 1024 * sizeof(char));
char* s = static_cast<char*>(aligned_alloc(1024, 1024 * sizeof(char)));

free(s);
return 0;
Expand Down
7 changes: 7 additions & 0 deletions cmake/tests/cxx11_std_atomic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ void test_atomic()
(void) i;
}

struct index_data
{
std::uint16_t first;
std::uint16_t second;
};

int main()
{
// ATOMIC_FLAG_INIT is deprecated starting C++20
Expand All @@ -34,6 +40,7 @@ int main()
test_atomic<std::uint16_t>();
test_atomic<std::uint32_t>();
test_atomic<std::uint64_t>();
test_atomic<index_data>();

std::memory_order mo;
mo = std::memory_order_relaxed;
Expand Down
4 changes: 2 additions & 2 deletions cmake/tests/cxx17_std_aligned_alloc.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020 Hartmut Kaiser
// Copyright (c) 2020-2023 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
Expand All @@ -10,7 +10,7 @@

int main()
{
char* s = std::aligned_alloc(1024, 1024 * sizeof(char));
char* s = static_cast<char*>(std::aligned_alloc(1024, 1024 * sizeof(char)));

std::free(s);
return 0;
Expand Down
4 changes: 2 additions & 2 deletions cmake/tests/cxx20_perfect_pack_capture.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021 Hartmut Kaiser
// Copyright (c) 2021-2023 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
Expand All @@ -10,7 +10,7 @@
#include <utility>

template <typename... Ts>
void foo(Ts&&... ts)
auto foo(Ts&&... ts)
{
return [... ts = std::forward<Ts>(ts)]() {};
}
Expand Down
4 changes: 2 additions & 2 deletions cmake/tests/cxx20_std_construct_at.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2022 Hartmut Kaiser
// Copyright (c) 2022-2023 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
Expand All @@ -17,7 +17,7 @@ int main()
{
unsigned char buffer[sizeof(A)];

A* ptr = hpx::construct_at(reinterpret_cast<A*>(buffer), 42);
A* ptr = std::construct_at(reinterpret_cast<A*>(buffer), 42);
std::destroy_at(ptr);

return 0;
Expand Down
2 changes: 2 additions & 0 deletions libs/core/datastructures/tests/unit/bitset_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,10 @@ struct bitset_test
Bitset c(rhs);
b = std::move(c);

#if !defined(HPX_GCC_VERSION) || HPX_GCC_VERSION >= 130000
// NOLINTNEXTLINE(clang-diagnostic-self-assign-overloaded)
b = std::move(b); // self assignment check
#endif

// NOLINTNEXTLINE(bugprone-use-after-move)
HPX_TEST(b == rhs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,10 @@ namespace hpx::parallel::execution {
int domain = -1;
#else
// get the argument for the numa hint function from the predecessor future
auto const& predecessor_value = detail::future_extract_value()(
HPX_FORWARD(Future, predecessor));
int domain = numa_function_(predecessor_value, ts...);
int domain =
numa_function_(detail::future_extract_value()(
HPX_FORWARD(Future, predecessor)),
ts...);
#endif

gpx_deb.debug(debug::str<>("then_schedule"), "domain ", domain);
Expand Down Expand Up @@ -407,13 +408,10 @@ namespace hpx::parallel::execution {
OuterFuture<hpx::tuple<InnerFutures...>>&& predecessor, Ts&&... ts)
{
#ifdef GUIDED_EXECUTOR_DEBUG
// get the tuple of futures from the predecessor future <tuple of futures>
auto const& predecessor_value =
detail::future_extract_value()(predecessor);

// create a tuple of the unwrapped future values
auto unwrapped_futures_tuple = hpx::util::map_pack(
detail::future_extract_value{}, predecessor_value);
auto unwrapped_futures_tuple =
hpx::util::map_pack(detail::future_extract_value{},
detail::future_extract_value()(predecessor));

using result_type = hpx::util::detail::invoke_deferred_result_t<F,
OuterFuture<hpx::tuple<InnerFutures...>>, Ts...>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ int hpx_main()
iterator_type itr_o = v2.begin();
(void) itr_o;

std::size_t i = 0;
for (std::size_t const& v : my_range)
{
hpx::async(hpx::util::protect(print_obj<std::size_t>()), v);
++i;
}

return hpx::local::finalize(); // Handles HPX shutdown
Expand Down
7 changes: 5 additions & 2 deletions libs/core/functional/tests/unit/bind_dm3_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#if defined(HPX_MSVC)
#pragma warning(disable : 4786) // identifier truncated in debug info
#pragma warning(disable : 4710) // function not inlined
#pragma warning( \
disable : 4711) // function selected for automatic inline expansion
// function selected for automatic inline expansion
#pragma warning(disable : 4711)
#pragma warning(disable : 4514) // unreferenced inline removed
#endif

Expand All @@ -30,13 +30,16 @@ namespace placeholders = hpx::placeholders;

int main()
{
// gcc V13 over-eagerly reports a dangling reference here
#if !defined(HPX_GCC_VERSION) || HPX_GCC_VERSION < 130000
typedef std::pair<int, int> pair_type;

pair_type pair(10, 20);

int const& x = hpx::bind(&pair_type::first, placeholders::_1)(pair);

HPX_TEST_EQ(&pair.first, &x);
#endif

return hpx::util::report_errors();
}
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,14 @@ namespace hpx::util::detail {
{
for (/**/; !range.is_finished(); ++range)
{
#if defined(HPX_GCC_VERSION) && HPX_GCC_VERSION >= 130000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif
async_traverse_one(range);
#if defined(HPX_GCC_VERSION) && HPX_GCC_VERSION >= 130000
#pragma GCC diagnostic pop
#endif
if (is_detached()) // test before increment
break;
}
Expand Down
10 changes: 8 additions & 2 deletions libs/core/pack_traversal/tests/unit/pack_traversal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ static void test_strategic_traverse()
HPX_TEST_EQ(res, 1);
}

// gcc V13 over-eagerly reports a dangling reference here
#if !defined(HPX_GCC_VERSION) || HPX_GCC_VERSION < 130000

// Make it possible to pass move only objects in as reference,
// while returning those as reference.
{
Expand All @@ -494,6 +497,7 @@ static void test_strategic_traverse()
*ptr = 0;
HPX_TEST_EQ(*ref, 0);
}
#endif

// Multiple args: Make it possible to pass move only objects in
// as reference, while returning those as reference.
Expand Down Expand Up @@ -804,8 +808,10 @@ static void test_spread_tuple_like_traverse()

// 1:0 mappings
{
using Result = decltype(
map_pack(zero_mapper{}, make_tuple(make_tuple(1, 2), 1), 1));
// clang-format off
using Result = decltype(map_pack(
zero_mapper{}, make_tuple(make_tuple(1, 2), 1), 1));
// clang-format on
static_assert(std::is_void<Result>::value, "Failed...");
}

Expand Down
Loading

0 comments on commit 1cbb0d6

Please sign in to comment.