Packaging ADS-IDAC for Distribution
package.sh builds a Release binary and bundles it with runtime dependencies into a portable tarball. Works on Linux x86_64 and macOS ARM64.
Quick Start
# GNU Release + MPI (recommended for HPC, the fastest configuration)
./package.sh --compiler=gnu --mpi=on
# Output: adsidac-<version>-gnu-mpi-<os>-<arch>.tar.gzThe tarball name is adsidac-<version>-<compiler>-<mpi|serial>-<os>-<arch>.tar.gz. <version> is read from the project(ADSIDAC VERSION ...) line of the top-level CMakeLists.txt, <os> is linux or darwin, and <arch> is x86_64 or arm64.
All Variants
# GNU + MPI (recommended)
./package.sh --compiler=gnu --mpi=on
# GNU serial-only (no MPI needed on target)
./package.sh --compiler=gnu --mpi=off
# Intel + MPI (Linux only)
./package.sh --compiler=intel --mpi=on
# Intel serial-only (Linux only)
./package.sh --compiler=intel --mpi=offOn macOS, --compiler=gnu uses Apple Clang for C/C++ and Homebrew gfortran for Fortran (with -DENABLE_HCL=OFF -DCMAKE_PREFIX_PATH=/opt/homebrew). The script looks for gfortran-15, gfortran-14 and gfortran-13, in that order, and stops if none is found. Intel compilers are not supported on macOS.
Both options default to the recommended values (--compiler=gnu, --mpi=on).
Options
# Control parallel build jobs (default: all cores)
./package.sh --compiler=gnu --mpi=on --jobs=4
# Package an existing build without rebuilding
./package.sh --compiler=gnu --mpi=on --skip-build
# Show help
./package.sh --helpThe script configures a Release build with Ninja in build-package-<compiler>-<mpi|serial>/ at the repository root, with the unit, functional and integration tests turned off. --skip-build packages the binary that is already in that directory and fails if there is none. The tarball is written to the repository root and the staging directory is removed.
Recipient Usage
Important: Always run from the project directory: RELAP5 writes its intermediate files to the current directory. Use the ./adsidac wrapper script, not bin/adsidac directly.
In the commands below <package> stands for the unpacked directory, for example adsidac-5.0.0-gnu-mpi-linux-x86_64.
tar xzf <package>.tar.gz
# Verify the installation: runs the bundled BV4 case serially and
# checks for 36 sequences (ZESNode files) and 97 pivotal-event nodes.
# Unpack under a short path: the self-test's deck path is
# <unpack dir>/<package>/tests/BV4/./BV4.i and RELAP5 refuses paths over 80
# characters, which leaves about 25 characters for <unpack dir>.
<package>/run-test.sh
cd <project-dir>
# Serial
/path/to/<package>/adsidac --project-dir=. --input-deck=<deck>.i
# MPI parallel
mpirun -n 4 /path/to/<package>/adsidac --project-dir=. --input-deck=<deck>.i
# With real-time DET visualization
mpirun -n 4 /path/to/<package>/adsidac --project-dir=. --input-deck=<deck>.i --viz-port=8888
# Checkpoint every 5 sequences and stop at the first one, resume later
/path/to/<package>/adsidac --project-dir=. --input-deck=<deck>.i --checkpoint-dir=./ckpt --checkpoint-interval=5 --checkpoint-stop
/path/to/<package>/adsidac --project-dir=. --input-deck=<deck>.i --resume=./ckpt/checkpoint_seq_5.datThe package carries its own USAGE.md with the full set of examples.
What's Bundled
| Component | Location | Notes |
|---|---|---|
| Wrapper script | adsidac | Sets the library path and symlinks the steam tables into the current directory |
| Binary | bin/adsidac | Stripped Release build |
| Shared libraries | lib/ | Every non-system library the binary links, except MPI: Boost (serialization, program_options), LZ4 and the Fortran runtime (libgfortran and its dependencies). On macOS the dependencies of each bundled library are bundled too |
| Steam tables | data/ | tpfh2o, tpfh2onew, tpfd2o |
| Test case | tests/BV4/ | Input/, BV4.i and a copy of the steam tables |
| Self-test | run-test.sh | Runs BV4 serially and checks for 36 ZESNode files and 97 ZPENode files |
| Documentation | USAGE.md, README.txt | Usage examples; requirements and file list |
Not bundled: the MPI runtime (the cluster or Homebrew provides its own) and system libraries. On Linux these are libc, libm, libpthread, librt, libdl, libgcc_s and libstdc++; on macOS everything under /usr/lib/ and /System/.
On Linux the wrapper sets LD_LIBRARY_PATH. On macOS it sets DYLD_LIBRARY_PATH, install_name_tool rewrites library references to @executable_path/../lib/ and @loader_path/, and the binary and all bundled libraries are ad-hoc re-signed, because changing install names invalidates ARM64 signatures.
Troubleshooting
RELAP5 stops at start-up because a steam table file is missing: run through the wrapper script (adsidac), not bin/adsidac directly. The wrapper symlinks tpfh2o, tpfh2onew and tpfd2o from data/ into the current directory when they are not there.
MPI errors: make sure the MPI runtime of the target system is loaded (module load openmpi or module load intelmpi). The package does not bundle MPI.
The loader cannot find a Boost, LZ4 or Fortran runtime library: run through the wrapper script, which adds the bundled lib/ directory to LD_LIBRARY_PATH or DYLD_LIBRARY_PATH.
macOS "invalid signature": if you modify bundled dylibs by hand, re-sign them with codesign -fs - <file>.