H.3 Building ELPA 2026
The default version of ELPA used in ELSI and hence FHI-aims is version 2020.05.001, which utilizes a native CMake build system. However, ELPA as a standalone project uses the autotools build system, and attempts to convert this into a native CMake build for newer versions of ELPA were unsuccessful. However, version 2026.02.002 is included in ELSI via a CMake wrapper around the autotools build, to hopefully simplify the process versus an external ELPA build which is then linked.
The CMake wrapper around the autotools build of ELPA translates CMake variables into flags used by the configure script of ELPA 2026. Many of these CMake variables are general ones already mentioned in the previous section, e.g. LIBS, CMAKE_Fortran_COMPILER, CMAKE_Fortran_FLAGS, etc, however, others are specific to the ELPA autotools build, and are listed below.
It is not necessary for a user to set the majority of the variables below, as they will be auto-set at CMake time. At a minimum, one needs to simply specify in the CMake cache:
set(USE_ELPA_2026 ON CACHE BOOL "ENABLE ELPA 2026")
Additionally, if one is using MKL, one may need to specify
set(INC_PATHS "$ENV{MKLROOT}/include/mkl/intel64/lp64" CACHE STRING "" FORCE)
in order for ELPA to be able to find the MKL module files present there.
Furthermore, for an intel + CUDA GPU build, it may be necessary to specify
set(INC_PATHS "$ENV{MKLROOT}/include/mkl/intel64/lp64 $ENV{CUDA_HOME}/include $ENV{CUBLAS_HOME}/include" CACHE STRING "" FORCE)
as well as
set(CMAKE_EXE_LINKER_FLAGS "-lstdc++" CACHE STRING "Linker flags")
Two example ELPA 2026 CMake cache files may be found in the cmake/toolchains folder, named elpa2026.intel.cmake for a CPU build with intel toolchain, and
elpa2026.cuda.intel.cmake for an NVIDIA GPU build + intel toolchain.
Please note that for ELPA 2026, one requires GNU Autotools (autoconf, automake, and libtool), with version 2.71 or newer for autoconf is recommended.
One may expect a modest speedup on CPU for ELPA 2026 versus ELPA 2020, and a more significant speedup on NVIDIA GPU (as well as support for AMD GPU).
-
•
ELPA_BUILD_SHARED — Whether to build shared ELPA library. Passed to ELPA as --enable-shared/--disable-shared. (Default: Same value as BUILD_SHARED_LIBS)
-
•
ELPA_BUILD_STATIC — Whether to build static ELPA library. Passed to ELPA as --enable-static/--disable-static. (Default: Inverse value to BUILD_SHARED_LIBS)
-
•
ELPA_C_TESTS — Whether to build C tests for ELPA. Passed to ELPA as
--enable-c-tests=yes / no. (Default: OFF) -
•
ELPA_CPP_TESTS — Whether to build C++ tests for ELPA. Passed to ELPA as --enable-cpp-tests=yes/no. (Default: OFF)
-
•
ELPA_FORTRAN_TESTS — Whether to build Fortran tests for ELPA. Passed to ELPA as --enable-Fortran-tests=yes/no. (Default: ON)
-
•
ELPA_ENABLE_OPENMP — Whether to use OpenMP in ELPA. Passed to ELPA as --enable-openmp/--disable-openmp. (Default: OFF)
-
•
ELPA_ENABLE_MPI — Passed to ELPA as --with-mpi=yes/no. (Default: Same value as USE_MPI)
-
•
ELPA_GPU_BACKEND — Which GPU backend will be used by ELPA: NONE, NVIDIA, or AMD. For a CPU build, NONE will be set; if USE_CUDA is ON then NVIDIA will be set; if USE_HIP is ON then AMD will be set. Passed to ELPA as
-enable-nvidia-gpu-kernels in the NVIDIA case, and -enable-amd-gpu-kernels in the AMD case. (Default: Dependent on USE_CUDA or USE_HIP) -
•
ELPA_GPU_STREAMS — Whether to use GPU streams. Can be set to NO to disable. Passed to ELPA as --enable-gpu-streams=nvidia/amd/no. (Default: If GPU used, same as ELPA_GPU_BACKEND)
-
•
ELPA_ENABLE_NVIDIA_CUB — Whether to use reductions from CUB in real Nvidia GPU kernel. Passed to ELPA as --enable-nvidia-cub. (Default: OFF)
-
•
ELPA_WITH_CUSOLVER — Whether to use NVIDIA cuSolver. Passed to ELPA as --with-cusolver=yes/no. (Default: ON)
-
•
ELPA_NVIDIA_GPU_COMPUTE_CAPABILITY — NVIDIA compute capability string, e.g. sm_80. If not set, attempted to be derived from other CMake variables, e.g. CMAKE_CUDA_ARCHITECTURES and CMAKE_CUDA_FLAGS. If CMAKE_CUDA_ARCHITECTURES is set to native, all, or all-major, nvidia-smi is queried on the machine running CMake to auto-detect the compute capability; this requires nvidia-smi to be available and a GPU visible at configure time. Passed to ELPA as
--with-NVIDIA-GPU-compute-capability = ELPA_NVIDIA_GPU_COMPUTE_CAPABILITY (Default: Derived when ELPA_GPU_BACKEND is NVIDIA) -
•
ELPA_CUDA_PATH — Path where CUDA is installed. Attempted to be derived via a find_package call. Passed to ELPA as --with-cuda-path = ELPA_CUDA_PATH (Default: Derived when ELPA_GPU_BACKEND is NVIDIA)
-
•
ELPA_ENABLE_HIPCUB — Whether to use reductions from hipCUB in AMD GPU kernels. Passed to ELPA as --enable-hipcub. (Default: OFF)
-
•
ELPA_WITH_ROCSOLVER — Whether to use rocSOLVER library. Passed to ELPA as --with-rocsolver=yes/no. (Default: ON)
-
•
ELPA_GPU_CCL — Whether to use NCCL or RCCL libraries. Can be set to NO, NCCL, or RCCL. Passed to ELPA as --enable-gpu-ccl=no/nccl/rccl (Default: NO)
-
•
ELPA_NCCL_PATH — Path where NCCL is installed. Passed to ELPA as --with-nccl-path = ELPA_NCCL_PATH. If unset, ELPA will attempt to detect it automatically. (Default: none)
-
•
ELPA_RCCL_PATH — Path where RCCL is installed. Passed to ELPA as --with-rccl-path = ELPA_RCCL_PATH. If unset, ELPA will attempt to detect it automatically. (Default: none)
-
•
ELPA_CONFIGURE_COMMAND_FILE — Absolute path to a file that contains a list of configure options to run ELPA’s configure script directly. (N.b. should not include the configure command or --prefix option). If set, this overrides automatic translation of CMake variables into arguments for configure and so variables such as e.g. compiler and libraries will need to be set. Should be used for either testing, or if a specific ELPA configure flag is not yet in the CMake variable translation. (Default: none)
Following the build, it is recommended to go into the elpa-build subdirectory of the FHI-aims build directory and run make check to ensure that ELPA has been compiled correctly.
Further information may also be found in the ELSI manual and users are also recommended to consult the ELPA manual.