Compilation
ezp is a header-only wrapper around ScaLAPACK.
Compiling an executable that uses ezp therefore requires the following dependencies.
- an implementation of
LAPACKandBLAS, such asOpenBLAS, Intel® oneMKL, orAOCL; - an implementation of
ScaLAPACK, such as the reference implementation or the one bundled withIntel® oneMKL; - an implementation of
MPI, such asOpenMPI,MPICH, or Intel® MPI.
Ensure these libraries are available before configuring the build. C++20 or later is required.
oneAPI
The easiest approach is to use the Intel® oneAPI toolkit.
It provides the Intel® MPI Library and Intel® oneMKL, which bundles a complete ScaLAPACK and LAPACK/BLAS implementation.
The following workflow runs on Fedora. It installs the required packages, checks out the repository, and builds with the oneAPI environment.
The build links against MKL::MKL_SCALAPACK and defines the EZP_MKL macro automatically.
System Libraries
System libraries are usable, but many distributions ship broken or outdated versions.
The bundled system libraries often fail due to compatibility issues.
In such cases one must compile all dependencies manually, which is cumbersome.
openSUSE provides a toolset that works out of the box.
Fedora 41 provides an environment close to usable.
The scalapack package is broken there, so a manual symlink is required.
Other mainstream distributions require more fixes.
With EZP_USE_SYSTEM_LIBS, the build looks for a system scalapack library, then for optional flexiblas and openblas libraries.
Switching among implementations of the underlying libraries is not recommended, because it lacks flexibility.
Compilation Options
64-bit Integer
Use -DEZP_USE_64BIT_INT=ON in CMake, or define the macro EZP_INT64.
This switches the MKL_INTERFACE from lp64 to ilp64.
Name Mangling
Use -DEZP_ADD_UNDERSCORE=ON in CMake, or define the macro EZP_UNDERSCORE.
This controls whether Fortran subroutine names have an appended underscore.
It is enabled by default.
Sparse Solvers
EZP_ENABLE_MUMPS and EZP_ENABLE_LIS control whether the corresponding sparse solvers are built.
Both are enabled by default.
pardiso is available whenever the EZP_MKL macro is defined, which happens automatically when MKL is found.
OpenMP
EZP_ENABLE_OPENMP enables OpenMP for the sparse solvers.
It is enabled by default.
When enabled, EZP_ENABLE_OPENMP_MUMPS, EZP_ENABLE_OPENMP_LIS, and EZP_ENABLE_OPENMP_GK further control whether MUMPS, Lis, and GKlib link against OpenMP.
Standalone Solvers
Use -DEZP_STANDALONE=ON in CMake to build the standalone solver executables.
Testing
Use -DEZP_TEST=ON in CMake to build the test suite and the runnable examples.
Sparse Solver Dependencies
The dense ScaLAPACK-based solvers (pgesv, pposv, pgbsv, etc.) are always available.
The sparse solvers require additional libraries and must be explicitly enabled.
PARDISO
pardiso is bundled in Intel® oneMKL.
It is detected automatically when the oneAPI environment is sourced.
No additional CMake flag is required.
The EZP_MKL macro is defined when MKL is found.
MUMPS
MUMPS is built from the bundled source in external/mumps.
It is controlled by EZP_ENABLE_MUMPS and defaults to on.
Lis
Lis is built from the bundled source in external/lis.
It is controlled by EZP_ENABLE_LIS and defaults to on.