Invoke the Cray Fortran Compiler
The ftn(1) command invokes the Cray Fortran compiler when the Cray Compiling Environment is loaded.
The ftn(1) command invokes the Cray Fortran compiler when the Cray Compiling Environment is loaded.
Cray Fortran Command Syntax
The ftn command is a driver that invokes the Cray Fortran Compiler when the Cray Compiling Environment is loaded, and links in the libraries required in order to produce code that can be executed on the Cray compute nodes. Valid ftn options include those of the ftn(1) driver, as well as those specfic to the Cray Fortran Compiler:
crayftn [ -A module_name[, module_name ] ... ] [ -b bin_obj_file] [ -c] [ -d disable_opt ] [ -D identifier [ = value ] ] [ -e enable_opt ] [ -f source_form ] [ -F ] [ -g ] [ -G debug_lvl ] [-h arg ] [ -I include_dir ] [ -J dir_name] [ -K trap=opt [,opt] . . . ] [ -l lib_file ] [ -L ldir ] [ -m msg_lvl ] [ -M msgs ] [ -N col] [ -o out_file] [-O opt[,opt] ...] [ -p module_site] [ -Q path ] [ -r list_opt] [ -R runchk ] [ -s size ] [ -S ] [ -T ] [-U identifier[, identifier] ... ] [-v] [-V] [-Wphase,"opt..."] [-x dirlist] [-X npes] [-Yphase,dirname] [--] sourcefile [sourcefile ...]
sourcefile Suffix
The sourcefile.suffix names the file or files to be processed. The file suffixes indicate the content of each file and determine whether the preprocessor, compiler, assembler, or linker will be invoked.
| .f, .for | Fixed-format source, compile |
| .F, .FOR | Fixed-format source, preprocess, compile |
| .f90, .f95, .f03, .f08, .ftn | Free-format source, compile |
| .F90, .F95, .F03, .F08, .FTN | Free-format source, preprocess, compile |
| .o | object file, link |
| .a | assembler source, assemble |
The source form specified on the -fsource_form option overrides the source form implied by the file suffixes.
If only one source file is specified on the command line, the .o file is created and deleted. To retain the .o file, use the -c option to disable the linker. Object files produced by the Cray Fortran, C, C++, or assembler compilers, can be specified. Object files are passed to the linker in the order in which they appear on the ftn command line. If the linker is disabled by the -b or -c option, no files are passed to the linker.
File Types Used or Created by the Compiler
- a.out
- Default name of the executable output file. Use the compiler driver command line option -o to specify an executable name other than a.out.
- .i
- Files containing output from the source preprocessor
- .o
- Relocatable object code. During compilation, these relocatable object files are saved in the current directory automatically. If CrayPat is used to conduct performance analysis experiments, the object files created during compilation must be kept in order to preserve source-to-executable function mapping. To do so, use the -h keepfiles option.
- .a
- Library files containing external references
- .s
- Assembly language files. Files with .s extensions are assembled and written to the corresponding .o file.
- .mod
- If the -em option is specified, the compiler writes a modulename.mod file for each module; modulename is created by taking the name of the module and, if necessary, converting it to uppercase. This file contains module information, including any contained module procedures.