Build on Local Machine
This page provides the source-build installation path for SurfATT. This path is recommended when you need maximum control over compiler versions, MPI stack, and optimization flags.
Typical use cases:
- Performance tuning on HPC clusters.
- Reproducible builds with pinned toolchains.
- Debugging and developer workflows.
Requirements
| Library | Minimum Version | Recommended Version | Role |
|---|---|---|---|
| CMake | ≥ 3.18 | ≥ 3.25 | Build system (required) |
| C++ compiler | GCC ≥ 13 / Clang ≥ 14 | GCC ≥ 14 / Clang ≥ 17 | C++17 (required) |
| Fortran compiler | GFortran ≥ 10 | GFortran ≥ 12 | Fortran-based routines and toolchain compatibility (required) |
| MPI | ≥ 3.0 | Open MPI ≥ 4.0 | Parallelism with shared-memory windows (required) |
| HDF5 | ≥ 1.10 | ≥ 1.14 | Model I/O (required) |
| Eigen3 | ≥ 3.4 | ≥ 3.4.0 | Linear algebra (required) |
| yaml-cpp | ≥ 0.6 | ≥ 0.8 | Parameter file parsing (bundled fallback) |
| spdlog | ≥ 1.5 | ≥ 1.15 | Logging (bundled fallback) |
1. Install Dependencies on Local Machine
Conda / Mamba
Use this option for isolated and reproducible environments, especially for laptops, shared servers, and CI workflows. It avoids conflicts with system packages.
2. Clone Source Code
Clone the official repository and enter the project directory. If you are on a shared system, use your own workspace path to avoid permission issues.
git clone https://github.com/TomoATT/SurfATT.git
cd SurfATT3. Build SurfATT
Create a clean build directory, then configure and compile from there. If dependencies are installed in non-default locations, add the corresponding CMake prefix/path options during configuration.
mkdir -p build && cd buildThen configure and compile:
cmake ..
make -jLast updated on