|
| 1 | +Parallel Testing with Caffeine |
| 2 | +============================== |
| 3 | + |
| 4 | +LLVM Flang 22 supports the native Fortran parallel programming model used by |
| 5 | +Julienne: features that enable launching multiple images, which are instances |
| 6 | +of a program. To launch multi-image runs, Flang generates calls to the |
| 7 | +Parallel Runtime Interface for Fortran [(PRIF)](https://go.lbl.gov/prif). |
| 8 | +Using these features requires linking programs to a PRIF implementation such |
| 9 | +as [Caffeine](https://go.lbl.gov/caffeine). |
| 10 | + |
| 11 | +Rough Workflow |
| 12 | +-------------- |
| 13 | +The steps below are intended more for reading rather than for running. Steps |
| 14 | +like these worked recently on a macOS 15.5 system with Apple Silicon, with the |
| 15 | +Homebrew package manager installed, and with `$HOME/.local/` in the `PATH`. |
| 16 | +```bash |
| 17 | +brew install gcc@14 |
| 18 | +git clone -b gcc14.3.0-julienne3.2.0-caffeine0.6.0 https://github.com/BerkeleyLab/flang-testing-project.git |
| 19 | +git clone https://github.com/rouson/handy-dandy |
| 20 | +chmod u+x handy-dandy/src/fresh-llvm-build.sh |
| 21 | +cd flang-testing-project |
| 22 | +./handy-dandy/src/fresh-llvm-build.sh --prefix=$HOME/.local |
| 23 | +cd .. |
| 24 | +git clone https://github.com/BerkeleyLab/caffeine.git |
| 25 | +cd caffeine |
| 26 | +FC=flang-new CC=clang CXX=clang++ ./install.sh --prefix=$HOME/.local |
| 27 | +cd .. |
| 28 | +git clone https://github.com/berkeleylab/julienne |
| 29 | +cd julienne |
| 30 | +fpm test --compiler flang-new --flag -O3 --link-flag <link-to-caffeine> |
| 31 | +``` |
| 32 | +If something similar to the above workflow does not work for you, please |
| 33 | +contact fortran@lbl.gov for assistance. |
0 commit comments