Fortran Compiler Introduction

The Cray Compiling Environment 8.6 Fortran compiler supports Cray XE, Cray XK, Cray XC, Cray CS series systems, and Cray Envoy systems. The Cray Fortran compiler supports the Fortran 2008 standard (ISO/IEC 1539-1:2010).

The Cray Compiling Environment 8.6 Fortran compiler supports Cray XE, Cray XK, Cray XC, and Cray CS series systems. The Cray Fortran compiler supports the Fortran 2008 standard (ISO/IEC 1539-1:2010). The Cray Fortran compiler is also documented in man pages, beginning with the crayftn(1) man page. Where the information in this manual differs from the man page, the information in the man page supersedes this manual.

The Cray Fortran Programming Environment

The Cray Fortran Programming Environment consists of the tools and libraries used to develop Fortran applications. These are:
  • The ftn command, which invokes the Cray Fortran compiler. The ftn command is properly termed a compiler driver, as it is used both to compile source code into object code and to link object code files and libraries to create executable files. This compiling and linking can be performed either as separate processes or as one contiguous process, which has significant implications for file handling considerations. These implications are described later in this section. See the crayftn(1) man page for more information.
  • CrayLibs libraries, which provides library routines, intrinsic procedures, I/O routines, and data conversion routines.
  • The ftnlx command, which generates listings and checks for possible errors in Fortran programs. See the ftnlx(1) man page for more information.
  • The ftnsplit command, which splits named Fortran files into separate files with one program unit per file. See the ftnsplit(1) man page for more information.
  • The ftnmgen command, which invokes the Fortran makefile generator. See the ftnmgen(1) man page for more information.

Cray Fortran Compiler Messages

The Cray Fortran compiler can produce many messages during compilation and linking. To expand on these messages, use the explain command. For more information, see the explain(1) man page.

Document-specific Conventions

Cray pointer
The term Cray pointer refers to the Cray pointer data type extension.

Fortran Standard Compatibility

In the Fortran standard, the term processor means the combination of a Fortran compiler and the computing system that executes the code. A processor conforms to the standard if it compiles and executes programs that conform to the standard, provided that the Fortran program is not too large or complex for the computer system in question.

The compiler can be directed to flag and generate messages when nonstandard usage of Fortran is encountered. For more information about this command line option (ftn -en), see -ddisable_opt and -eenable_opt or the crayftn(1) man page. When the option is in effect, the compiler prints messages for extensions to the standard that are used in the program. As required by the standard, the compiler also flags the following items and provides the reason that the item is being flagged:
  • Obsolescent features
  • Deleted features
  • Kind type parameters not supported
  • Violations of any syntax rules and the accompanying constraints
  • Characters not permitted by the processor
  • Illegal source form
  • Violations of the scope rules for names, labels, operators, and assignment symbols

    The Cray Fortran compiler includes extensions to the Fortran standard. Because the compiler processes programs according to the standard, it is considered to be a standard-conforming processor. When the option to note deviations from the Fortran standard is in effect (-en), extensions to the standard are flagged with ANSI messages when detected at compile time.

Fortran 2008 Compatibility

No known issues.

The Cray Fortran Compiler supports extended features beyond those specified by the current standard. For more information, see Cray Fortran Language Extensions.

Related Fortran Publications

For more information about the Fortran language and its history, consult the following commercially available reference books:
  • Fortran 2003 and 2008 standards can be downloaded from http://www.nag.co.uk/sc22wg5/. The Fortran 2008 standard is also available directly from the ISO.
  • Chapman, S. Fortran 95/2003 for Scientists & Engineers. McGraw Hill, 2007. ISBN 0073191574.
  • Metcalf, M., J. Reid, and M. Cohen. Modern Fortran. Oxford University Press, 2011. ISBN-13 978-0 199601424.
  • Jeanne C. Adams, Walter S. Brainerd, Richard A. Hendrickson, Richard E. Maine, Jeanne T. Martin, and Brian T. Smith, The Fortran 2003 Handbook: The Complete Syntax, Features, and Procedures. Springer, 2009. ISBN 978-1-84628-378-9.