Skip to content

Commit 5b7544c

Browse files
authored
Merge pull request #4425 from QMCPACK/rc_3160
Rc 3160
2 parents 690350a + 211d10e commit 5b7544c

File tree

1,090 files changed

+71019
-53021
lines changed

Some content is hidden

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

1,090 files changed

+71019
-53021
lines changed

.github/workflows/ci-github-action-auto-rebase.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
run: tests/test_automation/github-actions/ci/run_step.sh rebase
3232
env:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34-
QMCPACK_BOT_GPG_KEY: ${{ QMCPACK_BOT_GPG_KEY }}
34+
QMCPACK_BOT_GPG_KEY: ${{ secrets.QMCPACK_BOT_GPG_KEY }}
3535
QMCPACK_BOT_GPG_SIGNING_KEY: ${{ secrets.QMCPACK_BOT_GPG_SIGNING_KEY }}
3636

3737
trigger-rebase:
@@ -48,5 +48,5 @@ jobs:
4848
run: tests/test_automation/github-actions/ci/run_step.sh pull-rebase
4949
env:
5050
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
QMCPACK_BOT_GPG_KEY: ${{ QMCPACK_BOT_GPG_KEY }}
52-
QMCPACK_BOT_GPG_SIGNING_KEY: ${{ secrets.QMCPACK_BOT_GPG_SIGNING_KEY }}
51+
QMCPACK_BOT_GPG_KEY: ${{ secrets.QMCPACK_BOT_GPG_KEY }}
52+
QMCPACK_BOT_GPG_SIGNING_KEY: ${{ secrets.QMCPACK_BOT_GPG_SIGNING_KEY }}

.github/workflows/ci-github-actions-self-hosted.yaml

+15-15
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: GitHub API Request
4343
if: steps.check.outputs.triggered == 'true'
4444
id: request
45-
uses: octokit/[email protected].0
45+
uses: octokit/[email protected].7
4646
with:
4747
route: ${{github.event.issue.pull_request.url}}
4848
env:
@@ -52,7 +52,7 @@ jobs:
5252
# just like any other third-party service
5353
- name: Create PR status
5454
if: steps.check.outputs.triggered == 'true'
55-
uses: Sibz/github-status-action@v1
55+
uses: Sibz/github-status-action@v1.1.6
5656
with:
5757
authToken: ${{secrets.GITHUB_TOKEN}}
5858
context: "ornl-sulfur CI ${{ matrix.jobname }}"
@@ -91,7 +91,7 @@ jobs:
9191

9292
- name: Report PR status
9393
if: always() && steps.check.outputs.triggered == 'true'
94-
uses: Sibz/github-status-action@v1
94+
uses: Sibz/github-status-action@v1.1.6
9595
with:
9696
authToken: ${{secrets.GITHUB_TOKEN}}
9797
context: "ornl-sulfur CI ${{matrix.jobname}}"
@@ -123,9 +123,9 @@ jobs:
123123
Clang15-MPI-CUDA-AFQMC-Offload-Real,
124124
Clang15-MPI-CUDA-AFQMC-Offload-Complex-Mixed,
125125
Clang15-MPI-CUDA-AFQMC-Offload-Complex,
126-
Intel19-MPI-CUDA-AFQMC-Real-Mixed, # auxiliary field, requires MPI
127-
Intel19-MPI-CUDA-AFQMC-Complex-Mixed,
128-
Intel19-MPI-CUDA-AFQMC-Real,
126+
Intel21-MPI-CUDA-AFQMC-Real-Mixed, # auxiliary field, requires MPI
127+
Intel21-MPI-CUDA-AFQMC-Complex-Mixed,
128+
Intel21-MPI-CUDA-AFQMC-Real,
129129
]
130130

