Installation
Prerequisites
ADS-IDAC builds from source and requires:
- CMake 3.20.5 or newer
- Ninja build system (recommended)
- Boost libraries:
serialization,program_options - C++17 compiler: GCC 9+, Clang 11+, or Intel oneAPI icpx
- Fortran compiler: gfortran 9+ or Intel ifx
- MPI (optional): OpenMPI or Intel MPI for parallel execution
- LZ4 development files
- mold or gold linker (optional, Linux): CMake links a test program with mold, then with gold, and uses the first one that works; otherwise it reports
Using default system linkerand continues. With GCC, mold needs GCC 12.1 or newer.
Platform-specific packages
brew install cmake ninja gcc boost open-mpi lz4 pkgconfsudo apt install cmake ninja-build pkg-config liblz4-dev libboost-serialization-dev \
libboost-program-options-dev gfortran g++ libopenmpi-dev# Intel compilers via oneAPI toolkit
source /opt/intel/oneapi/setvars.sh
sudo dnf install cmake ninja-build boost-devel lz4-devel pkgconf-pkg-configBuilding from Source
Configure
From the repository root:
mkdir -p build && cd buildcmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_Fortran_COMPILER=gfortran-NN \
-DENABLE_HCL=OFF \
-DCMAKE_PREFIX_PATH=/opt/homebrewcmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_Fortran_COMPILER=gfortrancmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=icpx \
-DCMAKE_C_COMPILER=icx \
-DCMAKE_Fortran_COMPILER=ifxcmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_Fortran_COMPILER=gfortran \
-DENABLE_MPI=OFFOn macOS, gfortran-NN is the versioned binary that Homebrew's gcc formula installs (ls /opt/homebrew/bin/gfortran-*). After Homebrew upgrades gcc, boost or open-mpi, an existing build tree points at removed paths: reconfigure it in place with cmake . -U "MPI*" -DCMAKE_Fortran_COMPILER=/opt/homebrew/bin/gfortran-NN and rebuild.
Build
ninja -j$(nproc)The executable is written to build/bin/adsidac. The steam table files (tpfh2o, tpfh2onew, tpfd2o) are copied to build/bin/ during configure. RELAP5 reads them from its working directory; see Working directory and steam tables.
Verify
# Run the BV4 test case (36 sequences at Truncation_time=15.5)
cd bin && ./adsidac --project-dir=../tests/BV4 --input-deck=../tests/BV4/BV4.iCMake Options
| Option | Default | Description |
|---|---|---|
ENABLE_MPI | ON | MPI parallel execution. OFF builds serial-only without MPI dependency |
ENABLE_HCL | ON | HCL/SMILE fault tree and BBN support. OFF for macOS or systems without SMILE libraries |
BUILD_UNIT_TESTS | ON | Build Boost.Test unit tests |
BUILD_FUNCTIONAL_TESTS | ON | Build functional tests |
BUILD_INTEGRATION_TESTS | ON | Build integration/validation tests |
USE_PREBUILT_RELAP | OFF | Use pre-built RELAP .a files instead of compiling Fortran source |
PREBUILT_RELAP_COMPILER | intel | Which Fortran runtime to link when using pre-built RELAP (intel or gnu) |
PREBUILT_RELAP_DIR | lib/relap/<compiler>/ | Location of the pre-built RELAP libraries |
ENABLE_SERIALIZATION_TEST | OFF | Build the serialization test executable |
ENABLE_LONG_CHECKPOINT_TESTS | OFF | Register the six Truncation_time=1000 checkpoint and resume tests (label long, MPI builds only) |
Running Tests
cd build
# Everything that is registered
ctest
# One test by name, with its output
ctest -R BV4_Serial_Validate -V
# By label
ctest -L integration # all BV4 validation, checkpoint and interrupt tests
ctest -L checkpoint # checkpoint and resume tests
ctest -L interrupt # Ctrl+C checkpoint test
ctest -L adsmd # input validator manifest test (registered when cargo is found)The integration tests run the BV4 case and compare the output counts with the values in Reference baselines. They share one project directory and are serialized by a resource lock, so ctest -j does not run them concurrently. MPI tests are registered only when ENABLE_MPI=ON.
The six Truncation_time=1000 checkpoint tests are registered only when the build is configured with -DENABLE_LONG_CHECKPOINT_TESTS=ON; select or exclude them with ctest -L long and ctest -LE long.
Compiler Performance Notes
| Compiler | Fortran opt | C++ opt | Notes |
|---|---|---|---|
| GNU Release | -O3 | -O3 | Fastest RELAP5 compute. Recommended. |
| Intel Release | -O0 (forced) | -O3 | Intel Fortran crashes RELAP5 at any optimization due to AVX memcpy issues |
| Intel Debug | -O0 | -O0 | Slowest. Use for development only. |
GNU Release builds are 2-2.5x faster than Intel for RELAP5-dominated workloads because gfortran safely handles -O3 while Intel Fortran is forced to -O0.
Docker
Pre-configured Docker images are available for reproducible builds. See Docker/README.md for details.
# GNU source build
docker build -f Docker/gnu-build/Dockerfile -t adsidac-gnu .
# Intel source build
docker build -f Docker/build/Dockerfile -t adsidac .