ftnlx
- Date:
09-20-2016
NAME
ftnlx - Creates a Fortran program listing, cross-reference, loopmark, and checks for potential errors.
SYNOPSIS
ftnlx[-o outputFileName]
[-r option]
[-V]
source_file ...
DESCRIPTION
The ftnlx command creates a listing for your Fortran program that contains the following information:
Source listing
Embedded error messages
Loop and parallel markings
Cross reference
Command line option report
Global common block report
Lint checking
Call-site checking
The source listing is a copy of your code that has a line number for each line of code.
Embedded error messages are error descriptions placed immediately after the line that caused the error.
Loop and parallel markings show the region of optimized code.
The cross reference report lists the names of all entities (for example, variables, program units, and common blocks) and the line numbers where they are used. You can use this information to help identify where and how an entity is used.
The command line option report lists all the options specified by you and the compiler.
The COMMON block report lists all COMMON blocks and the program units that use them, and also checks for possible errors.
Lint checking checks your code for program constructs that may need further investigation. ftnlx performs these check on two levels:
Constructs that have a local scope (within a subprogram).
Constructs that have a global scope (for all encountered subprograms).
Requirements
For each Fortran source file to be checked, you must specify its corresponding compiler information file (CIF). The compiler generates the CIFs when used with the -C option.
Note: Fortran files on Cray systems have these suffixes: .f, .F, .for, .FOR, .f90, .F90, .f95, .F95, .f03, .F03, .f08, .F08, .ftn, or .FTN. CIFs’ have a .T suffix.
Options
ftnlx supports these options:
- -o outputFileName
Write the listing to file outputFileName instead of stdout.
- -r
This option affects the messages, placement of messages, which reports are generated, and the format of reports. These options are available:
- Option
Action
- c
Produce a global common block report.
- e
Expands included files in the source listing. For C and C++ source files, system include files are not expanded.
This option is off by default.
- E
Expands all include files. Using this option may result in a very large listing file. All system include files are expanded. For Fortran source files, -re and -rE are equivalent.
This option is off by default.
- i
Used with the -rm option to intersperse loop optimization messages within the loopmark listing. By default, the messages are placed at the bottom of the program unit.
- l
Enable lint checking.
- m
Produce a listing with loop and parallel markings. Messages are placed at the end of each program unit unless the -ri option is also specified.
- o
Create a report that shows the compiler options specified by you and the default options used by the compiler.
- s
Enable source listing (default).
- x
Produce a cross-reference listing.
- -V
Prints the ftnlx version information to stderr.
- source_file
Specifies a set of Fortran source files and their derived CIF. Fortran source files on Cray systems may have any of these suffixes: .f, .F, .for, .FOR, .f90, .F90, .f95, .F95, .f03, .F03, .f08, .F08, .ftn, or .FTN. CIFs’ have a .T suffix.
Note: File names having the following suffixes are generated by the preprocessor: .F, .FOR, .F90, .F95, .F03, .F08, or .FTN. The ftnlx command accepts Fortran files generated by the preprocessor but cannot perform some of the operations described on this man page on preprocessor-generated files.
NOTES
The following notes apply to the ftnlx command:
The output is not designed to be used as input to other tools.
Performs only limited analysis of subprograms that contain syntax errors, depending on the type of error. That is, syntax errors should be corrected before using ftnlx.
RETURN VALUES
The ftnlx command returns zero on normal completion and nonzero on abnormal termination.
SEE ALSO
crayftn(1)
Cray Fortran Reference Manual