Cray Fortran
Contents
The Fortran compiler on Phoenix is Cray Fortran. It supports the Fortran
95 standard and some features expected Fortran 2000. Unlike other
Fortran compilers that have multiple commands (e.g. "f77",
"f90", etc.), the Cray compiler has only one command.
ftn ...
MPI include files and libraries are available by default. No
additional options are required to compile or link MPI codes.
The following options control how source files are translated into
machine code.
-f fixed |
The source code uses fixed-form syntax, like in Fortran 77. This
option is on by default for source files ending in ".f",
".F", ".f77", and ".F77".
|
-f free |
The source code uses free-form syntax, introduced in Fortran
90. This option is on by default for source files ending in
".f90", ".F90", ".ftn", and
".FTN".
|
-F |
Enable preprocessor macros to be expanded throughout the file. By
default, macros are only expanded on lines with preprocessor
directives (lines starting with "#").
|
-s default64 |
Make the default size of variables the same as for previous
generations of Cray systems, 8 bytes for all but "DOUBLE
PRECISION". Without this option, the
default size of these variables is 4 bytes, like on most non-Cray systems.
|
The following options control the amount of debugging information
generated by the compiler. They can adversely affect optimization.
-g |
Full debugging. Turns off optimization. |
-G1 |
Block-level debugging. Limits optimization. |
-G2 |
Post-mortem (core file) debugging. Allows most optimization. |
For most cases,
the default levels of optimization are appropriate. Here are a few exceptions.
-rm |
Generate a "loopmark" listing. The listing appears in a file with
the suffix ".lst". Loopmarks illustrate where
optimization did and did not occur, and why. |
-Omodinline |
Allow procedures in modules to be inlined into procedures that
use those modules. Inlining can be critical for vectorization. |
-Ogen_private_callee |
Generate the code necessary to call each procedure from within a
stream. With this option, the procedures may be called as usual or
from within a multi-streamed region. |
-Otask0 |
This option insures that the compiler does not try to use OpenMP
parallelism. This option is good for safety. |
-Z |
Compile Co-Array Fortran. |
On many systems, you must specify compiler options to create an
executable that provides profiling data. On the Cray X1, you instead
instrument an existing executabl using the "pat_build" tool.
pat_build old_executable instrumented_executable
You then run the instrumented executable, which produces a
".xf" file. Use "pat_report" to generate a profile.
pat_report file.xf
See "man pat_build" and "man pat_report" for more
information on the types of profiles you can produce.
See "man ftn" for a full list of compiler options. PDF and HTML
documentation is also available online from Cray at the following URL.
http://www.cray.com/craydoc/
In particular, see the following documents.
- Optimizing Applications on the Cray X1 System
- Fortran Language Reference Manual, Volume 1
- Fortran Language Reference Manual, Volume 2
- Fortran Language Reference Manual, Volume 3
- Cray Fortran Compiler Commands and Directives Reference Manual
phoenix
| ram
| cheetah
| eagle
|