Skip to content

Commit

Permalink
Merge pull request #94 from kevinstratford/dev-environment
Browse files Browse the repository at this point in the history
gfortran options
  • Loading branch information
davidhenty committed Oct 23, 2020
2 parents 1cebeff + a1838b1 commit 465308e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions user-guide/dev-environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,35 @@ environment:

$ module restore PrgEnv-gnu



Useful Gnu Fortran options
^^^^^^^^^^^^^^^^^^^^^^^^^^

============================== ===============================================
Option Comment
============================== ===============================================
``-std=<standard>`` Default is ``gnu``
``-fallow-argument-mismatch`` Allow mismatched procedure arguments
``-fbounds-check`` Use runtime checking of array indices
``-fopenmp`` Compile OpenMP (default is no OpenMP)
``-v`` Display verbose output from compiler stages
============================== ===============================================

Notes:

1. The ``standard`` in ``-std`` may be one of ``f95`` ``f2003``, ``f2008`` or
``f2018``. The default option ``-std=gnu`` is the latest Fortran standard
plus gnu extensions.

2. Past versions of ``gfortran`` have allowed mismatched arguments to
external producures (e.g., where an explicit interface is not available).
This is often the case for MPI routines where arrays of different types
are passed to ``MPI_Send()`` and so on. This will now generate an error
as not standard conforming. Use ``-fallow-argument-mismatch`` to reduce
the error to a warning. The same effect may be acheived via ``-std=legacy``.


Reference material
^^^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit 465308e

Please sign in to comment.