This directory contains the reproducible helper used for the OPALX gamma-gamma benchmarks.
The public CAIN source tree used here is
https://github.com/cfruhling2/CAIN.
From this directory:
./build-cain.sh --downloadThis will:
-
remove any existing local
CAIN-src/andCAIN-build/trees -
clone a fresh CAIN checkout
-
apply the local portability patch set
-
compile the
cainexecutable
To rebuild without recloning:
./build-cain.sh --compileA small CMake wrapper is provided for convenience:
cmake -S . -B build
cmake --build build --target cain-download
cmake --build build --target cain-compile-
CAIN-src/: local source checkout -
CAIN-build/: local object/module/build directory -
CAIN-build/cain: compiled executable
Both generated directories are ignored by git.
For the current macOS / gfortran workflow, the helper applies three source
patches before compilation:
-
src/evufnchar.f:WRITE(TEXT,'(I)')→WRITE(TEXT,'(I0)') -
src/transport.f:WRITE(MAGNAM,'(I)')→WRITE(MAGNAM,'(I0)') -
src/lsrrdfl.f: replace the end-of-line marker definition with a portableCHAR(10)/CHAR(0)form
The helper handles both upstream lsrrdfl.f variants seen so far:
-
PARAMETER (EOR=…, EOF=…) -
CHARACTER*1 EOR/Z'0A'/,EOF/Z'00'/
The helper currently builds with:
-O2 -std=legacy -ffixed-line-length-none -fallow-argument-mismatch