Building eCLM#
Installation#
This section shows you how to build eCLM.
Minimum system requirements#
MPI 3.1
netCDF-C 4.7.4
netCDF-Fortran 4.5.2
PnetCDF 1.12.1
LAPACK
CMake 3.16
Supported compilers
GCC 9.3.0
Intel 19.1.2
Building eCLM#
Configure CMake build options.
# User-specific variables
BUILD_DIR="bld"
INSTALL_DIR="eclm"
# Run cmake
cmake -S src -B "$BUILD_DIR" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_Fortran_COMPILER=mpifort
Additionally, you may specify these optional build variables.
CMAKE_BUILD_TYPE=DEBUG|RELEASE
. Defaults toRELEASE
.CMAKE_PREFIX_PATH
. Semicolon-separated list of paths (i.e. install prefixes) where external libraries might be found. You may need to specify this if CMake cannot find some of the required libraries (e.g. NetCDF, PnetCDF, LAPACK).
Build and install eCLM.
cmake --build "$BUILD_DIR"
cmake --install "$BUILD_DIR"
adding the flag
--parallel 8
can potentially speed up the build process (full command:cmake --build "$BUILD_DIR" --parallel 8
), https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-build-j
Install namelist generator Python package#
The namelist generator scripts require Python 3.X.
# Upgrade to latest version of pip
python3 -m pip install --upgrade pip
# Install package
pip3 install --user ./namelist_generator