|
FlexELA
|
After downloading the repository, this page describes how to install the library and link to it. FlexELA uses CMake to configure and build the library.
The first is to configure the build using CMake. From the top level directory of the repository, the minimum is to run cmake -B [BUILD_DIRECTORY], where [BUILD_DIRECTORY] is the working directory for build files. Typically, one will want to specify more details about the configuration. For example,
Would specify configure a Release build in the directory build using MPI and designed to be called from Fortran. Installed files will be put in the directory ../elalib.
In addition to standard CMake configuration options, ELA provides the following build options
| Build Option | Description | Default |
|---|---|---|
ELA_USE_MPI | ON: The library will be built to be called by parallel MPI applications.OFF : The library will be built to be called by serial applications. | ON |
FORTRAN_COMPATIBLE | ON: The library will include Fortran interfaces and will assume array ordering is column-major.OFF: The library will not include any Fortran interfaces and will assume row-major. | OFF |
BUILD_TESTING | ON: Build unit and integration tests.OFF: Do not build tests. | ON |
BUILD_Fortran_TESTING | ON: Include Fortran integration tests if BUILD_TESTING=ON and FORTRAN_COMPATIBLE=ONOFF: Do not build these tests (CMake sometimes struggles building Fortran programs) | ON |
FlexELA has few build types:
CMAKE_BUILD_TYPE | Description |
|---|---|
Release (default) | Includes full optimizations (-O3) as will as IPO when the compiler supports it. Turns off some runtime checking. |
Profile | Like Release, but no IPO and adds debug symbols to allow profiling the library.Only works GNU, Clang, and Intel compilers. |
Debug | Turns on debug symbols (-g) and adds -fsanitize=leak,address,undefined. Runtime checks are included. |
Coverage | Generated coverage reports for unit tests. Only works GNU and Clang compilers. |
On some systems, it may be necessary to use MPI-wrapped compilers to ensure MPI libraries are linked to correctly. For example,
sets the compilers to mpicxx, mpicc, and mpif90.
Here, will assume the build directory [BUILD_DIRECTORY] was set to build during configuration , as in the exmples above. After successfully configuring FlexELA, build the library by calling
If configured with BUILD_TESTING=ON, the test suite can be run with
If ELA_USE_MPI=ON, some tests will launch mpi programs with 4 processes.
After building, install the library by calling
This will create the required lib and include files in the directory specified by CMAKE_INSTALL_PREFIX.
The ELA library has a few header file
The name of the library in [CMAKE_INSTALL_PREFIX]/lib depends on FORTRAN_COMPATIBLE. For typical systems,
libflexELA.a when FORTRAN_COMPATIBLE=OFFlibflexELA_f.a when FORTRAN_COMPATIBLE=ONThis distinction is made as each version makes different assumptions about the array ordering of the calling application.