Skip to content

Commit 129b7d8

Browse files
authored
Merge pull request #3086 from QMCPACK/rc_3110
Rc 3110
2 parents f775d65 + d8e2605 commit 129b7d8

File tree

1,682 files changed

+103600
-115136
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,682 files changed

+103600
-115136
lines changed

.github/pull_request_template.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ _Delete the items that do not apply_
1414
- Code style update (formatting, renaming)
1515
- Refactoring (no functional changes, no api changes)
1616
- Build related changes
17-
- Documentation content changes
17+
- Testing changes (e.g. new unit/integration/performance tests)
18+
- Documentation changes
1819
- Other (please describe):
1920

2021
### Does this introduce a breaking change?
+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
2+
name: GitHub Actions CI
3+
4+
on:
5+
push:
6+
branches:
7+
- develop
8+
pull_request:
9+
branches:
10+
- develop
11+
12+
jobs:
13+
14+
linux:
15+
runs-on: ubuntu-latest
16+
container: ${{ matrix.container }}
17+
env:
18+
GH_JOBNAME: ${{ matrix.jobname }}
19+
GH_OS: Linux
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
jobname: [
24+
gcc-openmpi-real-coverage,
25+
gcc-openmpi-complex-coverage,
26+
clang-openmpi-real-asan,
27+
clang-openmpi-real-ubsan
28+
]
29+
include:
30+
- jobname: gcc-openmpi-real-coverage
31+
container:
32+
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
33+
options: -u 1001
34+
35+
- jobname: gcc-openmpi-complex-coverage
36+
container:
37+
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
38+
options: -u 1001
39+
40+
- jobname: clang-openmpi-real-asan
41+
container:
42+
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
43+
options: -u 1001
44+
45+
- jobname: clang-openmpi-real-ubsan
46+
container:
47+
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
48+
options: -u 1001
49+
50+
steps:
51+
- name: Checkout Action
52+
uses: actions/checkout@v1
53+
54+
- name: Configure
55+
run: tests/test_automation/github-actions/ci/run_step.sh configure
56+
57+
- name: Build
58+
run: tests/test_automation/github-actions/ci/run_step.sh build
59+
60+
- name: Test
61+
run: tests/test_automation/github-actions/ci/run_step.sh test
62+
63+
- name: Coverage
64+
if: contains(matrix.jobname, 'coverage')
65+
run: tests/test_automation/github-actions/ci/run_step.sh coverage
66+
67+
- name: Upload Coverage
68+
if: contains(matrix.jobname, 'coverage')
69+
uses: codecov/codecov-action@v1
70+
with:
71+
file: ../qmcpack-build/coverage.xml
72+
flags: tests-deterministic # optional
73+
name: codecov-QMCPACK # optional
74+
fail_ci_if_error: true # optional (default = false)

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ qmcpack_manual.pdf
99
.DS_Store
1010
/build_*/
1111
docs/_build
12+
nexus/tests/unit/*output
13+
tests/solids/NiO_a4_e48_pp/NiO-fcc-supertwist111-supershift000-S1.h5
14+
15+
# Eclipse IDE
16+
.cproject
17+
.project
18+
.settings/
19+
.pydevproject

CHANGELOG.md

+45
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,51 @@
22

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

5+
## [3.11.0] - 2021-04-09
6+
7+
### Notes
8+
9+
This release includes a large number of refinements to QMCPACK and the supporting ecosystem. These include support for the latest version of
10+
Quantum ESPRESSO, new capabilities in AFQMC, space-warp transformation for forces, numerous bug fixes, user-requested feature improvements,
11+
and further upgrades to the test system.
12+
13+
* Quantum ESPRESSO (QE) v6.7 support. [\#2927](https://github.com/QMCPACK/qmcpack/pull/2927).
14+
* Detect and automatically use patched version of QE found on the PATH. [\#2974](https://github.com/QMCPACK/qmcpack/pull/2974).
15+
* Support for global max\_seconds and STOP file to cleanly halt QMCPACK during a run. [\#3028](https://github.com/QMCPACK/qmcpack/pull/3028).
16+
* Freezing of two-body Jastrow parameters in optimization works. [\#2814](https://github.com/QMCPACK/qmcpack/issues/2814).
17+
* Multideterminant code now works with only alpha determinants \(no down electrons\). [\#2698](https://github.com/QMCPACK/qmcpack/issues/2698).
18+
* High l-momentum channels as local channels in ECPs work. [\#2920](https://github.com/QMCPACK/qmcpack/pull/2920).
19+
* Space Warp Transformation for ZVZB Forces. [\#2828](https://github.com/QMCPACK/qmcpack/pull/2828).
20+
* Important bug fixes in legacy CUDA implementation causing incorrect energies. [\#2883](https://github.com/QMCPACK/qmcpack/pull/2883).
21+
* Implemented DLA in legacy CUDA. [\#2887](https://github.com/QMCPACK/qmcpack/pull/2887).
22+
* Updates to support CUDA 11.2.1 e.g. [\#2950](https://github.com/QMCPACK/qmcpack/pull/2950).
23+
* AFQMC supports energy estimator with different Hamiltonian \(from propagation\). [\#2795](https://github.com/QMCPACK/qmcpack/pull/2795).
24+
* Trial wavefunction optimization with spin-orbit supported. [\#3034](https://github.com/QMCPACK/qmcpack/pull/3034).
25+
* ppconvert executable automatically built when configured. [\#2904](https://github.com/QMCPACK/qmcpack/pull/2904).
26+
* Tests added for ppconvert. [\#2929](https://github.com/QMCPACK/qmcpack/issues/2929).
27+
* Fixed SIMD alignment for AVX512 on some systems. [\#2981](https://github.com/QMCPACK/qmcpack/pull/2981).
28+
* Improved wavefunction restart logic in AFQMC. [\#2942](https://github.com/QMCPACK/qmcpack/pull/2942).
29+
* Spin-density supported in batched code. [\#2840](https://github.com/QMCPACK/qmcpack/pull/2840).
30+
* Reduced I/O operations during cmake. [\#2808](https://github.com/QMCPACK/qmcpack/pull/2808).
31+
* Improved detection of unsupported-by-Intel combinations of Intel compilers and libstdc++. [\#2794](https://github.com/QMCPACK/qmcpack/pull/2794).
32+
* Initial support for Andes at OLCF. [\#3073](https://github.com/QMCPACK/qmcpack/pull/3073).
33+
* Deterministic tests expanded in scope and made reliable for more build types and compilers.
34+
* Various minor bug fixes and feature improvements based on user requests for both real-space and AFQMC.
35+
* Improved error handling throughout.
36+
* Numerous performance improvements, expansion of tests, and bug fixes to the batched VMC and DMC codes. Reasonable but not optimal GPU acceleration can now be achieved for spline-based wavefunctions.
37+
38+
### NEXUS
39+
40+
* Support AMD nodes on Cori. [\#2809](https://github.com/QMCPACK/qmcpack/pull/2809).
41+
* Interface for RMG code. [\#2932](https://github.com/QMCPACK/qmcpack/pull/2932).
42+
* Added h-channel to list of possible local channels in pseudopotential. [\#2915](https://github.com/QMCPACK/qmcpack/pull/2915).
43+
* Allow non spin-specific occupations in case of noncollinear. [\#2957](https://github.com/QMCPACK/qmcpack/pull/2957).
44+
* More robust handling of QE output when printed eigenvalues touch. [\#3042](https://github.com/QMCPACK/qmcpack/pull/3042).
45+
* Fixed type check for reblock\_factors in qmc-fit. [\#2830](https://github.com/QMCPACK/qmcpack/pull/2830).
46+
* Fixed a Jastrow read error/warning, add several QE inputs. [\#2819](https://github.com/QMCPACK/qmcpack/pull/2819).
47+
* Fixed tests on Summit. [\#2983](https://github.com/QMCPACK/qmcpack/pull/2983).
48+
* Fixed module overwrite bug in qmca. [\#2802](https://github.com/QMCPACK/qmcpack/pull/2802).
49+
550
## [3.10.0] - 2020-11-10
651

752
### Notes

CMake/CheckSIMDAlignment.cmake

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Check if AVX512 is activated in the compilation
2+
# Since cross-compiling is not unusual on HPC systems (Cray),
3+
# try_compile is robust against
4+
try_compile(CXX_COMPILER_HAVE_AVX512_MACRO ${CMAKE_BINARY_DIR}
5+
${PROJECT_CMAKE}/try_compile_sources/check_AVX512.cpp
6+
CMAKE_FLAGS "${CMAKE_CXX_FLAGS}")
7+
8+
if (CXX_COMPILER_HAVE_AVX512_MACRO)
9+
set(default_alignment 64)
10+
else()
11+
set(default_alignment 32)
12+
endif()

CMake/ClangCompilers.cmake

+11-29
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ IF ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0 )
44
MESSAGE(FATAL_ERROR "Requires clang 7.0 or higher ")
55
ENDIF()
66

7+
IF ( CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 11.0.0 AND QMC_CXX_STANDARD EQUAL 17 AND BUILD_AFQMC )
8+
MESSAGE(FATAL_ERROR "Avoid Clang 11.0.0 which cannot compile AFQMC properly with C++17!")
9+
ENDIF()
10+
711
# Set the std
812
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
913

@@ -12,10 +16,14 @@ IF(QMC_OMP)
1216
SET(ENABLE_OPENMP 1)
1317
IF(ENABLE_OFFLOAD AND NOT CMAKE_SYSTEM_NAME STREQUAL "CrayLinuxEnvironment")
1418
SET(OFFLOAD_TARGET "nvptx64-nvidia-cuda" CACHE STRING "Offload target architecture")
19+
SET(OPENMP_OFFLOAD_COMPILE_OPTIONS "-fopenmp-targets=${OFFLOAD_TARGET}")
20+
1521
IF(DEFINED OFFLOAD_ARCH)
16-
SET(CLANG_OPENMP_OFFLOAD_FLAGS "-fopenmp-targets=${OFFLOAD_TARGET} -Xopenmp-target=${OFFLOAD_TARGET} -march=${OFFLOAD_ARCH}")
17-
ELSE()
18-
SET(CLANG_OPENMP_OFFLOAD_FLAGS "-fopenmp-targets=${OFFLOAD_TARGET}")
22+
SET(OPENMP_OFFLOAD_COMPILE_OPTIONS "${OPENMP_OFFLOAD_COMPILE_OPTIONS} -Xopenmp-target=${OFFLOAD_TARGET} -march=${OFFLOAD_ARCH}")
23+
ENDIF()
24+
25+
IF(OFFLOAD_TARGET MATCHES "nvptx64")
26+
SET(OPENMP_OFFLOAD_COMPILE_OPTIONS "${OPENMP_OFFLOAD_COMPILE_OPTIONS} -Wno-unknown-cuda-version")
1927
ENDIF()
2028

2129
# Intel clang compiler needs a different flag for the host side OpenMP library when offload is used.
@@ -110,12 +118,6 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64" OR CMAKE_SYSTEM_PROCESSOR MATCHES
110118
ENDIF()
111119
ENDIF()
112120

113-
# Add OpenMP offload flags
114-
# This step is intentionally put after the -march parsing for CPUs.
115-
IF(DEFINED CLANG_OPENMP_OFFLOAD_FLAGS)
116-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CLANG_OPENMP_OFFLOAD_FLAGS}")
117-
ENDIF()
118-
119121
# Add static flags if necessary
120122
IF(QMC_BUILD_STATIC)
121123
SET(CMAKE_CXX_LINK_FLAGS " -static")
@@ -139,23 +141,3 @@ IF(XRAY_PROFILE)
139141
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XRAY_FLAGS}")
140142
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${XRAY_FLAGS}")
141143
ENDIF(XRAY_PROFILE)
142-
143-
SET(LLVM_SANITIZE_ADDRESS FALSE CACHE BOOL "Use llvm address sanitizer library")
144-
MARK_AS_ADVANCED(LLVM_SANITIZE_ADDRESS)
145-
IF(LLVM_SANITIZE_ADDRESS)
146-
SET(CMAKE_C_FLAGS "-fno-omit-frame-pointer -fsanitize=address -fsanitize-address-use-after-scope ${CMAKE_C_FLAGS}")
147-
SET(CMAKE_CXX_FLAGS "-fno-omit-frame-pointer -fsanitize=address -fsanitize-address-use-after-scope ${CMAKE_CXX_FLAGS}")
148-
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=address -fsanitize-address-use-after-scope")
149-
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=address -fsanitize-address-use-after-scope")
150-
ENDIF(LLVM_SANITIZE_ADDRESS)
151-
152-
# Don't expect this to be useful unless you have msan instrumented all libraries
153-
SET(LLVM_SANITIZE_MEMORY FALSE CACHE BOOL "Use llvm memory sanitizer library")
154-
MARK_AS_ADVANCED(LLVM_SANITIZE_MEMORY)
155-
IF(LLVM_SANITIZE_MEMORY)
156-
SET(LLVM_BLACKLIST_SANITIZE_MEMORY "-fsanitize-blacklist=${PROJECT_SOURCE_DIR}/llvm_misc/memory_sanitizer_blacklist.txt")
157-
SET(CMAKE_C_FLAGS_DEBUG "-fsanitize=memory ${LLVM_BLACKLIST_SANITIZE_MEMORY} ${CMAKE_C_FLAGS_DEBUG}")
158-
SET(CMAKE_CXX_FLAGS_DEBUG "-fsanitize=memory ${LLVM_BLACKLIST_SANITIZE_MEMORY} ${CMAKE_CXX_FLAGS_DEBUG}")
159-
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=memory ${LLVM_BLACKLIST_SANITIZE_MEMORY}")
160-
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=memory ${LLVM_BLACKLIST_SANITIZE_MEMORY}")
161-
ENDIF(LLVM_SANITIZE_MEMORY)

CMake/FindQE.cmake

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Locate QE via the patched pw2qmcpack.x
2+
# Require both to be present to consider QE_FOUND
3+
# Take QE_BIN as hint for location
4+
5+
FIND_PATH(QE_PW_DIR pw.x HINTS ${QE_BIN})
6+
FIND_PATH(QE_PW2Q_DIR pw2qmcpack.x HINTS ${QE_BIN})
7+
8+
SET(QE_FOUND FALSE)
9+
IF(QE_PW2Q_DIR AND QE_PW_DIR)
10+
IF ( NOT (QE_PW2Q_DIR STREQUAL QE_PW_DIR) )
11+
MESSAGE(WARNING "Found pw.x and pw2qmcpack.x in different locations, ${QE_PW_DIR} and ${QE_PW2Q_DIR}, verify this is intentional.")
12+
ENDIF()
13+
#MESSAGE(STATUS "QE_PW2Q_DIR=${QE_PW2Q_DIR}")
14+
#MESSAGE(STATUS "QE_PW_DIR=${QE_PW_DIR}")
15+
SET(QE_FOUND TRUE)
16+
ENDIF()
17+
18+
MARK_AS_ADVANCED(
19+
QE_PW2Q_DIR
20+
QE_PW_DIR
21+
QE_FOUND
22+
)

CMake/GNUCompilers.cmake

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Check compiler version
2-
IF ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 )
3-
MESSAGE(FATAL_ERROR "Requires gcc 5.0 or higher ")
2+
IF ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0 )
3+
MESSAGE(FATAL_ERROR "Requires gcc 7.0 or higher ")
44
ENDIF()
55

66
# Set the std
@@ -11,6 +11,10 @@ IF(QMC_OMP)
1111
SET(ENABLE_OPENMP 1)
1212
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
1313
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
14+
IF(ENABLE_OFFLOAD AND NOT CMAKE_SYSTEM_NAME STREQUAL "CrayLinuxEnvironment")
15+
SET(OFFLOAD_TARGET "nvptx-none" CACHE STRING "Offload target architecture")
16+
SET(OPENMP_OFFLOAD_COMPILE_OPTIONS "-foffload=${OFFLOAD_TARGET} -foffload=\"-lm -latomic\"")
17+
ENDIF()
1418
ENDIF(QMC_OMP)
1519

1620
# Set gnu specific flags (which we always want)

CMake/IBMCompilers.cmake

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ SET( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3" )
2626

2727
IF(QMC_OMP)
2828
SET(ENABLE_OPENMP 1)
29+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qsmp=omp")
30+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qsmp=omp")
2931
IF(ENABLE_OFFLOAD)
30-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qsmp=omp -qoffload")
31-
ELSE(ENABLE_OFFLOAD)
32-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qsmp=omp")
32+
set(OPENMP_OFFLOAD_COMPILE_OPTIONS "-qoffload")
3333
ENDIF(ENABLE_OFFLOAD)
3434
ELSE(QMC_OMP)
3535
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qnothreaded")

CMake/PGICompilers.cmake

+10-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -c99")
99
IF(QMC_OMP)
1010
SET(ENABLE_OPENMP 1)
1111
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mp=allcores")
12-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mp=allcores")
12+
IF(ENABLE_OFFLOAD AND NOT CMAKE_SYSTEM_NAME STREQUAL "CrayLinuxEnvironment")
13+
MESSAGE(WARNING "QMCPACK OpenMP offload is not ready for NVIDIA HPC compiler.")
14+
IF(NOT DEFINED OFFLOAD_ARCH)
15+
MESSAGE(FATAL_ERROR "NVIDIA HPC compiler requires -gpu=ccXX option set based on the target GPU architecture! "
16+
"Please add -DOFFLOAD_ARCH=ccXX to cmake. For example, cc70 is for Volta.")
17+
ENDIF()
18+
SET(OPENMP_OFFLOAD_COMPILE_OPTIONS "-mp=gpu -gpu=${OFFLOAD_ARCH}")
19+
ELSE()
20+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mp=allcores")
21+
ENDIF()
1322
ENDIF(QMC_OMP)
1423

1524
ADD_DEFINITIONS( -Drestrict=__restrict__ )

CMake/TestCxx14Library.cmake

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (NOT CXX14_LIBRARY_OKAY)
2727
set(COMPILE_FAIL_OUTPUT cpp14_compile_fail.txt)
2828
file(WRITE "${CMAKE_BINARY_DIR}/${COMPILE_FAIL_OUTPUT}" "${COMPILE_OUTPUT}")
2929

30-
message(STATUS "C++ 14 standard library support not found")
30+
message(STATUS "C++14 standard library support not found")
3131
message("compiler is ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
3232
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
3333
message("Compiler detected is g++.\n Use version 5.0 or newer for a C++14 standard library")
@@ -39,6 +39,5 @@ if (NOT CXX14_LIBRARY_OKAY)
3939
message(" Output of test compile is in ${COMPILE_FAIL_OUTPUT}")
4040
message(FATAL_ERROR "stopping")
4141
else()
42-
message(STATUS "C++ 14 standard library supported")
42+
message(STATUS "C++14 standard library supported")
4343
endif()
44-

CMake/TestCxx17Library.cmake

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
# Test that the compiler is configured with a C++17 standard library
3+
4+
set(TEST_CXX17_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/try_cxx17_library.cpp)
5+
file(WRITE ${TEST_CXX17_SOURCE}
6+
"// Test for C++17 standard library support
7+
#include <variant>
8+
#include <string>
9+
10+
int main(int argc, char **argv)
11+
{
12+
std::variant<int, float, std::string> intFloatString;
13+
return 0;
14+
}
15+
")
16+
17+
18+
try_compile(CXX17_LIBRARY_OKAY ${CMAKE_BINARY_DIR}
19+
${TEST_CXX17_SOURCE}
20+
CXX_STANDARD 17
21+
CXX_STANDARD_REQUIRED ON
22+
OUTPUT_VARIABLE COMPILE_OUTPUT)
23+
24+
25+
if (NOT CXX17_LIBRARY_OKAY)
26+
set(COMPILE_FAIL_OUTPUT cpp17_compile_fail.txt)
27+
file(WRITE "${CMAKE_BINARY_DIR}/${COMPILE_FAIL_OUTPUT}" "${COMPILE_OUTPUT}")
28+
29+
message(STATUS "C++17 standard library support not found")
30+
message("compiler is ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
31+
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
32+
message("Compiler detected is g++.\n Use version 7.0 or newer for C++17 standard library support.")
33+
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
34+
message("Compiler detected is clang++.\n If not using libcxx, ensure a g++ version greater than 7.0 is also on the path so that its C++17 library can be used.")
35+
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
36+
message("Compiler detected is icpc.\n Ensure a gcc version greater than 7.0 is also on the path so that its C++17 library can be used. Or use the -cxxlib switch to point to a newer gcc install.")
37+
endif()
38+
message(" Output of test compile is in ${COMPILE_FAIL_OUTPUT}")
39+
message(FATAL_ERROR "stopping")
40+
else()
41+
message(STATUS "C++17 standard library supported")
42+
endif()

CMake/Testlibstdc++.cmake

+1-16
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11

22
# Test that if a C++ compiler is compatiable with the libstdc++ in use
33

4-
set(TEST_LIBSTDCXX_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/try_libstdcxx.cpp)
5-
file(WRITE ${TEST_LIBSTDCXX_SOURCE}
6-
"// Test the compatibility between the compiler and the libstdc++ from GNU
7-
#include <cstdio>
8-
9-
int main(int argc, char **argv)
10-
{
11-
#if ( ( __INTEL_COMPILER == 1800 ) && ( _GLIBCXX_RELEASE > 7 ) )
12-
#error too new libstdc++ from GNU for Intel 18, use GNU version <= 7
13-
#endif
14-
return 0;
15-
}
16-
")
17-
18-
194
try_compile(LIBSTDCXX_OKAY ${CMAKE_BINARY_DIR}
20-
${TEST_LIBSTDCXX_SOURCE}
5+
${PROJECT_CMAKE}/try_compile_sources/check_libstdcxx.cpp
216
CXX_STANDARD 14
227
CXX_STANDARD_REQUIRED ON
238
OUTPUT_VARIABLE COMPILE_OUTPUT)

CMake/ctest_script.cmake

-4
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,6 @@ IF ( DEFINED QMC_MIXED_PRECISION )
199199
SET( CTEST_OPTIONS "${CTEST_OPTIONS};-DQMC_MIXED_PRECISION=${QMC_MIXED_PRECISION}" )
200200
ENDIF()
201201

202-
IF ( DEFINED ENABLE_SOA )
203-
SET( CTEST_OPTIONS "${CTEST_OPTIONS};-DENABLE_SOA=${ENABLE_SOA}" )
204-
ENDIF()
205-
206202
IF ( DEFINED CUDA_ARCH )
207203
SET( CTEST_OPTIONS "${CTEST_OPTIONS};-DCUDA_ARCH='${CUDA_ARCH}'" )
208204
ENDIF()

0 commit comments

Comments
 (0)