How to install ELSI
The installation of ELSI makes use of the CMake software. Minimum requirements:
- CMake (3.0 or newer)
- Fortran compiler (Fortran 2003 compliant)
- C compiler (C99 compliant)
- MPI (MPI-3)
- BLAS, LAPACK, ScaLAPACK (with PBLAS and BLACS)
Enabling the PEXSI solver (highly recommended) requires:
- C++ compiler (C++11 compliant)
Enabling the EigenExa solver requires:
- EigenExa (2.3 or newer)
Enabling the SLEPc-SIPs solver requires:
- SLEPc (3.9 or newer)
Enabling the MAGMA solver requires:
- MAGMA (2.5 or newer)
Enabling the CUDA-based GPU acceleration in the ELPA solver requires:
- CMake (3.8 or newer)
- CUDA (10.0 or newer recommended)
We recommend preparing and editing configuration settings in a toolchain file that can be read by CMake. Edit one of the templates provided in the
toolchains directory of the ELSI package. Then follow the steps below:
$ mkdir build $ cd build $ cmake -DCMAKE_TOOLCHAIN_FILE=YOUR_TOOLCHAIN_FILE .. ... ... -- Generating done -- Build files have been written to: /current/dir $ make [-j np] $ [make install]
YOUR_TOOLCHAIN_FILE should be the user's toolchain file. Commands in square brackets are optional.
CMake automatically detects and sets default compilers. The choices made by CMake often work, but not necessarily guarantee optimal performance. In some cases, the compilers selected by CMake may not be the ones desired by the user. Therefore, it is mandatory that the user explicitly sets the identification of compilers in the following keywords:
CMAKE_CXX_COMPILER(only needed if building ELSI with PEXSI support)
It is highly recommended to specify the compiler flags, in particular the optimization flags:
The ELPA, libOMM, NTPoly, BSEPACK, and PEXSI solver libraries, as well as the SuperLU_DIST and PT-SCOTCH libraries (both required by PEXSI) are redistributed through this ELSI package. Experienced users are encouraged to link the ELSI interface against external, better optimized solver libraries. Relevant options are:
All external libraries and include paths should be set via:
Each of the above is a list separated by
LIB_PATHS should be absolute paths.
LIBS accepts three formats:
-lelpa;-lpexsi;-lblas(link line style)
elpa;pexsi;blas(name of library)
libelpa.a;libpexsi.a;libblas.so(full name of library)
On computers with NVIDIA GPUs, GPU acceleration based on CUDA and cuBLAS may be enabled for the ELPA solver by
USE_GPU_CUDA. The CUDA runtime and cuBLAS libraries must be available in
LIBS. The nvcc compiler and flags to compile the CUDA sources may be specified by setting these keywords:
Please note that in the current version of ELSI, the redistributed PEXSI and BSEPACK solvers are not enabled by default. They may be switched on by
ENABLE_BSEPACK, respectively. In addition,
ENABLE_MAGMA may be used to enable support for the SLEPc, EigenExa, and MAGMA solvers, respectively. These libraries are not redistributed with ELSI, thus must be installed separately by the user.
Building ELSI test programs may be enabled by
ENABLE_TESTS. Then, the compilation may be verified by
$ make test
The tests may fail to start if launching MPI jobs is prohibited on the user's working platform.
Beyond this guide
A complete description of the ELSI build system is available in the user's guide.
For comments, feedback, and suggestions, please contact the ELSI team.