Skip to content

Commit 5872202

Browse files
committed
doc(README): explain parallel testing with flang
This commit adds instructions for building and running neural-fortran (specifcally the test suite) using the experimental multi-image capabilities of LLVM flang 22 + the Caffeine parallel runtime library as an alternative to gfortran + OpenCoarrays.
1 parent 00acae2 commit 5872202

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,20 @@ in parallel, respectively:
9393
fpm build --compiler caf --profile release --flag "-cpp -DPARALLEL"
9494
```
9595

96+
An experimental capability exists for parallel runs when building with LLVM `flang-new`
97+
version 22 or later and [Caffeine](https://go.lbl.gov/caffeine). Steps for installing
98+
LLVM 22.0.0git (the llvm-project main branch as of this writing) and Caffeine are
99+
outlined in [parallel-testing-with-flang.md]. Once installed, an `fpm` command of the
100+
following form should launch the neural-fortran test suite with two executing images:
101+
102+
```
103+
GASNET_PSHM_NODES=2 \
104+
fpm test \
105+
--compiler flang-new \
106+
--flag "-O3 -fcoarray -DPARALLEL" \
107+
--link-flag "-lcaffeine -lgasnet-smp-seq -L<caffeine-install-prefix>/lib -L<gasnet-install-prefix>/lib"
108+
```
109+
96110
#### Testing with fpm
97111

98112
```
@@ -305,3 +319,5 @@ group.
305319
Neural-fortran has been used successfully in over a dozen published studies.
306320
See all papers that cite it
307321
[here](https://scholar.google.com/scholar?cites=7315840714744905948).
322+
323+
https://github.com/BerkeleyLab/julienne/blob/e9f7ea8069206bfc4abf6a9e6dbbd7d07bda075a/doc/parallel-testing-with-flang.md

0 commit comments

Comments
 (0)