Skip to content

Commit 985871c

Browse files
committed
bump to c++20
1 parent 1803cd6 commit 985871c

File tree

3 files changed

+16
-21
lines changed

3 files changed

+16
-21
lines changed

CMakeLists.txt

+6-10
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

@@ -264,17 +264,13 @@ vgkit_cmake_git_metadata()
264264
##########################
265265
# Check compiler features
266266
##########################
267-
# need C++17, insist on strict standard
268-
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ ISO Standard version")
269-
if (NOT(CMAKE_CXX_STANDARD EQUAL 17 OR CMAKE_CXX_STANDARD EQUAL 20))
270-
message(FATAL_ERROR "C++ 2017 ISO Standard or higher is required to compile TiledArray")
271-
endif()
272-
# C++20 is only configurable via compile features with cmake 3.12 and older
273-
if (CMAKE_CXX_STANDARD EQUAL 20 AND CMAKE_VERSION VERSION_LESS 3.12.0)
274-
cmake_minimum_required (VERSION 3.12.0)
267+
# need C++20, insist on strict standard
268+
set(CMAKE_CXX_STANDARD 20 CACHE STRING "C++ ISO Standard version")
269+
if (CMAKE_CXX_STANDARD LESS 20)
270+
message(FATAL_ERROR "C++ 2020 ISO Standard or higher is required to compile TiledArray")
275271
endif()
276272
set(CMAKE_CXX_STANDARD_REQUIRED ON)
277-
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Whether to use extensions of C++ ISO Standard version")
273+
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Whether to use extensions of C++ ISO Standard version")
278274
# Check type support
279275
include(CheckTypeSize)
280276
check_type_size("long double" TILEDARRAY_HAS_LONG_DOUBLE LANGUAGE CXX)

INSTALL.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@ Both methods are supported. However, for most users we _strongly_ recommend to b
2424

2525
## Prerequisites
2626