131131
steps:
@@ -144,7 +144,7 @@ jobs:
144144
- name: GitHub API Request
145145
if: steps.check.outputs.triggered == 'true'
146146
id: request
147-
uses: octokit/[email protected].0
147+
uses: octokit/[email protected].7
148148
with:
149149
route: ${{github.event.issue.pull_request.url}}
150150
env:
@@ -154,7 +154,7 @@ jobs:
154154
# just like any other third-party service
155155
- name: Create PR status
156156
if: steps.check.outputs.triggered == 'true'
157-
uses: Sibz/github-status-action@v1
157+
uses: Sibz/github-status-action@v1.1.6
158158
with:
159159
authToken: ${{secrets.GITHUB_TOKEN}}
160160
context: "ornl-sulfur CI ${{ matrix.jobname }}"
@@ -193,7 +193,7 @@ jobs:
193193

194194
- name: Report PR status
195195
if: always() && steps.check.outputs.triggered == 'true'
196-
uses: Sibz/github-status-action@v1
196+
uses: Sibz/github-status-action@v1.1.6
197197
with:
198198
authToken: ${{secrets.GITHUB_TOKEN}}
199199
context: "ornl-sulfur CI ${{matrix.jobname}}"
@@ -244,7 +244,7 @@ jobs:
244244
- name: GitHub API Request
245245
if: steps.check.outputs.triggered == 'true'
246246
id: request
247-
uses: octokit/[email protected].0
247+
uses: octokit/[email protected].7
248248
with:
249249
route: ${{github.event.issue.pull_request.url}}
250250
env:
@@ -254,7 +254,7 @@ jobs:
254254
# just like any other third-party service
255255
- name: Create PR status
256256
if: steps.check.outputs.triggered == 'true'
257-
uses: Sibz/github-status-action@v1
257+
uses: Sibz/github-status-action@v1.1.6
258258
with:
259259
authToken: ${{secrets.GITHUB_TOKEN}}
260260
context: "ornl-nitrogen CI ${{matrix.jobname}}"
@@ -293,7 +293,7 @@ jobs:
293293

294294
- name: Report PR status
295295
if: always() && steps.check.outputs.triggered == 'true'
296-
uses: Sibz/github-status-action@v1
296+
uses: Sibz/github-status-action@v1.1.6
297297
with:
298298
authToken: ${{secrets.GITHUB_TOKEN}}
299299
context: "ornl-nitrogen CI ${{matrix.jobname}}"
@@ -339,7 +339,7 @@ jobs:
339339
- name: GitHub API Request
340340
if: steps.check.outputs.triggered == 'true'
341341
id: request
342-
uses: octokit/[email protected].0
342+
uses: octokit/[email protected].7
343343
with:
344344
route: ${{github.event.issue.pull_request.url}}
345345
env:
@@ -349,7 +349,7 @@ jobs:
349349
# just like any other third-party service
350350
- name: Create PR status
351351
if: steps.check.outputs.triggered == 'true'
352-
uses: Sibz/github-status-action@v1
352+
uses: Sibz/github-status-action@v1.1.6
353353
with:
354354
authToken: ${{secrets.GITHUB_TOKEN}}
355355
context: "ornl-nitrogen CI ${{matrix.jobname}}"
@@ -388,7 +388,7 @@ jobs:
388388

389389
- name: Report PR status
390390
if: always() && steps.check.outputs.triggered == 'true'
391-
uses: Sibz/github-status-action@v1
391+
uses: Sibz/github-status-action@v1.1.6
392392
with:
393393
authToken: ${{secrets.GITHUB_TOKEN}}
394394
context: "ornl-nitrogen CI ${{matrix.jobname}}"

.github/workflows/ci-github-actions.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ jobs:
127127

128128
- name: Upload Coverage
129129
if: contains(matrix.jobname, 'Gcov') && github.repository_owner == 'QMCPACK'
130-
uses: codecov/codecov-action@v2
130+
uses: codecov/codecov-action@v3
131131
with:
132132
files: ../qmcpack-build/coverage.xml
133133
flags: tests-deterministic # optional
134134
name: codecov-QMCPACK # optional
135135
fail_ci_if_error: true # optional (default = false)
136136

