Skip to content

Commit 94d82a1

Browse files
committed
Merge branch 'master' into kshitij/feature/qr_solve
2 parents 4e3c3d5 + ce692b5 commit 94d82a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2094
-745
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
os : [ macos-latest, ubuntu-22.04 ]
15+
os : [ macos-latest, ubuntu-24.04 ]
1616
build_type : [ Release, Debug ]
1717
task_backend: [ Pthreads, PaRSEC ]
1818
include:
19-
- os: ubuntu-22.04
20-
cc: /usr/bin/gcc-12
21-
cxx: /usr/bin/g++-12
19+
- os: ubuntu-24.04
20+
cc: /usr/bin/gcc-14
21+
cxx: /usr/bin/g++-14
2222
- os: macos-latest
2323
cc: clang
2424
cxx: clang++
@@ -31,17 +31,17 @@ jobs:
3131
CCACHE_COMPRESS : true
3232
CCACHE_COMPRESSLEVEL : 6
3333
OMPI_MCA_btl_vader_single_copy_mechanism : none
34-
PARSEC_MCA_runtime_bind_threads : 0
34+
PARSEC_MCA_bind_threads : 0
3535
BUILD_CONFIG : >
3636
-DMADNESS_TASK_BACKEND=${{ matrix.task_backend }}
3737
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
3838
-DMPIEXEC_PREFLAGS='--bind-to;none;--allow-run-as-root'
39-
-DCMAKE_PREFIX_PATH="/usr/local/opt/bison;/usr/local/opt/scalapack"
39+
-DCMAKE_PREFIX_PATH="/usr/local/opt/bison;/usr/local/opt/scalapack;/usr/local/opt/boost"
4040
-DTA_ASSERT_POLICY=TA_ASSERT_THROW
41-
-DENABLE_SCALAPACK=ON
41+
-DTA_SCALAPACK=ON
4242
4343
steps:
44-
- uses: actions/checkout@v2
44+
- uses: actions/checkout@v4
4545

