From b2c18c797122b149eb088ae494dbd12f2f5ff81b Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Mon, 22 Jan 2024 01:08:36 -0500 Subject: [PATCH 1/2] upgrade FindOrFetchBoost via https://github.com/ValeevGroup/kit-cmake/pull/6/commits/45e7d0d8d7f994a88c5af5fc082332db7bd0d6b3 and support BTAS loading if Boost already partially discovered --- external/boost.cmake | 46 ++++++++++++++++++++--------------------- external/versions.cmake | 2 +- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/external/boost.cmake b/external/boost.cmake index 40487334..1611011c 100644 --- a/external/boost.cmake +++ b/external/boost.cmake @@ -1,29 +1,27 @@ # -*- mode: cmake -*- -# Boost can be discovered by every (sub)package but only the top package can build it ... -# if we are the top package need to include the list of Boost components to be built -if("${CMAKE_PROJECT_NAME}" STREQUAL "${PROJECT_NAME}") - set(required_components - headers # BTAS - container # BTAS - iterator # BTAS - random # BTAS - ) - if (DEFINED Boost_REQUIRED_COMPONENTS) - list(APPEND Boost_REQUIRED_COMPONENTS ${required_components}) - list(REMOVE_DUPLICATES Boost_REQUIRED_COMPONENTS) - else() - set(Boost_REQUIRED_COMPONENTS "${required_components}" CACHE STRING "Required components of Boost to discovered or built") - endif() - set(optional_components - serialization # BTAS - ) - if (DEFINED Boost_OPTIONAL_COMPONENTS) - list(APPEND Boost_OPTIONAL_COMPONENTS ${optional_components}) - list(REMOVE_DUPLICATES Boost_OPTIONAL_COMPONENTS) - else() - set(Boost_OPTIONAL_COMPONENTS "${optional_components}" CACHE STRING "Optional components of Boost to discovered or built") - endif() +# Boost can be discovered by every (sub)package but only the top package can *build* it ... +# in either case must declare the components used by BTAS +set(required_components + headers # BTAS + container # BTAS + iterator # BTAS + random # BTAS +) +if (DEFINED Boost_REQUIRED_COMPONENTS) + list(APPEND Boost_REQUIRED_COMPONENTS ${required_components}) + list(REMOVE_DUPLICATES Boost_REQUIRED_COMPONENTS) +else() + set(Boost_REQUIRED_COMPONENTS "${required_components}" CACHE STRING "Required components of Boost to discovered or built") +endif() +set(optional_components + serialization # BTAS +) +if (DEFINED Boost_OPTIONAL_COMPONENTS) + list(APPEND Boost_OPTIONAL_COMPONENTS ${optional_components}) + list(REMOVE_DUPLICATES Boost_OPTIONAL_COMPONENTS) +else() + set(Boost_OPTIONAL_COMPONENTS "${optional_components}" CACHE STRING "Optional components of Boost to discovered or built") endif() if (BTAS_BUILD_DEPS_FROM_SOURCE AND NOT DEFINED Boost_FETCH_IF_MISSING) diff --git a/external/versions.cmake b/external/versions.cmake index 2c5257b5..cf7f8470 100644 --- a/external/versions.cmake +++ b/external/versions.cmake @@ -1,4 +1,4 @@ -set(BTAS_TRACKED_VGCMAKEKIT_TAG 8713beb71ff6b7d4b1c758e9e1c7d814bd97b0af) +set(BTAS_TRACKED_VGCMAKEKIT_TAG 45e7d0d8d7f994a88c5af5fc082332db7bd0d6b3) # likely can use earlier, but # - as of oct 2023 tested with 1.71 and up only From a7af4d0ff5e3c0e2cd826d02d91f2b82b0c52b35 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Mon, 22 Jan 2024 14:36:24 -0500 Subject: [PATCH 2/2] [ci] try setting MKL_NUM_THREADS=1 to see if stochastic CI failures of CP tests subside --- .github/workflows/cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index a6a70bf1..58452528 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -80,6 +80,7 @@ jobs: sudo apt-get install intel-oneapi-mkl-devel echo "BLAS_PREFERENCE_LIST=IntelMKL" >> $GITHUB_ENV echo "MKLROOT=/opt/intel/oneapi/mkl/latest" >> $GITHUB_ENV + echo "MKL_NUM_THREADS=1" >> $GITHUB_ENV else echo "BLAS_PREFERENCE_LIST=ReferenceBLAS" >> $GITHUB_ENV fi