27-
- C++ compiler with support for the [C++17 standard](http://www.iso.org/standard/68564.html), or a more recent standard. This includes the following compilers:
28-
- [GNU C++](https://gcc.gnu.org/), version 7.0 or higher
29-
- [Clang](https://clang.llvm.org/), version 5 or higher
30-
- [Apple Clang](https://en.wikipedia.org/wiki/Xcode), version 9.3 or higher
31-
- [Intel C++ compiler](https://software.intel.com/en-us/c-compilers), version 19 or higher
27+
- C++ compiler with support for the [C++20 standard](http://www.iso.org/standard/68564.html), or a more recent standard. This includes the following compilers:
28+
- [GNU C++](https://gcc.gnu.org/), version 11 or higher
29+
- [Clang](https://clang.llvm.org/), version 14 or higher
30+
- [Apple Clang](https://en.wikipedia.org/wiki/Xcode), version 14 or higher
3231

3332
See the current [Travis CI matrix](.travis.yml) for the most up-to-date list of compilers that are known to work.
3433

35-
- [CMake](https://cmake.org/), version 3.15 or higher; if {CUDA,HIP} support is needed, CMake {3.18,3.21} or higher is required.
34+
- [CMake](https://cmake.org/), version 3.21 or higher.
3635
- [Git](https://git-scm.com/) 1.8 or later (required to obtain TiledArray and MADNESS source code from GitHub)
3736
- [Eigen](http://eigen.tuxfamily.org/), version 3.3.5 or higher; if CUDA is enabled then 3.3.7 is required (will be downloaded automatically, if missing)
3837
- [Boost libraries](www.boost.org/), version 1.81 or higher (will be downloaded automatically, if missing). The following principal Boost components are used:
@@ -66,14 +65,14 @@ Compiling BTAS requires the following prerequisites:
6665
Optional prerequisites:
6766
- for execution on GPGPUs:
6867
- device programming runtime:
69-
- [CUDA compiler and runtime](https://developer.nvidia.com/cuda-zone) -- for execution on NVIDIA's CUDA-enabled accelerators. CUDA 11 or later is required.
68+
- [CUDA compiler and runtime](https://developer.nvidia.com/cuda-zone) -- for execution on NVIDIA's CUDA-enabled accelerators. CUDA 12 or later is required.
7069
- [HIP/ROCm compiler and runtime](https://developer.nvidia.com/cuda-zone) -- for execution on AMD's ROCm-enabled accelerators. Note that TiledArray does not use ROCm directly but its C++ Heterogeneous-Compute Interface for Portability, `HIP`; although HIP can also be used to program CUDA-enabled devices, in TiledArray it is used only to program ROCm devices, hence ROCm and HIP will be used interchangeably.
7170
- [LibreTT](github.com/victor-anisimov/LibreTT) -- free tensor transpose library for CUDA, ROCm, and SYCL platforms that is based on the [original cuTT library](github.com/ap-hynninen/cutt) extended to provide thread-safety improvements (via github.com/ValeevGroup/cutt) and extended to non-CUDA platforms by [@victor-anisimov](github.com/victor-anisimov) (tag 6eed30d4dd2a5aa58840fe895dcffd80be7fbece).
7271
- [Umpire](github.com/LLNL/Umpire) -- portable memory manager for heterogeneous platforms (tag 8c85866107f78a58403e20a2ae8e1f24c9852287).
7372
- [Doxygen](http://www.doxygen.nl/) -- for building documentation (version 1.8.12 or later).
7473
- [ScaLAPACK](http://www.netlib.org/scalapack/) -- a distributed-memory linear algebra package. If detected, the following C++ components will also be sought and downloaded, if missing:
75-
- [scalapackpp](https://github.com/wavefunction91/scalapackpp.git) -- a modern C++ (C++17) wrapper for ScaLAPACK (tag 6397f52cf11c0dfd82a79698ee198a2fce515d81); pulls and builds the following additional prerequisite
76-
- [blacspp](https://github.com/wavefunction91/blacspp.git) -- a modern C++ (C++17) wrapper for BLACS
74+
- [scalapackpp](https://github.com/wavefunction91/scalapackpp.git) -- a modern C++ wrapper for ScaLAPACK (tag 6397f52cf11c0dfd82a79698ee198a2fce515d81); pulls and builds the following additional prerequisite
75+
- [blacspp](https://github.com/wavefunction91/blacspp.git) -- a modern C++ wrapper for BLACS
7776
- Python3 interpreter -- to test (optionally-built) Python bindings
7877
- [TTG](https://github.com/TESSEorg/ttg.git) -- C++ implementation of the Template Task Graph programming model for fine-grained flow-graph composition of distributed memory programs (tag 3fe4a06dbf4b05091269488aab38223da1f8cb8e).
7978

@@ -186,7 +185,7 @@ Additional CMake variables are given below.
186185
* `CMAKE_BUILD_TYPE` -- Optimization/debug build type options include
187186
`Debug` (optimization off, debugging symbols and assersions on), `Release` (optimization on, debugging symbols and assertions off), `RelWithDebInfo` (optimization on, debugging symbols and assertions on) and `MinSizeRel` (same as `Release` but optimized for executable size). The default is empty build type. It is recommended that you set the build type explicitly.
188187
* `BUILD_SHARED_LIBS` -- Enable shared libraries. This option is only available if the platform supports shared libraries; if that's true and `TA_ASSUMES_ASLR_DISABLED` is `ON` (see below) the default is `ON`, otherwise the default is `OFF`.
189-
* `CMAKE_CXX_STANDARD` -- Specify the C++ ISO Standard to use. Valid values are `17` (default), and `20`.
188+
* `CMAKE_CXX_STANDARD` -- Specify the C++ ISO Standard to use. Valid values are `20` (default), and `23`.
190189

191190
Most of these are best specified in a _toolchain file_. TiledArray is recommended to use the toolchains distributed via [the Valeev Group CMake kit](https://github.com/ValeevGroup/kit-cmake/tree/master/toolchains). TiledArray by default downloads (via [the FetchContent CMake module](https://cmake.org/cmake/help/latest/module/FetchContent.html)) the VG CMake toolkit which makes the toolchains available without having to download the toolchain files manually. E.g., to use toolchain `x` from the VG CMake kit repository provide `-DCMAKE_TOOLCHAIN_FILE=cmake/vg/toolchains/x.cmake` to CMake when configuring TiledArray.
192191

doc/dox/dev/Basic-Programming.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ An object that specifies the structure of DistArray. E.g. it could be represente
6666

6767
## Implementation
6868

69-
TiledArray is a library written in standard C++ using features available in the 2017 ISO standard (commonly known as C++17). To use TiledArray it is necessary to `#include` header `tiledarray.h`. imports most TiledArray features into namespace `TiledArray`. For convenience, namespace alias `TA` is also provided. Although the alias can be disabled by defining the `TILEDARRAY_DISABLE_NAMESPACE_TA` preprocessor variable, all examples will assume that the `TA` alias is not disabled.
69+
TiledArray is a library written in standard C++ using features available in the 2020 ISO standard (commonly known as C++20). To use TiledArray it is necessary to `#include` header `tiledarray.h`. imports most TiledArray features into namespace `TiledArray`. For convenience, namespace alias `TA` is also provided. Although the alias can be disabled by defining the `TILEDARRAY_DISABLE_NAMESPACE_TA` preprocessor variable, all examples will assume that the `TA` alias is not disabled.
7070

7171
P.S. It sometimes may be possible to reduce source code couplings by importing only _forwarding_ declarations. This is done by `#include`ing header `tiledarray_fwd.h`.
7272

0 commit comments

Comments
 (0)