Skip to content

Commit 6fe978b

Browse files
committed
more explicit for OpenMP
1 parent 7b623e2 commit 6fe978b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/best-practices.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,10 +1223,9 @@ OpenMP
12231223

12241224
`OpenMP <http://www.openmp.org/>`_ should be compatible with
12251225
non-openMP compilers. This can be enforced by prepending all
1226-
OpenMP-specific calls by `!$`. Regular compilers will consider these
1226+
OpenMP-specific calls by ``!$``. Regular compilers will consider these
12271227
lines as comments and ignore them. For OpenMP compilers, these lines
1228-
will be considered as regular Fortran code
1229-
For example ::
1228+
will be considered as regular Fortran code. The following code ::
12301229

12311230
program test_openmpi
12321231
!$ use omp_lib
@@ -1241,6 +1240,7 @@ For example ::
12411240
print*, "nthreads=", nthreads
12421241
end program
12431242

1243+
will print the number of threads used when compiled with OpenMP. It will print by default -1 if compiled without OpenMP.
12441244

12451245
MPI
12461246
~~~

0 commit comments

Comments
 (0)