@@ -58,27 +58,49 @@ The requirements and assurances might be constraints of three kinds:
58
58
59
59
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] ).
60
60
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
63
83
64
- ### Downloading Assert
84
+ ftn $@
85
+ ```
86
+ Then build and test Assert with the command
65
87
```
66
- git clone git@github.com:berkeleylab/assert
67
- cd assert
88
+ fpm test --compiler crayftn.sh --profile release
68
89
```
69
90
70
- ### Building and testing with ` gfortran `
91
+ ### GNU Compiler Collection (GCC) ` gfortran `
92
+
71
93
#### 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
74
95
```
75
96
fpm test --profile release
76
97
```
77
- For ` gfortran ` 13 or earlier, use
98
+ With ` gfortran ` 13 or earlier, use
78
99
```
79
100
fpm test --profile release --flag "-ffree-line-length-0"
80
101
```
81
102
The above commands build the Assert library (with the default of assertion enforcement disabled) and runs the test suite.
103
+
82
104
#### Multi-image (parallel) execution
83
105
With ` gfortran ` 14 or later versions and OpenCoarrays installed, use
84
106
```
@@ -88,60 +110,65 @@ With `gfortran` 13 or earlier versions and OpenCoarrays installed,
88
110
```
89
111
fpm test --compiler caf --profile release --runner "cafrun -n 2" --flag "-ffree-line-length-0"
90
112
```
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
- ```
96
113
97
- ### Building and testing with the Intel ` ifx ` compiler
114
+ ### Intel ` ifx `
115
+
98
116
#### Single-image (serial) execution
99
117
```
100
118
fpm test --compiler ifx --profile release
101
119
```
120
+
102
121
#### Multi-image (parallel) execution
103
122
With Intel Fortran and Intel MPI installed,
104
123
```
105
124
fpm test --compiler ifx --profile release --flag "-coarray -DASSERT_MULTI_IMAGE"
106
125
```
107
126
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
110
131
```
111
132
fpm test --compiler flang-new --flag "-mmlir -allow-assumed-rank -O3"
112
133
```
113
- #### LLVM version 20 or later
134
+ With ` flang-new ` version 20 or later, use
114
135
```
115
136
fpm test --compiler flang-new --flag "-O3"
116
137
```
117
138
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
119
142
```
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>
121
144
```
145
+ where, for example, ` <gasnet-conduit> ` might be ` gasnet-smp-seq ` for
146
+ shared-memory execution.
122
147
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 `
131
149
132
- ftn $@
133
- ```
134
- Then build and test Assert with the command
150
+ #### Single-image (serial) execution
135
151
```
136
- fpm test --compiler crayftn.sh --profile release
152
+ fpm test --compiler lfortran --profile release --flag --cpp
137
153
```
138
154
155
+ ### Numerical Algorithms Group (NAG) ` nagfor `
139
156
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
+ ```
142
162
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
+ ```
145
172
146
173
Documentation
147
174
-------------
0 commit comments