Build on Local Machine
This page compiles SurfATT after the required toolchain and libraries are available. Complete Dependencies first, then return here.
1. Clone the source code
Clone the official repository and enter the project directory.
git clone --recursive https://github.com/TomoATT/SurfATT.git
cd SurfATTIf the repository was cloned without --recursive, initialize its bundled
dependencies separately:
git submodule update --init --recursive2. Configure the build
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..On macOS with Homebrew, explicitly select Homebrew’s Fortran compiler:
FC="$(brew --prefix gcc)/bin/gfortran" \
cmake -DCMAKE_BUILD_TYPE=Release ..To build with single-precision floating-point values, add
-DUSE_SINGLE_PRECISION=ON to the CMake command.
3. Compile SurfATT
cmake --build . --parallelThe compiled programs are written to the repository’s bin directory.
4. Verify the installation
From the build directory, check that the forward and inversion programs
start correctly:
../bin/SURFATT_cb_fwd -h
../bin/SURFATT_tomo -hYou can now continue with the synthetic examples.
Last updated on