Skip to Content
InstallationBuild on HPC System

Build on HPC System

When installing SurfATT on High-Performance Computing (HPC) clusters, you typically do not have sudo privileges. Instead, software dependencies like compilers, MPI, and scientific libraries are managed using environment modules (e.g., Lmod).

This page provides examples of building SurfATT on several typical HPC environments.

1. Load Environment Modules

Select your HPC system or a generic module-based system to see the corresponding module load commands.

On Trillium, the recommended environment is the intel toolchain with Intel MPI. Here is how to load the necessary modules:

module load StdEnv/2023 intel/2023.2.1 intelmpi/2021.9.0 hdf5/1.14.2 eigen/3.4.0

The yaml-cpp and spdlog libraries are bundled with SurfATT, so you do not need to load separate modules for them. However, if your HPC provides newer versions of these libraries, but please ensure the spdlog should be compiled with the same C++ standard as SurfATT to avoid compatibility issues.

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 SurfATT

3. Build and Compile

Once the environment is loaded, the process is similar to building on a local machine.

After loading the recommended modules, you can proceed to build SurfATT as follows:

Create a build directory and navigate into it

mkdir -p build && cd build

Configure the build with CMake

Make sure to set the CC, CXX, and FC environment variables to the appropriate compilers provided by your HPC environment

CC=icx CXX=icpx FC=ifx cmake ..

Compile the code

make -j4
Last updated on