Dependencies
SurfATT is built from source and requires a C++/Fortran toolchain, MPI, HDF5, Eigen, and CMake. Conda, Homebrew, and the Linux system package managers below are alternative ways to install these dependencies.
Required software
| Dependency | Minimum version | Recommended version | Purpose |
|---|---|---|---|
| CMake | 3.18 | 3.25 or newer | Configure the build |
| C++ compiler | GCC 13 / Clang 14 | GCC 14 / Clang 17 | Compile the C++17 source |
| Fortran compiler | GFortran 10 | GFortran 12 or newer | Compile Fortran routines |
| MPI | 3.0 | Open MPI 4 or newer | Parallel execution |
| HDF5 | 1.10 | 1.14 or newer | Model and data I/O |
| Eigen3 | 3.4 | 3.4 or newer | Linear algebra |
| Git | Current stable release | Current stable release | Clone SurfATT and its submodules |
SurfATT can use system installations of yaml-cpp and spdlog. If CMake
cannot find them, the copies included with the source tree are used instead.
Install the dependencies
Choose one method below. Avoid mixing compilers, MPI, and HDF5 libraries from different package managers in the same build directory.
Conda / Mamba
Conda is useful when you want an isolated and reproducible toolchain.
conda create -n surfatt -c conda-forge -y \
cxx-compiler fortran-compiler \
cmake make git \
openmpi hdf5 eigen \
yaml-cpp spdlog
conda activate surfattThis installs SurfATT’s dependencies only. You will compile SurfATT in the next step. On an HPC system, prefer the MPI implementation provided by the cluster.
Verify the toolchain
Check that the build tools and MPI compiler wrapper are visible:
cmake --version
mpicxx --version
gfortran --versionContinue with Build on a Local Machine, or use Build on an HPC System on a managed cluster.