Skip to content

Commit 4031363

Browse files
authored
CMake: Deprecate ENABLE_LIBCOMM and rename options (#7620)
* CMake: Treat LibComm as a LibRI implementation dependency * Drop unused ENABLE_DEEPKS and ENABLE_MLKEDF * Update CMake option * Update documentation * Rename compile definition * FindKML: if(DEFINED ENABLE_OPENMP AND ENABLE_OPENMP) -> if(ENABLE_OPENMP) * Adopt to toolchain building script * Adjust generate_build_info.sh * Link ABACUS binary under build root * Update README.md and RapidJSON CMake test in toolchain
1 parent 9e7a043 commit 4031363

29 files changed

Lines changed: 157 additions & 136 deletions

CMakeLists.txt

Lines changed: 53 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ project(
1414
LANGUAGES CXX)
1515

1616
option(ENABLE_MPI "Enable MPI" ON)
17-
option(USE_OPENMP "Enable OpenMP" ON)
17+
option(ENABLE_OPENMP "Enable OpenMP" ON)
1818
option(USE_CUDA "Enable CUDA" OFF)
1919
option(USE_CUDA_MPI "Enable CUDA-aware MPI" OFF)
2020
option(USE_CUDA_ON_DCU "Enable CUDA on DCU" OFF)
@@ -23,27 +23,23 @@ option(USE_DSP "Enable DSP" OFF)
2323
option(USE_KML "Enable Kunpeng Math Library" OFF)
2424
option(USE_SW "Enable SW Architecture" OFF)
2525

26-
option(USE_ABACUS_LIBM "Build libmath from source to speed up" OFF)
26+
option(ENABLE_ABACUS_LIBM "Build libmath from source to speed up" OFF)
2727
option(ENABLE_LIBXC "Enable using the LibXC package" OFF)
2828
option(ENABLE_FLOAT_FFTW "Enable using single-precision FFTW library." OFF)
2929

30-
# option(ENABLE_DEEPKS "Enable the DeePKS algorithm" OFF)
31-
# option(ENABLE_MLKEDF "Enable the Machine-Learning-based KEDF for OFDFT" OFF)
32-
3330
option(ENABLE_MLALGO "Enable the machine learning algorithms" OFF)
3431

3532
option(ENABLE_LCAO "Enable LCAO algorithm" ON)
36-
option(USE_ELPA "Enable ELPA for LCAO" ON)
33+
option(ENABLE_ELPA "Enable ELPA for LCAO" ON)
3734
option(ENABLE_LIBRI "Enable LibRI for hybrid functional" OFF)
3835
option(EXX_DEV "Enable LibRI developing features" OFF)
39-
option(ENABLE_LIBCOMM "Enable LibComm" OFF)
4036
option(ENABLE_PEXSI "Enable PEXSI for LCAO" OFF)
4137
option(ENABLE_DFTD4 "Enable DFT-D4 dispersion correction" OFF)
4238

4339
option(BUILD_TESTING "Build unittests" OFF)
4440
option(DEBUG_INFO "Print message to debug" OFF)
4541
option(ENABLE_ASAN "Enable AddressSanitizer" OFF)
46-
option(INFO "Enable gathering math library information" OFF)
42+
option(MATH_INFO "Enable gathering math library information" OFF)
4743
option(ENABLE_COVERAGE "Enable coverage build" OFF)
4844
option(GIT_SUBMODULE "Check submodules during build" ON)
4945

@@ -59,6 +55,43 @@ option(ENABLE_CNPY "Enable cnpy usage" OFF)
5955
option(ENABLE_CUSOLVERMP "Enable cusolvermp" OFF)
6056
option(ENABLE_NCCL_PARALLEL_DEVICE "Enable NCCL-backed collectives in parallel_device" OFF)
6157

58+
# ==============================================================================
59+
# Deprecated options (TODO: Remove this section in the future release)
60+
# ==============================================================================
61+
function(abacus_rename_option old_name new_name)
62+
get_property(_old_defined CACHE "${old_name}" PROPERTY TYPE SET)
63+
if(NOT _old_defined)
64+
return()
65+
endif()
66+
message(WARNING "${old_name} has been renamed to ${new_name}.")
67+
get_property(_type CACHE "${new_name}" PROPERTY TYPE)
68+
get_property(_help CACHE "${new_name}" PROPERTY HELPSTRING)
69+
set("${new_name}" "${${old_name}}" CACHE "${_type}" "${_help}" FORCE)
70+
unset("${old_name}" CACHE)
71+
endfunction()
72+
abacus_rename_option(USE_OPENMP ENABLE_OPENMP)
73+
abacus_rename_option(USE_ABACUS_LIBM ENABLE_ABACUS_LIBM)
74+
abacus_rename_option(USE_ELPA ENABLE_ELPA)
75+
abacus_rename_option(INFO MATH_INFO)
76+
77+
if(DEFINED CACHE{ENABLE_LIBCOMM})
78+
message(
79+
WARNING
80+
"Option ENABLE_LIBCOMM is deprecated and will be ignored in a future release. "
81+
"LibComm is now treated as an implementation dependency of LibRI; "
82+
"please use -DENABLE_LIBRI=ON instead."
83+
)
84+
if(ENABLE_LIBCOMM AND NOT ENABLE_LIBRI)
85+
message(
86+
FATAL_ERROR
87+
"ENABLE_LIBCOMM was set, but LibComm is not a standalone ABACUS feature. "
88+
"Please use -DENABLE_LIBRI=ON instead."
89+
)
90+
endif()
91+
unset(ENABLE_LIBCOMM CACHE)
92+
endif()
93+
# ==============================================================================
94+
6295
# CTest defines BUILD_TESTING when it is first included. Include it only after
6396
# ABACUS has declared its OFF-by-default option above.
6497
include(CTest)
@@ -139,7 +172,7 @@ endif()
139172

140173
# Serial version of ABACUS will not use ELPA
141174
if(NOT ENABLE_MPI)
142-
set(USE_ELPA OFF)
175+
set(ENABLE_ELPA OFF)
143176
set(ENABLE_MLALGO OFF)
144177
endif()
145178

@@ -203,7 +236,7 @@ endif()
203236

204237
# Use DSP hardware
205238
if (USE_DSP)
206-
set(USE_ELPA OFF)
239+
set(ENABLE_ELPA OFF)
207240
set(ABACUS_BIN_NAME abacus_dsp)
208241
endif()
209242

@@ -288,14 +321,14 @@ endif()
288321
if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
289322
# stick to strict floating point model on Intel Compiler
290323
add_compile_options(-fp-model=strict)
291-
set(USE_ABACUS_LIBM OFF) # Force turn off USE_ABACUS_LIBM on Intel Compiler
324+
set(ENABLE_ABACUS_LIBM OFF) # Force turn off ENABLE_ABACUS_LIBM on Intel Compiler
292325
set(CMAKE_CXX_FLAGS
293326
"${CMAKE_CXX_FLAGS} -Wno-write-strings "
294327
)
295328
endif()
296329

297-
if(USE_ABACUS_LIBM)
298-
abacus_add_feature_definitions(USE_ABACUS_LIBM)
330+
if(ENABLE_ABACUS_LIBM)
331+
abacus_add_feature_definitions(__ABACUS_LIBM)
299332
endif()
300333

301334
if(ENABLE_NATIVE_OPTIMIZATION)
@@ -311,9 +344,8 @@ if(WIN32)
311344
endif()
312345

313346
if(ENABLE_LCAO)
314-
find_package(cereal CONFIG REQUIRED)
315347
abacus_add_feature_definitions(__LCAO)
316-
if(USE_ELPA)
348+
if(ENABLE_ELPA)
317349
find_package(ELPA REQUIRED)
318350
abacus_add_feature_definitions(__ELPA)
319351
endif()
@@ -364,7 +396,7 @@ endif()
364396

365397
find_package(Threads REQUIRED)
366398

367-
if(USE_OPENMP)
399+
if(ENABLE_OPENMP)
368400
find_package(OpenMP REQUIRED)
369401
endif()
370402

@@ -484,7 +516,7 @@ if(USE_CUDA)
484516
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
485517
set(CMAKE_CUDA_FLAGS_DEBUG "${CMAKE_CUDA_FLAGS_DEBUG} -g -G" CACHE STRING "CUDA flags for debug build" FORCE)
486518
endif()
487-
if (USE_OPENMP AND OpenMP_CXX_FOUND)
519+
if (ENABLE_OPENMP AND OpenMP_CXX_FOUND)
488520
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=${OpenMP_CXX_FLAGS}" CACHE STRING "CUDA flags" FORCE)
489521
endif()
490522
if (ENABLE_NCCL_PARALLEL_DEVICE)
@@ -654,33 +686,18 @@ function(git_submodule_update)
654686
endif()
655687
endfunction()
656688

657-
if(DEFINED LIBRI_DIR)
658-
set(ENABLE_LIBRI ON)
659-
endif()
660689
if(ENABLE_LIBRI)
661690
set_if_higher(CMAKE_CXX_STANDARD 14)
662-
if(LIBRI_DIR)
663-
else()
664-
find_package(LibRI REQUIRED)
665-
endif()
691+
find_package(LibRI REQUIRED)
692+
find_package(LibComm REQUIRED)
693+
find_package(cereal REQUIRED CONFIG)
666694
abacus_add_feature_definitions(__EXX EXX_DM=3 EXX_H_COMM=2 TEST_EXX_LCAO=0
667695
TEST_EXX_RADIAL=1)
668696
if(EXX_DEV)
669697
abacus_add_feature_definitions(__EXX_DEV)
670698
endif()
671699
endif()
672700

673-
if(ENABLE_LIBRI OR DEFINED LIBCOMM_DIR)
674-
set(ENABLE_LIBCOMM ON)
675-
endif()
676-
if(ENABLE_LIBCOMM)
677-
if(LIBCOMM_DIR)
678-
else()
679-
find_package(LibComm REQUIRED)
680-
endif()
681-
endif()
682-
683-
684701
if(ENABLE_LIBXC)
685702
find_package(Libxc CONFIG REQUIRED)
686703
if(Libxc_VERSION VERSION_LESS "5.1.7")
@@ -712,7 +729,7 @@ endif()
712729

713730
abacus_add_feature_definitions(__FFTW3 __SELINV METIS)
714731

715-
if(INFO)
732+
if(MATH_INFO)
716733
message(STATUS "Will gather math lib info.")
717734
abacus_add_feature_definitions(GATHER_INFO)
718735
# modifications on blas_connector and lapack_connector

cmake/CollectBuildInfoVars.cmake

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,16 @@ if(ENABLE_MPI)
136136
endif()
137137

138138
# OpenMP Version
139-
if(USE_OPENMP AND OpenMP_CXX_VERSION)
139+
if(ENABLE_OPENMP AND OpenMP_CXX_VERSION)
140140
set(ABACUS_OPENMP_VERSION "yes (v${OpenMP_CXX_VERSION})")
141-
elseif(USE_OPENMP)
141+
elseif(ENABLE_OPENMP)
142142
set(ABACUS_OPENMP_VERSION "yes (version unknown)")
143143
else()
144144
set(ABACUS_OPENMP_VERSION "no")
145145
endif()
146146

147147
# Core Math Libraries
148-
if(ENABLE_LCAO AND USE_ELPA)
148+
if(ENABLE_LCAO AND ENABLE_ELPA)
149149
set(ABACUS_ELPA_VERSION "yes (version unknown)")
150150
if(ELPA_VERSION)
151151
set(ABACUS_ELPA_VERSION "yes (v${ELPA_VERSION})")
@@ -208,30 +208,6 @@ else()
208208
set(ABACUS_FFTW_VERSION "no (using MKL or SW)")
209209
endif()
210210

211-
# Cereal Version (Enhanced)
212-
if(ENABLE_LCAO)
213-
set(ABACUS_CEREAL_VERSION "yes (version unknown)")
214-
if(NOT CEREAL_INCLUDE_DIR)
215-
find_path(CEREAL_INCLUDE_DIR cereal/version.hpp)
216-
endif()
217-
if(CEREAL_INCLUDE_DIR AND EXISTS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp")
218-
file(STRINGS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp" CEREAL_MAJOR_LINE REGEX "^#define CEREAL_VERSION_MAJOR")
219-
file(STRINGS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp" CEREAL_MINOR_LINE REGEX "^#define CEREAL_VERSION_MINOR")
220-
file(STRINGS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp" CEREAL_PATCH_LINE REGEX "^#define CEREAL_VERSION_PATCH")
221-
string(REGEX REPLACE "^#define CEREAL_VERSION_MAJOR +([0-9]+).*" "\\1" CEREAL_MAJOR "${CEREAL_MAJOR_LINE}")
222-
string(REGEX REPLACE "^#define CEREAL_VERSION_MINOR +([0-9]+).*" "\\1" CEREAL_MINOR "${CEREAL_MINOR_LINE}")
223-
string(REGEX REPLACE "^#define CEREAL_VERSION_PATCH +([0-9]+).*" "\\1" CEREAL_PATCH "${CEREAL_PATCH_LINE}")
224-
if(CEREAL_MAJOR AND CEREAL_MINOR AND CEREAL_PATCH)
225-
set(ABACUS_CEREAL_VERSION "yes (v${CEREAL_MAJOR}.${CEREAL_MINOR}.${CEREAL_PATCH})")
226-
endif()
227-
endif()
228-
if(ABACUS_CEREAL_VERSION STREQUAL "yes (version unknown)" AND CEREAL_INCLUDE_DIR)
229-
set(ABACUS_CEREAL_VERSION "yes (path: ${CEREAL_INCLUDE_DIR})")
230-
endif()
231-
else()
232-
set(ABACUS_CEREAL_VERSION "no")
233-
endif()
234-
235211
# Accelerators
236212
if(USE_CUDA AND CUDAToolkit_VERSION)
237213
set(ABACUS_CUDA_VERSION "yes (v${CUDAToolkit_VERSION})")
@@ -292,12 +268,37 @@ else()
292268
set(ABACUS_LIBRI_VERSION "no")
293269
endif()
294270

295-
if(ENABLE_LIBCOMM AND LIBCOMM_DIR)
296-
set(ABACUS_LIBCOMM_VERSION "yes (path: ${LIBCOMM_DIR})")
297-
elseif(ENABLE_LIBCOMM)
298-
set(ABACUS_LIBCOMM_VERSION "yes (version unknown)")
271+
# LibComm Version
272+
if(ENABLE_LIBRI AND LIBCOMM_DIR)
273+
set(ABACUS_LIBCOMM_VERSION "yes (path: ${LIBCOMM_DIR})")
274+
elseif(ENABLE_LIBRI)
275+
set(ABACUS_LIBCOMM_VERSION "yes (version unknown)")
299276
else()
300-
set(ABACUS_LIBCOMM_VERSION "no")
277+
set(ABACUS_LIBCOMM_VERSION "no")
278+
endif()
279+
280+
# Cereal Version (Enhanced)
281+
if(ENABLE_LIBRI)
282+
set(ABACUS_CEREAL_VERSION "yes (version unknown)")
283+
if(NOT CEREAL_INCLUDE_DIR)
284+
find_path(CEREAL_INCLUDE_DIR cereal/version.hpp)
285+
endif()
286+
if(CEREAL_INCLUDE_DIR AND EXISTS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp")
287+
file(STRINGS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp" CEREAL_MAJOR_LINE REGEX "^#define CEREAL_VERSION_MAJOR")
288+
file(STRINGS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp" CEREAL_MINOR_LINE REGEX "^#define CEREAL_VERSION_MINOR")
289+
file(STRINGS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp" CEREAL_PATCH_LINE REGEX "^#define CEREAL_VERSION_PATCH")
290+
string(REGEX REPLACE "^#define CEREAL_VERSION_MAJOR +([0-9]+).*" "\\1" CEREAL_MAJOR "${CEREAL_MAJOR_LINE}")
291+
string(REGEX REPLACE "^#define CEREAL_VERSION_MINOR +([0-9]+).*" "\\1" CEREAL_MINOR "${CEREAL_MINOR_LINE}")
292+
string(REGEX REPLACE "^#define CEREAL_VERSION_PATCH +([0-9]+).*" "\\1" CEREAL_PATCH "${CEREAL_PATCH_LINE}")
293+
if(CEREAL_MAJOR AND CEREAL_MINOR AND CEREAL_PATCH)
294+
set(ABACUS_CEREAL_VERSION "yes (v${CEREAL_MAJOR}.${CEREAL_MINOR}.${CEREAL_PATCH})")
295+
endif()
296+
endif()
297+
if(ABACUS_CEREAL_VERSION STREQUAL "yes (version unknown)" AND CEREAL_INCLUDE_DIR)
298+
set(ABACUS_CEREAL_VERSION "yes (path: ${CEREAL_INCLUDE_DIR})")
299+
endif()
300+
else()
301+
set(ABACUS_CEREAL_VERSION "no")
301302
endif()
302303

303304
# ML & AI Libraries
@@ -384,11 +385,11 @@ endif()
384385
# --- 5. Collect CMake Configuration Summary ---
385386
set(ABACUS_CMAKE_OPTIONS "Build Options:")
386387
list(APPEND CMAKE_OPTIONS_LIST " ENABLE_MPI=${ENABLE_MPI}")
387-
list(APPEND CMAKE_OPTIONS_LIST " USE_OPENMP=${USE_OPENMP}")
388+
list(APPEND CMAKE_OPTIONS_LIST " ENABLE_OPENMP=${ENABLE_OPENMP}")
388389
list(APPEND CMAKE_OPTIONS_LIST " USE_CUDA=${USE_CUDA}")
389390
list(APPEND CMAKE_OPTIONS_LIST " USE_ROCM=${USE_ROCM}")
390391
list(APPEND CMAKE_OPTIONS_LIST " ENABLE_LCAO=${ENABLE_LCAO}")
391-
list(APPEND CMAKE_OPTIONS_LIST " USE_ELPA=${USE_ELPA}")
392+
list(APPEND CMAKE_OPTIONS_LIST " ENABLE_ELPA=${ENABLE_ELPA}")
392393
list(APPEND CMAKE_OPTIONS_LIST " ENABLE_LIBXC=${ENABLE_LIBXC}")
393394
list(APPEND CMAKE_OPTIONS_LIST " ENABLE_MLALGO=${ENABLE_MLALGO}")
394395
list(APPEND CMAKE_OPTIONS_LIST " ENABLE_ASAN=${ENABLE_ASAN}")

cmake/modules/FindELPA.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if(ELPA_INCLUDE_DIRS MATCHES "^/usr/include/elpa/.*")
3030
unset(ELPA_INCLUDE_DIRS)
3131
endif()
3232
endif()
33-
if(USE_OPENMP)
33+
if(ENABLE_OPENMP)
3434
find_library(ELPA_LINK_LIBRARIES
3535
NAMES elpa_openmp elpa
3636
HINTS ${ELPA_DIR}
@@ -51,7 +51,7 @@ if(NOT ELPA_INCLUDE_DIRS AND PKG_CONFIG_FOUND)
5151
if(DEFINED ELPA_DIR)
5252
string(APPEND CMAKE_PREFIX_PATH ";${ELPA_DIR}")
5353
endif()
54-
if(USE_OPENMP)
54+
if(ENABLE_OPENMP)
5555
pkg_search_module(ELPA REQUIRED IMPORTED_TARGET GLOBAL elpa_openmp)
5656
else()
5757
pkg_search_module(ELPA REQUIRED IMPORTED_TARGET GLOBAL elpa)

cmake/modules/FindFFTW3.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if(ENABLE_FLOAT_FFTW)
2626
endif()
2727

2828
# Both libfftw3.so and libfftw3_omp.so are required for OpenMP builds.
29-
if (USE_OPENMP)
29+
if (ENABLE_OPENMP)
3030
find_library(FFTW3_OMP_LIBRARY
3131
NAMES fftw3_omp
3232
HINTS ${FFTW3_DIR}
@@ -38,7 +38,7 @@ endif()
3838
# set FFTW3_FOUND to TRUE if all variables are non-zero.
3939
include(FindPackageHandleStandardArgs)
4040
set(_fftw3_required_vars FFTW3_LIBRARY FFTW3_INCLUDE_DIR)
41-
if(USE_OPENMP)
41+
if(ENABLE_OPENMP)
4242
list(APPEND _fftw3_required_vars FFTW3_OMP_LIBRARY)
4343
endif()
4444
if(ENABLE_FLOAT_FFTW)
@@ -49,7 +49,7 @@ find_package_handle_standard_args(FFTW3 DEFAULT_MSG ${_fftw3_required_vars})
4949
# Copy the results to the output variables and target.
5050
if(FFTW3_FOUND)
5151
set(FFTW3_LIBRARIES ${FFTW3_LIBRARY})
52-
if (USE_OPENMP)
52+
if (ENABLE_OPENMP)
5353
list(APPEND FFTW3_LIBRARIES ${FFTW3_OMP_LIBRARY})
5454
endif()
5555

@@ -77,7 +77,7 @@ if(FFTW3_FOUND)
7777
IMPORTED_LOCATION "${FFTW3_FLOAT_LIBRARY}"
7878
INTERFACE_INCLUDE_DIRECTORIES "${FFTW3_INCLUDE_DIRS}")
7979
endif()
80-
if (USE_OPENMP)
80+
if (ENABLE_OPENMP)
8181
if(NOT TARGET FFTW3::FFTW3_OMP)
8282
add_library(FFTW3::FFTW3_OMP UNKNOWN IMPORTED)
8383
set_target_properties(FFTW3::FFTW3_OMP PROPERTIES

cmake/modules/FindKML.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# KML_BLAS_THREADING kblas variant: auto, multi, locking, or nolocking
2121
# (default: auto)
2222
#
23-
# The default threading selection uses the caller's USE_OPENMP option when it
23+
# The default threading selection uses the caller's ENABLE_OPENMP option when it
2424
# is available: multi for OpenMP builds and nolocking otherwise. Projects can
2525
# select a KML_BLAS_THREADING variant explicitly.
2626
#
@@ -46,7 +46,7 @@ endif()
4646

4747
set(_kml_thread_variants multi locking nolocking)
4848
if(KML_BLAS_THREADING STREQUAL "auto")
49-
if(DEFINED USE_OPENMP AND USE_OPENMP)
49+
if(ENABLE_OPENMP)
5050
set(_kml_blas_threading multi)
5151
else()
5252
set(_kml_blas_threading nolocking)

cmake/modules/FindMKL.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ endif()
6161
# Keep MKL threading internal: derive it from ABACUS OpenMP support and the
6262
# known compiler/runtime combinations. Unknown OpenMP runtimes use sequential MKL.
6363
set(_mkl_threading sequential)
64-
if(USE_OPENMP)
64+
if(ENABLE_OPENMP)
6565
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
6666
set(_mkl_threading gnu_thread)
6767
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")

docs/advanced/acceleration/cuda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ To compile and use ABACUS in CUDA mode, you currently need to have an NVIDIA GPU
2929

3030
Check the [Advanced Installation Options](https://abacus-rtd.readthedocs.io/en/latest/advanced/install.html#build-with-cuda-support) for the installation of CUDA version support.
3131

32-
Setting both USE_ELPA and USE_CUDA to ON does not automatically enable ELPA to run on GPUs. ELPA support for GPUs needs to be enabled when ELPA is compiled. [enable GPU support](https://github.com/marekandreas/elpa/blob/master/documentation/INSTALL.md).
32+
Setting both `ENABLE_ELPA` and `USE_CUDA` to ON does not automatically enable ELPA to run on GPUs. ELPA support for GPUs needs to be enabled when ELPA is compiled. [enable GPU support](https://github.com/marekandreas/elpa/blob/master/documentation/INSTALL.md).
3333

3434
The ABACUS program will automatically determine whether the current ELPA supports GPU based on the elpa/elpa_configured_options.h header file. Users can also check this header file to determine the GPU support of ELPA in their environment. ELPA introduced a new API elpa_setup_gpu in version 2023.11.001. So if you want to enable ELPA GPU in ABACUS, the ELPA version must be greater than or equal to 2023.11.001.
3535

0 commit comments

Comments
 (0)