4646
- name: Host system info
4747
shell: bash
@@ -55,19 +55,28 @@ jobs:
5555
echo "MPIEXEC=/opt/homebrew/bin/mpiexec" >> $GITHUB_ENV
5656
5757
- name: Install prerequisites Ubuntu packages
58-
if: ${{ matrix.os == 'ubuntu-22.04' }}
58+
if: ${{ matrix.os == 'ubuntu-24.04' }}
5959
run: |
6060
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
6161
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
6262
sudo apt-get update
63-
sudo apt-get -y install ninja-build g++-12 liblapack-dev libboost-dev libboost-serialization-dev libboost-random-dev libeigen3-dev openmpi-bin libopenmpi-dev libtbb-dev ccache flex bison libscalapack-mpi-dev cmake doxygen
63+
sudo apt-get -y install ninja-build g++-14 liblapack-dev libboost-dev libboost-serialization-dev libboost-random-dev libeigen3-dev openmpi-bin libopenmpi-dev libtbb-dev ccache flex bison libscalapack-mpi-dev cmake doxygen
6464
sudo ln -s /usr/lib/x86_64-linux-gnu/libscalapack-openmpi.so /usr/lib/x86_64-linux-gnu/libscalapack.so
6565
echo "MPIEXEC=/usr/bin/mpiexec" >> $GITHUB_ENV
6666
67-
- name: Setup ccache
68-
uses: hendrikmuhs/[email protected]
67+
- name: Prepare ccache timestamp
68+
id: ccache_cache_timestamp
69+
shell: cmake -P {0}
70+
run: |
71+
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
72+
message("::set-output name=timestamp::${current_date}")
73+
- name: Setup ccache cache files
74+
uses: actions/cache@v4
6975
with:
70-
key: ccache-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.task_backend }}
76+
path: ${{github.workspace}}/build/.ccache
77+
key: ${{ matrix.config.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
78+
restore-keys: |
79+
${{ matrix.config.name }}-ccache-
7180
7281
- name: "Configure build: ${{ env.BUILD_CONFIG }}"
7382
shell: bash

.gitlab-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ variables:
1414
TA_ASSERT_POLICY=TA_ASSERT_THROW
1515
TA_UT_CTEST_TIMEOUT=3000
1616
${TA_PYTHON}
17-
${ENABLE_CUDA}
17+
${TA_CUDA}
1818
CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda
1919
${BLA_VENDOR}
2020
${BLA_THREADS}
21-
${ENABLE_SCALAPACK}
21+
${TA_SCALAPACK}
2222
2323
before_script:
2424
# NB: if CMAKE_BUILD_PARALLEL_LEVEL is not set (i.e. using shared runner), use 1 to ensure we have enough memory
@@ -42,7 +42,7 @@ ubuntu:
4242
image: valeevgroup/${IMAGE}
4343
variables:
4444
TA_PYTHON : "TA_PYTHON=ON"
45-
ENABLE_SCALAPACK : "ENABLE_SCALAPACK=OFF"
45+
TA_SCALAPACK : "TA_SCALAPACK=OFF"
4646
script:
4747
- ./ci/.build-project
4848
--build ./build
@@ -69,7 +69,7 @@ ubuntu:
6969
CXX: [ g++ ]
7070
BUILD_TYPE : [ "RelWithDebInfo" ]
7171
TA_PYTHON : [ "TA_PYTHON=OFF" ]
72-
ENABLE_CUDA : [ "ENABLE_CUDA=ON" ]
72+
TA_CUDA : [ "TA_CUDA=ON" ]
7373
TA_TARGETS : [ "tiledarray examples-tiledarray check_serial-tiledarray" ]
7474
RUNNER_TAGS: [ cuda ]
7575

CMakeLists.txt

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# Jul 19, 2013
2525
#
2626

27-
cmake_minimum_required (VERSION 3.15.0) # need list(PREPEND for toolchains
27+
cmake_minimum_required (VERSION 3.21.0) # for HIP/ROCm
2828

2929
# Set TiledArray version =======================================================
3030

@@ -117,20 +117,17 @@ set(MPI_CXX_SKIP_MPICXX TRUE CACHE BOOL "MPI_CXX_SKIP_MPICXX")
117117
option(ENABLE_MPI "Enable MPI" ON)
118118
add_feature_info(MPI ENABLE_MPI "Message-Passing Interface supports distributed-memory parallel programs")
119119

120-
option(ENABLE_SCALAPACK "Enable ScaLAPACK Bindings in TiledArray" OFF)
121-
add_feature_info(ScaLAPACK ENABLE_SCALAPACK "ScaLAPACK provides distributed linear algebra")
120+
option(TA_SCALAPACK "Enable ScaLAPACK Bindings in TiledArray" OFF)
121+
add_feature_info(ScaLAPACK TA_SCALAPACK "ScaLAPACK provides distributed linear algebra")
122122

123-
option(ENABLE_WFN91_LINALG_DISCOVERY_KIT "Use linear algebra discovery kit from github.com/wavefunction91 [recommended]" ON)
124-
add_feature_info(WFN91LinearAlgebraDiscoveryKit ENABLE_WFN91_LINALG_DISCOVERY_KIT "Linear algebra discovery kit from github.com/wavefunction91 supports many more corner cases than the default CMake modules and/or ICL's BLAS++/LAPACK++ modules")
123+
option(TA_LINALG_DISCOVERY_KIT "Use linear algebra discovery kit from github.com/wavefunction91 [recommended]" ON)
124+
add_feature_info(WFN91LinearAlgebraDiscoveryKit TA_LINALG_DISCOVERY_KIT "Linear algebra discovery kit from github.com/wavefunction91 supports many more corner cases than the default CMake modules and/or ICL's BLAS++/LAPACK++ modules")
125125

126-
redefaultable_option(ENABLE_TBB "Enable use of TBB with MADNESS" OFF)
127-
add_feature_info(TBB ENABLE_TBB "Intel Thread-Building Blocks (TBB) supports programming shared-memory systems")
126+
option(TA_CUDA "Enables use of NVIDIA CUDA-supported hardware (such as NVIDIA GPUs) by TiledArray" OFF)
127+
add_feature_info(CUDA TA_CUDA "Use of NVIDIA CUDA-supported hardware by TiledArray")
128128

129-
option(ENABLE_CUDA "Enable use of CUDA with TiledArray" OFF)
130-
add_feature_info(CUDA ENABLE_CUDA "NVIDIA CUDA support for GPU")
131-
132-
option(ENABLE_HIP "Enable use of HIP with TiledArray" OFF)
133-
add_feature_info(HIP ENABLE_HIP "AMD HIP/ROCm support for GPU")
129+
option(TA_HIP "Enables use of AMD HIP-supported hardware (such as AMD GPUs) by TiledArray" OFF)
130+
add_feature_info(HIP TA_HIP "Use of AMD HIP-supported hardware by TiledArray")
134131

135132
option(ENABLE_GPERFTOOLS "Enable linking with Gperftools" OFF)
136133
add_feature_info(GPERFTOOLS ENABLE_GPERFTOOLS "Google Performance Tools provide fast memory allocation and performance profiling")
@@ -147,6 +144,9 @@ add_feature_info(TENSOR_MEM_TRACE TA_TENSOR_MEM_TRACE "instrumented tracing of T
147144
option(TA_TENSOR_MEM_PROFILE "Turn on instrumented profiling of TA::Tensor memory use" ${TA_TENSOR_MEM_TRACE})
148145
add_feature_info(TENSOR_MEM_PROFILE TA_TENSOR_MEM_PROFILE "instrumented profiling of TA::Tensor memory use")
149146

147+
option(TA_TENSOR_ASSERT_NO_MUTABLE_OPS_WHILE_SHARED "Turn on TA_ASSERT that no mutable operations occur on TA::{Tensor,Tile} objects that share data" OFF)
148+
add_feature_info(TENSOR_ASSERT_NO_MUTABLE_OPS_WHILE_SHARED TA_TENSOR_ASSERT_NO_MUTABLE_OPS_WHILE_SHARED "TA_ASSERT that no mutable operations occur on TA::{Tensor,Tile} objects that share data")
149+
150150
option(TA_EXPERT "TiledArray Expert mode: disables automatically downloading or building dependencies" OFF)
151151

152152
option(TA_SIGNED_1INDEX_TYPE "Enables the use of signed 1-index coordinate type (OFF in 1.0.0-alpha.2 and older)" ON)
@@ -261,17 +261,13 @@ vgkit_cmake_git_metadata()
261261
##########################
262262
# Check compiler features
263263
##########################
264-
# need C++17, insist on strict standard
265-
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ ISO Standard version")
266-
if (NOT(CMAKE_CXX_STANDARD EQUAL 17 OR CMAKE_CXX_STANDARD EQUAL 20))
267-
message(FATAL_ERROR "C++ 2017 ISO Standard or higher is required to compile TiledArray")
268-
endif()
269-
# C++20 is only configurable via compile features with cmake 3.12 and older
270-
if (CMAKE_CXX_STANDARD EQUAL 20 AND CMAKE_VERSION VERSION_LESS 3.12.0)
271-
cmake_minimum_required (VERSION 3.12.0)
264+
# need C++20, insist on strict standard
265+
set(CMAKE_CXX_STANDARD 20 CACHE STRING "C++ ISO Standard version")
266+
if (CMAKE_CXX_STANDARD LESS 20)
267+
message(FATAL_ERROR "C++ 2020 ISO Standard or higher is required to compile TiledArray")
272268
endif()
273269
set(CMAKE_CXX_STANDARD_REQUIRED ON)
274-
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Whether to use extensions of C++ ISO Standard version")
270+
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Whether to use extensions of C++ ISO Standard version")
275271
# Check type support
276272
include(CheckTypeSize)
277273
check_type_size("long double" TILEDARRAY_HAS_LONG_DOUBLE LANGUAGE CXX)
@@ -311,10 +307,10 @@ endif(CCACHE)
311307

312308
# required deps:
313309
# 1. derive runtime (CUDA/HIP/...) first since others may depend on it
314-
if(ENABLE_CUDA)
310+
if(TA_CUDA)
315311
include(external/cuda.cmake)
316312
endif()
317-
if(ENABLE_HIP)
313+
if(TA_HIP)
318314
include(external/hip.cmake)
319315
endif()
320316
include(${PROJECT_SOURCE_DIR}/cmake/modules/FindOrFetchRangeV3.cmake)
@@ -335,14 +331,14 @@ include(external/umpire.cmake)
335331
# - yes => Invoke first to configure the correct libraries config and run modules to find BLAS/LAPACK/ScaLAPACK(if needed)
336332
# - no => BLAS/LAPACK will be discovered by BLAS++/LAPACK++ (loaded by BTAS) which use standard CMake modules or
337333
# their custom modules; if needed, ScaLAPACK will be discovered by BLACS++
338-
if (ENABLE_WFN91_LINALG_DISCOVERY_KIT)
334+
if (TA_LINALG_DISCOVERY_KIT)
339335
include(FetchWfn91LinAlgModules)
340336
include(FindLinalg)
341-
endif(ENABLE_WFN91_LINALG_DISCOVERY_KIT)
337+
endif(TA_LINALG_DISCOVERY_KIT)
342338
# Boost is to be discovered by the top cmake project, and every (sub)project needs to make sure it has all of its targets
343339
include(external/boost.cmake)
344340
include(${PROJECT_SOURCE_DIR}/cmake/modules/FindOrFetchBTAS.cmake)
345-
if(ENABLE_SCALAPACK)
341+
if(TA_SCALAPACK)
346342
include(external/scalapackpp.cmake)
347343
endif()
348344

0 commit comments

Comments
 (0)