Skip to content

Commit 5477126

Browse files
rousonbonachea
authored andcommitted
doc(README): reorg, update commands, add lfortran
1 parent 5f0e0ef commit 5477126

File tree

1 file changed

+63
-36
lines changed

1 file changed

+63
-36
lines changed

README.md

Lines changed: 63 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,49 @@ The requirements and assurances might be constraints of three kinds:
5858

5959
The [example/README.md] file shows examples of writing constraints in notes on class diagrams using the formal syntax of the Object Constraint Language ([OCL]).
6060

61-
Downloading, Building, and Running Examples
62-
-------------------------------------------
61+
Running the Examples
62+
--------------------
63+
See the [./example](./example) subdirectory.
64+
65+
Building and Testing
66+
--------------------
67+
68+
- [Cray Compiler Environment (CCE) `ftn`](#cray-compiler-environment-cce-ftn)
69+
- [GNU Compiler Collection (GCC) `gfortran`](#gnu-compiler-collection-gcc-gfortran))
70+
- [Intel `ifx`](#intel-ifx))
71+
- [LFortran `lfortran`](#lfortran-lfortran)
72+
- [LLVM `flang-new`](#llvm-flang-new)
73+
- [Numerical Algorithms Group (NAG) `nagfor`](#numerical-algorithms-group-nag-nagfor)
74+
75+
### Cray Compiler Environment (CCE) `ftn`
76+
Because `fpm` uses the compiler name to determine the compiler identity and because
77+
CCE provides one compiler wrapper, `ftn`, for invoking all compilers, you will
78+
need to invoke `ftn` in a shell script named to identify CCE compiler. For example,
79+
place a script named `crayftn.sh` in your path with the following contents and with
80+
executable privileges set appropriately:
81+
```
82+
#!/bin/bash
6383
64-
### Downloading Assert
84+
ftn $@
85+
```
86+
Then build and test Assert with the command
6587
```
66-
git clone git@github.com:berkeleylab/assert
67-
cd assert
88+
fpm test --compiler crayftn.sh --profile release
6889
```
6990

70-
### Building and testing with `gfortran`
91+
### GNU Compiler Collection (GCC) `gfortran`
92+
7193
#### Single-image (serial) execution
72-
The command below builds Assert and runs the full test suite in a single image.
73-
For `gfortran` 14 or later, use
94+
With `gfortran` 14 or later, use
7495
```
7596
fpm test --profile release
7697
```
77-
For `gfortran` 13 or earlier, use
98+
With `gfortran` 13 or earlier, use
7899
```
79100
fpm test --profile release --flag "-ffree-line-length-0"
80101
```
81102
The above commands build the Assert library (with the default of assertion enforcement disabled) and runs the test suite.
103+
82104
#### Multi-image (parallel) execution
83105
With `gfortran` 14 or later versions and OpenCoarrays installed, use
84106
```
@@ -88,60 +110,65 @@ With `gfortran` 13 or earlier versions and OpenCoarrays installed,
88110
```
89111
fpm test --compiler caf --profile release --runner "cafrun -n 2" --flag "-ffree-line-length-0"
90112
```
91-
To build and test with the Numerical Algorithms Group (NAG) Fortran compiler version
92-
7.1 or later, use
93-
```
94-
fpm test --compiler=nagfor --profile release --flag "-coarray=cosmp -fpp -f2018"
95-
```
96113

97-
### Building and testing with the Intel `ifx` compiler
114+
### Intel `ifx`
115+
98116
#### Single-image (serial) execution
99117
```
100118
fpm test --compiler ifx --profile release
101119
```
120+
102121
#### Multi-image (parallel) execution
103122
With Intel Fortran and Intel MPI installed,
104123
```
105124
fpm test --compiler ifx --profile release --flag "-coarray -DASSERT_MULTI_IMAGE"
106125
```
107126

108-
### Building and testing with the LLVM `flang-new` compiler
109-
#### LLVM version 19
127+
### LLVM `flang-new`
128+
129+
#### Single-image (serial) execution
130+
With `flang-new` version 19, use
110131
```
111132
fpm test --compiler flang-new --flag "-mmlir -allow-assumed-rank -O3"
112133
```
113-
#### LLVM version 20 or later
134+
With `flang-new` version 20 or later, use
114135
```
115136
fpm test --compiler flang-new --flag "-O3"
116137
```
117138

118-
### Building and testing with the Numerical Algorithms Group (NAG) compiler
139+
#### Multi-image (parallel) execution
140+
With `flang-new` version 21 built from the SiPearl llvm-project fork's
141+
[prif branch](https://github.com/SiPearl/llvm-project/tree/prif), use
119142
```
120-
fpm test --compiler nagfor --profile release --flag "-fpp -coarray=cosmp"
143+
fpm test --compiler -caffeine -L<path-to-libcaffeine> -l<gasnet-conduit> -L<path-to-libgasnet>
121144
```
145+
where, for example, `<gasnet-conduit>` might be `gasnet-smp-seq` for
146+
shared-memory execution.
122147

123-
### Building and testing with the Cray Compiler Environment (CCE)
124-
Because `fpm` uses the compiler name to determine the compiler identity and because
125-
CCE provides one compiler wrapper, `ftn`, for invoking all compilers, you will
126-
need to invoke `ftn` in a shell script named to identify CCE compiler. For example,
127-
place a script named `crayftn.sh` in your path with the following contents and with
128-
executable privileges set appropriately:
129-
```
130-
#!/bin/bash
148+
### LFortran `lfortran`
131149

132-
ftn $@
133-
```
134-
Then build and test Assert with the command
150+
#### Single-image (serial) execution
135151
```
136-
fpm test --compiler crayftn.sh --profile release
152+
fpm test --compiler lfortran --profile release --flag --cpp
137153
```
138154

155+
### Numerical Algorithms Group (NAG) `nagfor`
139156

140-
### Building and testing with other compilers
141-
To use Assert with other compilers, please submit an issue or pull request.
157+
#### Single-image (serial) execution
158+
With `nagfor` version 7.1 or later, use
159+
```
160+
fpm test --compiler nagfor --profile release --flag -fpp
161+
```
142162

143-
### Running the examples
144-
See the [./example](./example) subdirectory.
163+
#### Multi-image execution
164+
With `nagfor` 7.1, use
165+
```
166+
fpm test --compiler nagfor --profile release --flag "-fpp -coarray=cosmp -f2018"
167+
```
168+
With `nagfor` 7.2 or later, use
169+
```
170+
fpm test --compiler nagfor --profile release --flag -fpp
171+
```
145172

146173
Documentation
147174
-------------

0 commit comments

Comments
 (0)