Install the dependencies¶
FORGE is built from source with CMake. This page lists the libraries to install before you configure. Build and install FORGE covers the build itself.
Requirements¶
| Dependency | Version | Used for |
|---|---|---|
| CMake | 3.17 or newer | Build system |
| C++ compiler | C++17 | Apple clang on macOS, GCC or Clang on Linux |
| OpenMP | CPU parallelism (required on every platform) | |
| Armadillo | recent release | Linear algebra. FORGE calls arma::circshift, which the Ubuntu 24.04 package does not provide, so build it from source there. The static distribution build pins 15.2.3. |
| ISMRMRD | Raw data input. The static distribution build pins v1.15.0. | |
| FFTW3 | CPU FFTs (single and double precision libraries) | |
| Boost | 1.43 or newer | program_options and serialization; also mpi when MPISupport=ON |
| HDF5 | C++ bindings, used for ISMRMRD I/O |
CMake also downloads a few libraries at configure time, so the first configure needs network access: spdlog v1.14.1 and indicators v2.3 for logging and progress bars, and FTXUI v6.1.9 and nlohmann/json v3.11.3 for forgeview.
For GPU builds you also need either Xcode command line tools with the Metal toolchain (macOS on Apple Silicon) or the CUDA toolkit (Linux with an NVIDIA GPU).
macOS¶
Install the Homebrew packages, including libomp. Apple clang does not ship OpenMP, and FORGE's CMake looks for it with brew --prefix libomp.
brew install cmake armadillo fftw hdf5 boost libomp
ISMRMRD also needs to be installed. If you don't have a package for it, build it from the ISMRMRD repository. scripts/build-deps.sh builds Armadillo 15.2.3 and ISMRMRD v1.15.0 as static libraries for distribution builds; read it if you want a known-good set of build steps.
Linux (Ubuntu 24.04)¶
These are the packages the Linux CI job installs:
sudo apt-get install -y --no-install-recommends \
libfftw3-dev libhdf5-dev \
libboost-program-options-dev libboost-serialization-dev \
libsuperlu-dev libomp-dev libismrmrd-dev \
libopenblas-dev libarpack2-dev cmake g++ git
The packaged Armadillo is too old, so CI builds it from source with .github/scripts/install-armadillo.sh:
sudo .github/scripts/install-armadillo.sh # installs to /usr/local by default
If you want the MPI executables, also install an MPI implementation and Boost.MPI (for example libboost-mpi-dev). Otherwise configure with -DMPISupport=OFF.
For the CUDA backend, install the CUDA toolkit. The NVIDIA HPC SDK is not needed.