@@ -34,7 +34,7 @@ preprocessor ASSERTIONS to non-zero, e.g.,
3434```
3535fpm build --flag "-DASSERTIONS"
3636```
37- The program [ example/invoke-via-macro.F90] demonstrates the preferred way to invoke assertions via the three provided macros.
37+ The program [ example/invoke-via-macro.F90] demonstrates the preferred way to invoke assertions via the provided macros.
3838Invoking assertions this way ensures such calls will be completely removed whenever the ` ASSERTIONS ` macro is undefined (or defined to zero) during compilation.
3939Due to a limitation of ` fpm ` , this approach works best if the project using Assert is also a ` fpm ` project.
4040If instead ` fpm install ` is used, then either the user must copy ` include/assert_macros.h ` to the installation directory (default: ` ~/.local/include ` ) or
@@ -84,7 +84,7 @@ Building and Testing
8484- [ GNU Compiler Collection (GCC) ` gfortran ` ] ( #gnu-compiler-collection-gcc-gfortran ) )
8585- [ Intel ` ifx ` ] ( #intel-ifx ) )
8686- [ LFortran ` lfortran ` ] ( #lfortran-lfortran )
87- - [ LLVM ` flang-new ` ] ( #llvm-flang-new )
87+ - [ LLVM ` flang ` ] ( #llvm-flang )
8888- [ Numerical Algorithms Group (NAG) ` nagfor ` ] ( #numerical-algorithms-group-nag-nagfor )
8989
9090### General Build Knobs
@@ -98,16 +98,19 @@ using syntax like: `fpm --flag "-DASSERTIONS=1"`
9898
9999* ` ASSERT_MULTI_IMAGE ` : Controls whether the library attempts to use multi-image
100100 Fortran features (e.g. to report the image number of an assertion failure).
101- The default is compiler-specific. Multi-image support can be disabled using
102- ` -DASSERT_MULTI_IMAGE=0 ` .
101+ Default is disabled, multi-image support can be enabled using ` -DASSERT_MULTI_IMAGE ` .
103102
104- * ` ASSERT_PARALLEL_CALLBACKS ` : Controls the use of a callback interface for
105- multi-process features. Contact us for more details.
103+ ### Cray Compiler Environment (CCE) ` crayftn `
106104
107- ### Cray Compiler Environment (CCE) ` ftn `
108- Because ` fpm ` uses the compiler name to determine the compiler identity and because
109- CCE provides one compiler wrapper, ` ftn ` , for invoking all compilers, you will
110- need to invoke ` ftn ` in a shell script named to identify CCE compiler. For example,
105+ The simplest way to compile with CCE is to invoke the Cray compiler
106+ directly:
107+ ```
108+ fpm test --compiler crayftn --profile release
109+ ```
110+
111+ If instead you prefer to use the Cray PE compiler wrappers, note that ` fpm ` uses
112+ the compiler name to determine the compiler identity, so you will
113+ need to invoke ` ftn ` in a shell script named to identify the CCE compiler. For example,
111114place a script named ` crayftn.sh ` in your path with the following contents and with
112115executable privileges set appropriately:
113116```
@@ -136,11 +139,11 @@ The above commands build the Assert library (with the default of assertion enfor
136139#### Multi-image (parallel) execution
137140With ` gfortran ` 14 or later versions and OpenCoarrays installed, use
138141```
139- fpm test --compiler caf --profile release --runner "cafrun -n 2"
142+ fpm test --compiler caf --profile release --runner "cafrun -n 2" --flag -DASSERT_MULTI_IMAGE
140143```
141144With ` gfortran ` 13 or earlier versions and OpenCoarrays installed,
142145```
143- fpm test --compiler caf --profile release --runner "cafrun -n 2" --flag "-ffree-line-length-0"
146+ fpm test --compiler caf --profile release --runner "cafrun -n 2" --flag "-DASSERT_MULTI_IMAGE - ffree-line-length-0"
144147```
145148
146149### Intel ` ifx `
@@ -156,16 +159,16 @@ With Intel Fortran and Intel MPI installed,
156159fpm test --compiler ifx --profile release --flag "-coarray -DASSERT_MULTI_IMAGE"
157160```
158161
159- ### LLVM ` flang-new `
162+ ### LLVM ` flang `
160163
161164#### Single-image (serial) execution
162- With ` flang-new ` version 19, use
165+ With LLVM Flang version 19, use
163166```
164167fpm test --compiler flang-new --flag "-mmlir -allow-assumed-rank -O3"
165168```
166- With ` flang-new ` version 20 or later, use
169+ With LLVM Flang version 20 or later, use
167170```
168- fpm test --compiler flang-new --flag "-O3"
171+ fpm test --compiler flang --flag "-O3"
169172```
170173
171174### LFortran ` lfortran `
@@ -180,17 +183,13 @@ fpm test --compiler lfortran --profile release --flag --cpp
180183#### Single-image (serial) execution
181184With ` nagfor ` version 7.1 or later, use
182185```
183- fpm test --compiler nagfor --flag -fpp
186+ fpm test --compiler nagfor -DASSERTIONS
184187```
185188
186189#### Multi-image execution
187- With ` nagfor ` 7.1, use
188- ```
189- fpm test --compiler nagfor --profile release --flag "-fpp -coarray=cosmp -f2018"
190- ```
191- With ` nagfor ` 7.2 or later, use
190+ With ` nagfor ` 7.1 or later, use
192191```
193- fpm test --compiler nagfor --flag -fpp
192+ fpm test --compiler nagfor --flag -DASSERT_MULTI_IMAGE
194193```
195194
196195Documentation
@@ -242,15 +241,15 @@ In the case of gfortran, this appears to have been resolved by default starting
242241#### Line breaks in macro invocations
243242
244243The preprocessor is not currently specified by any Fortran standard, and
245- as of 2025 its operation differs in subtle ways between compilers.
244+ as of 2026 its operation differs in subtle ways between compilers.
246245One way in which compilers differ is how macro invocations can safely be broken
247246across multiple lines.
248247
249- For example, gfortran and flang-new both accept backslash ` \ ` continuation
248+ For example, GNU ` gfortran ` and LLVM ` flang ` both accept backslash ` \ ` continuation
250249character for line-breaks in a macro invocation:
251250
252251``` fortran
253- ! OK for flang-new and gfortran
252+ ! OK for flang and gfortran
254253call_assert_describe( computed_checksum == expected_checksum, \
255254 "Checksum mismatch failure!" \
256255 )
@@ -276,7 +275,7 @@ Fortran does not support comments with an end delimiter,
276275only to-end-of-line comments. As such, there is no portable way to safely insert a
277276Fortran comment into the middle of a macro invocation. For example, the
278277following seemingly reasonable code results in a syntax error
279- after macro expansion (on gfortran and flang-new ):
278+ after macro expansion (on gfortran and flang):
280279
281280``` fortran
282281! INCORRECT: cannot use Fortran comments inside macro invocation
0 commit comments