Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_test_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
name: "Build without LCAO"
- tag: gnu
external_toolchain_args: ""
build_args: "-DUSE_ELPA=OFF "
build_args: "-DENABLE_ELPA=OFF "
name: "Build without ELPA"
- tag: gnu
external_toolchain_args: ""
Expand Down
20 changes: 9 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ option(ENABLE_RAPIDJSON "Enable rapid-json usage" OFF)
option(ENABLE_CNPY "Enable cnpy usage" OFF)

# Options requiring MPI and LCAO
cmake_dependent_option(ENABLE_ELPA "Enable ELPA for LCAO" ON "ENABLE_LCAO;ENABLE_MPI" OFF)
cmake_dependent_option(ENABLE_ELPA "Enable ELPA eigensolver" ON "ENABLE_MPI" OFF)
cmake_dependent_option(ENABLE_LIBRI "Enable LibRI for hybrid functional"
OFF "ENABLE_LCAO;ENABLE_MPI" OFF)
cmake_dependent_option(ENABLE_PEXSI "Enable PEXSI for LCAO" OFF "ENABLE_LCAO;ENABLE_MPI" OFF)
Expand Down Expand Up @@ -304,17 +304,15 @@ if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
set(ENABLE_ABACUS_LIBM OFF)
endif()

if(ENABLE_LCAO)
if(ENABLE_ELPA)
find_package(ELPA REQUIRED)
endif()
if(ENABLE_PEXSI)
find_package(PEXSI REQUIRED CONFIG)
if(PEXSI_VERSION VERSION_LESS "2.0.0")
message(FATAL_ERROR "PEXSI >= 2.0.0 is required")
endif()
set(CMAKE_CXX_STANDARD 14)
if(ENABLE_ELPA)
find_package(ELPA REQUIRED)
endif()
if(ENABLE_PEXSI)
find_package(PEXSI REQUIRED CONFIG)
if(PEXSI_VERSION VERSION_LESS "2.0.0")
message(FATAL_ERROR "PEXSI >= 2.0.0 is required")
endif()
set(CMAKE_CXX_STANDARD 14)
endif()

if(ENABLE_MPI)
Expand Down
14 changes: 7 additions & 7 deletions cmake/CollectBuildInfoVars.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,6 @@ else()
set(ABACUS_LCAO_ENABLED "False")
endif()

# Core Math Libraries
if(ENABLE_LCAO AND ENABLE_ELPA)
set(ABACUS_ELPA_VERSION "yes (v${ELPA_VERSION})")
else()
set(ABACUS_ELPA_VERSION "no")
endif()

# BLAS and FFTW libraries
if(MKL_FOUND)
set(ABACUS_BLAS_VENDOR "MKL")
Expand Down Expand Up @@ -179,6 +172,13 @@ else()
endif()
endif()

# ELPA eigensolver
if(ENABLE_ELPA)
set(ABACUS_ELPA_VERSION "yes (v${ELPA_VERSION})")
else()
set(ABACUS_ELPA_VERSION "no")
endif()

if(ENABLE_LIBXC AND Libxc_VERSION)
set(ABACUS_LIBXC_VERSION "yes (v${Libxc_VERSION})")
elseif(ENABLE_LIBXC)
Expand Down
7 changes: 4 additions & 3 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,10 @@ target_link_libraries(
device
base)

if(ENABLE_ELPA)
target_link_libraries(${ABACUS_BIN_NAME} PRIVATE genelpa)
endif()

if(ENABLE_LCAO)
target_link_libraries(
${ABACUS_BIN_NAME}
Expand All @@ -702,9 +706,6 @@ if(ENABLE_LCAO)
if(ENABLE_LIBRI)
target_link_libraries(${ABACUS_BIN_NAME} PRIVATE bse)
endif()
if(ENABLE_ELPA)
target_link_libraries(${ABACUS_BIN_NAME} PRIVATE genelpa)
endif()
if(ENABLE_PEXSI)
target_link_libraries(${ABACUS_BIN_NAME} PRIVATE pexsi)
endif()
Expand Down
2 changes: 1 addition & 1 deletion source/source_hsolver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if(ENABLE_COVERAGE)
add_coverage(hsolver)
endif()

if(ENABLE_LCAO AND ENABLE_ELPA)
if(ENABLE_ELPA)
add_subdirectory(module_genelpa)
endif()

Expand Down
Loading