137137
macos:
138-
runs-on: macos-latest
138+
runs-on: macos-11
139139
env:
140140
GH_JOBNAME: ${{ matrix.jobname }}
141141
GH_OS: macOS
@@ -149,6 +149,11 @@ jobs:
149149
- name: Checkout Action
150150
uses: actions/checkout@v3
151151

152+
- name: Set Python Version
153+
uses: actions/setup-python@v4
154+
with:
155+
python-version: '3.10'
156+
152157
- name: Setup Dependencies
153158
run: |
154159
brew install ninja hdf5 fftw boost

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ tests/solids/NiO_a4_e48_pp/NiO-fcc-supertwist111-supershift000-S1.h5
1919

2020
# Visual Studio code settings
2121
.vscode/
22+
.cache/
2223

2324
# Doxygen output
2425
doxygen/output/

CHANGELOG.md

+88-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,93 @@
22

33
Notable changes to QMCPACK are documented in this file.
44

5+
## [3.16.0] - 2023-01-31
6+
7+
This release contains important bug fixes as well as feature improvements. It is a recommended release for all users. Thanks to
8+
everyone who reported an issue or suggested an improvement. See GitHub for the full list of merged pull requests and closed issues.
9+
10+
This release is expected to be the last including the legacy CUDA implementation, the version built with QMC_CUDA=1. Users should
11+
transition to the batched drivers which support greater functionality as well as both CPU and GPU execution. Users should adopt
12+
these drivers now and report any issues. The new drivers can be requested with the driver_version input parameter, see
13+
https://qmcpack.readthedocs.io/en/develop/performance_portable.html . In a subsequent release, the non-batched CPU drivers will also
14+
be removed leaving only the performance portable batched drivers. This will result in a single implementation of most functionality,
15+
improving overall usability and maintainability.
16+
17+
* Important bugfix to NLPP integration grid rotations and update to all relevant deterministic test values. See issue
18+
[\#4362](https://github.com/QMCPACK/qmcpack/issues/4362) for full discussion and visualization. Found and corrected by
19+
@markdewing, this bug has existed since the earliest days of QMCPACK. The stochastic rotations used to randomly reorient the
20+
integration grids for the non-local pseudopoptentials would not cover the full sphere unless they had many points and sufficient
21+
symmetry, as was the case for the QMCPACK default. However, calculations with custom integration grids with only a few points
22+
(small `nrule`) could show error or excess statistical noise in the non-local part of the pseudopotential energy. Standard
23+
calculations and tests on carbon diamond, lithium hydride, and hydrocarbon molecules were not affected due to QMCPACK's
24+
conservative defaults. Tests updated in [\#4383](https://github.com/QMCPACK/qmcpack/pull/4383)
25+
* NLPP grid randomization can be disabled for debugging and greater reproducibility [\#4394](https://github.com/QMCPACK/qmcpack/pull/4394)
26+
* Two-body Jastrow support for true 2D calculations [\#4289](https://github.com/QMCPACK/qmcpack/pull/4289) (contributed by @Paul-St-Young)
27+
* Fix for very large calculations requesting too large grids in CUDA spline implementation [\#4421](https://github.com/QMCPACK/qmcpack/pull/4421) (contributed by @pwang234)
28+
* Bugfix in the batched OpenMP offload implementation memory errors [\#4408](https://github.com/QMCPACK/qmcpack/pull/4408) when the
29+
number of splines is not a perfectly aligned size (multiple of 8 single precision or 4 double precision).
30+
* Updates to test tolerances for many build types and platforms to improve reliability of deterministic tests. Goal: `ctest -L
31+
deterministic` should pass on all platforms. Please report any failures.
32+
* Improved CMake configuration including detecting use of parallel HDF5 in non-MPI builds
33+
[\#4420](https://github.com/QMCPACK/qmcpack/pull/4420) and detection of missing OpenMP support
34+
[\#4422](https://github.com/QMCPACK/qmcpack/pull/4422)
35+
* Optimization of spinor wavefunctions with spin-orbit and pseudopotentials re-enabled
36+
[\#4418](https://github.com/QMCPACK/qmcpack/pull/4418)
37+
* QMCPACK output now indicates status of QMC_COMPLEX [\#4412](https://github.com/QMCPACK/qmcpack/pull/4412)
38+
* Initial work for eventual GPU offloading of Gaussian basis wavefunctions for molecules and solids
39+
[\#4407](https://github.com/QMCPACK/qmcpack/pull/4407)
40+
* Bugfix to support one-body Jastrow functions where only a subset of elements is given
41+
[\#4405](https://github.com/QMCPACK/qmcpack/pull/4405)
42+
* Electron coordinates are printed in case a NaN is detected [\#4401](https://github.com/QMCPACK/qmcpack/pull/4401)
43+
* To evade support problems for complex reductions in OpenMP offload compilers, real builds no longer reference any complex
44+
reductions [\#4379](https://github.com/QMCPACK/qmcpack/pull/4379)
45+
* Enabled HIP as language in CMake (requires >= 3.21) [\#3646](https://github.com/QMCPACK/qmcpack/pull/3646). When using HIP
46+
targeting AMD GPUs, replace HIP_ARCH with CMAKE_HIP_ARCHITECTURES if HIP_ARCH was used to specify the GPU architectures.
47+
* Refinements to SYCL usage, e.g., [\#4384](https://github.com/QMCPACK/qmcpack/pull/4384),
48+
[\#4382](https://github.com/QMCPACK/qmcpack/pull/4382), [\#4380](https://github.com/QMCPACK/qmcpack/pull/4380)
49+
* Many expanded tests including for NLPP parameter derivatives [\#4394](https://github.com/QMCPACK/qmcpack/pull/4394), more boundary
50+
conditions in distance tables [\#4374](https://github.com/QMCPACK/qmcpack/pull/4374), for reptation Monte Carlo observables
51+
[\#4327](https://github.com/QMCPACK/qmcpack/pull/4327), and orbital rotations
52+
[\#4304](https://github.com/QMCPACK/qmcpack/pull/4304)
53+
* Many updates to HDF5 usage including adoption of HDF5 1.10 API [\#4352](https://github.com/QMCPACK/qmcpack/pull/4352) and
54+
related cleanup, e.g. [\#4300](https://github.com/QMCPACK/qmcpack/pull/4300)
55+
* Initial Perlmutter CPU build recipe [\#4398](https://github.com/QMCPACK/qmcpack/pull/4398)
56+
* Initial ALCF Sunspot build recipe including offloading to Intel Ponte Vecchio/Xe HPC GPU
57+
[\#4391](https://github.com/QMCPACK/qmcpack/pull/4391)
58+
* Better support for FreeBSD [\#4416](https://github.com/QMCPACK/qmcpack/pull/4416)
59+
* Minimum supported Intel classic compiler version is 2021.1. [\#4389](https://github.com/QMCPACK/qmcpack/pull/4389)
60+
* Ongoing improvement to orbital optimization and rotation, e.g. [\#4288](https://github.com/QMCPACK/qmcpack/pull/4288), [\#4402](https://github.com/QMCPACK/qmcpack/pull/4402)
61+
* Ongoing code cleanup, e.g. [\#4276](https://github.com/QMCPACK/qmcpack/pull/4276),
62+
[\#4275](https://github.com/QMCPACK/qmcpack/pull/4275), [\#4273](https://github.com/QMCPACK/qmcpack/pull/4273)
63+
* Updated bmpi3 MPI "wrapper"
64+
* Various other small bug fixes and quality of life improvements. See the full list of merged PRs on GitHub for details.
65+
66+
### Known problems
67+
68+
* When offload builds are compiled with CUDA toolkit versions above 11.2 (tested 11.3-11.8) using LLVM15, multideterminant tests and
69+
functionality will fail, seemingly due to an issue with the toolkit. This is discussed in
70+
https://github.com/llvm/llvm-project/issues/54633 . All other functionality appears to work as expected. As a workaround, the CUDA
71+
toolkit 11.2 can be used. The actual NVIDIA drivers can be more recent.
72+
* CUDA toolkit version 12.0 is not compatible with LLVM OpenMP offload https://github.com/llvm/llvm-project/issues/60296
73+
74+
### NEXUS
75+
76+
* Nexus: Support for use of templates for job submission scripts [\#4344](https://github.com/QMCPACK/qmcpack/pull/4344)
77+
* Nexus: twist_info.dat files now added to results directory for easier analysis of twist average quantities
78+
[\#4302](https://github.com/QMCPACK/qmcpack/pull/4302)
79+
* Nexus: Initial support for Polaris at ALCF [\#4354](https://github.com/QMCPACK/qmcpack/pull/4354)
80+
* Nexus: Initial support for Perlmutter at NERSC [\#4356](https://github.com/QMCPACK/qmcpack/pull/4356)
81+
* Nexus: Support for gpusharing keyword for legacy CUDA [\#4403](https://github.com/QMCPACK/qmcpack/pull/4403)
82+
* Nexus: Support for handling multiple pickle protocols [\#4385](https://github.com/QMCPACK/qmcpack/pull/4385)
83+
* Nexus: CPU/GPU flags for batched code [\#4341](https://github.com/QMCPACK/qmcpack/pull/4341)
84+
* Nexus: Jastrow factors can be read from existing files [\#4339](https://github.com/QMCPACK/qmcpack/pull/4339)
85+
* Nexus: Fix VASP POSCAR write [\#4331](https://github.com/QMCPACK/qmcpack/pull/4331)
86+
* Nexus: Better handling of VASP pseudopotentials [\#4330](https://github.com/QMCPACK/qmcpack/pull/4330)
87+
88+
### Known problems
89+
90+
* The new QE7.1 DFT+U input style is not yet supported [\#4100](https://github.com/QMCPACK/qmcpack/issues/4100)
91+
592
## [3.15.0] - 2022-09-29
693

794
This is a recommended release for all users. There are many quality of life
@@ -65,7 +152,7 @@ be required, we recommend trying these drivers now and reporting any issues.
65152
* Minimum CUDA version is 11.0 [\#3957](https://github.com/QMCPACK/qmcpack/pull/3957)
66153
* Minimum version of GCC is now v9.
67154

68-
### Nexus
155+
### NEXUS
69156

70157
* Nexus: support to current batched driver style. Example inputs for batched
71158
runs using trial wavefunctions from QE are included in

CMake/ClangCompilers.cmake

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ if(QMC_OMP)
4949

5050
if(NOT DEFINED OFFLOAD_ARCH
5151
AND OFFLOAD_TARGET MATCHES "amdgcn")
52-
if (DEFINED HIP_ARCH)
53-
list(LENGTH HIP_ARCH NUMBER_HIP_ARCHITECTURES)
54-
if(NUMBER_HIP_ARCHITECTURES EQUAL "1")
55-
set(OFFLOAD_ARCH ${HIP_ARCH})
52+
if (DEFINED CMAKE_HIP_ARCHITECTURES)
53+
list(LENGTH CMAKE_HIP_ARCHITECTURES NUMBER_CMAKE_HIP_ARCHITECTURESITECTURES)
54+
if(NUMBER_CMAKE_HIP_ARCHITECTURESITECTURES EQUAL "1")
55+
set(OFFLOAD_ARCH ${CMAKE_HIP_ARCHITECTURES})
5656
else()
5757
message(
5858
FATAL_ERROR
5959
"LLVM does not yet support offload to multiple architectures! "
60-
"Deriving OFFLOAD_ARCH from HIP_ARCH failed. "
61-
"Please keep only one entry in HIP_ARCH or set OFFLOAD_ARCH.")
60+
"Deriving OFFLOAD_ARCH from CMAKE_HIP_ARCHITECTURES failed. "
61+
"Please keep only one entry in CMAKE_HIP_ARCHITECTURES or set OFFLOAD_ARCH.")
6262
endif()
6363
else()
6464
set(OFFLOAD_ARCH gfx906)

CMake/IntelCompilers.cmake

+5-7
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,15 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
77
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2021.3)
88
message(FATAL_ERROR "Requires Intel oneAPI 2021.3 or higher!")
99
endif()
10-
elseif(INTEL_ONEAPI_COMPILER_FOUND)
11-
# in this case, the version string reported based on Clang, not accurate enough. just skip check.
1210
else()
13-
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.1.0)
14-
message(FATAL_ERROR "Requires Intel classic compiler 19.1 or higher!")
11+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2021.1)
12+
message(FATAL_ERROR "Requires Intel classic compiler 2021.1 or higher!")
1513
endif()
1614
endif()
1715

1816
# Enable OpenMP
1917
if(QMC_OMP)
20-
if(CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" OR INTEL_ONEAPI_COMPILER_FOUND)
18+
if(CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
2119
if(ENABLE_OFFLOAD)
2220
set(OFFLOAD_TARGET
2321
"spir64"
@@ -35,7 +33,7 @@ if(QMC_OMP)
3533
endif()
3634
endif(QMC_OMP)
3735

38-
if(CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" OR INTEL_ONEAPI_COMPILER_FOUND)
36+
if(CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
3937
# oneAPI compiler options
4038

4139
# Set clang specific flags (which we always want)
@@ -84,7 +82,7 @@ endif()
8482
if(NOT CMAKE_SYSTEM_NAME STREQUAL "CrayLinuxEnvironment")
8583

8684
# use -x for classic compiler only. this option is not robust with oneAPI compiler as 2021.3 release
87-
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" AND NOT INTEL_ONEAPI_COMPILER_FOUND)
85+
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
8886
set(X_OPTION "^-x| -x")
8987
set(AX_OPTION "^-ax| -ax")
9088
#check if the user has already specified -x option for cross-compiling.

CMake/IntelDPCPPConfig-modified.cmake

-5
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,6 @@ if( "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang" OR
233233
set(SYCL_FLAGS "-fsycl")
234234
endif()
235235

236-
# Based on Compiler ID, add support for DPCPP
237-
if( "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntelLLVM")
238-
list(PREPEND SYCL_FLAGS "--dpcpp")
239-
endif()
240-
241236
# TODO verify if this is needed
242237
# Windows: Add Exception handling
243238
if(WIN32)

CMake/TestCxx17Library.cmake

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ if(NOT CXX17_LIBRARY_OKAY)
3838
message("compiler is ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
3939
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
4040
message("Compiler detected is g++.\n Use version 9.0 or newer for complete C++17 standard library support.")
41-
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
41+
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
4242
message(
43-
"Compiler detected is clang++.\n If not using libcxx, ensure a GCC toolchain version equal or greater "
44-
"than 9.0 gets picked up. Check with 'clang++ -v'. Or use the --gcc-toolchain compiler option "
45-
"(added to CMAKE_CXX_FLAGS) to point to a newer GCC installation."
43+
"Compiler detected is <Clang> namely clang++ or a vendor variant (icpx, amdclang++, armclang++).\n If not using libcxx, ensure a GCC toolchain version equal or greater "
44+
"than 9.0 gets picked up. Check with '<Clang> -v'. Or use the --gcc-toolchain compiler option "
45+
"(added to both CMAKE_C_FLAGS and CMAKE_CXX_FLAGS) to point to a newer GCC installation."
4646
)
4747
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
4848
message(

CMake/Testlibstdc++.cmake

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Test that if a C++ compiler is compatiable with the libstdc++ in use
22

3+
# Test "#include <cstdio>" before version compatibility checks.
4+
include(CheckIncludeFileCXX)
5+
check_include_file_cxx(cstdio INCLUDE_CSTDIO_WORKS)
6+
if(NOT INCLUDE_CSTDIO_WORKS)
7+
unset(INCLUDE_CSTDIO_WORKS CACHE)
8+
message(FATAL_ERROR "`#include <cstdio>` test failed! Please provide a working C++ compiler.")
9+
endif()
10+
311
try_compile(
412
LIBSTDCXX_OKAY
513
${CMAKE_BINARY_DIR}

0 commit comments

Comments
 (0)