Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Fortran Language Standards

A language standard specifies the form and establishes the interpretation of programs expressed in the language. Its primary purpose is to promote portability of programs across a variety of systems among vendors and users.

The vendor-user community has adopted a series of major Fortran language standards. The primary organizations that develop and publish the standards are the InterNational Committee for Information Technology Standards (INCITS) and International Standards Organization (ISO).

The major Fortran language standards are:

  • Fortran 2018

    American National Standard Programming Language Fortran and International Standars Organization, ISO/IEC 1539-1:2018, Information technology – Programming languages – Fortran. This standard introduced enhancements to coarrays including teams, events, and collective and atomic subroutines, enhanced interoperability with C, and bindings to ISO/IEC/IEEE 60559:2011 (IEEE floating point arithmetic). For more information on supported Fortran 2018 features, see the Intel® Fortran Language Reference.

  • Fortran 2008

    American National Standard Programming Language Fortran and International Standards Organization, ISO/IEC 1539-1:2010, Information technology -- Programming languages -- Fortran. This standard introduces support for submodules and coarrays, and includes various performance enhancements such as the DO CONCURRENT construct. For more information on supported Fortran 2008 language features, see the Intel® Fortran Language Reference.

  • Fortran 2003

    American National Standard Programming Language Fortran and International Standards Organization, ISO/IEC 1539-1:2004, Information technology -- Programming languages -- Fortran. This standard introduces extended support for floating-point exception handling, object-oriented programming, and improved interoperability with the C language. For more information on supported Fortran 2003 features, see the Intel® Fortran Language Reference.

  • Fortran 95

    American National Standard Programming Language Fortran and International Standards Organization, ISO/IEC 1539-1: 1997(E), Information technology -- Programming languages -- Fortran. This standard introduces certain language elements and corrections into Fortran 90. Fortran 95 includes Fortran 90 and most features of FORTRAN 77. For information about differences between Fortran 95 and Fortran 90, see the Intel® Fortran Language Reference.

  • Fortran 90

    American National Standard Programming Language Fortran, ANSI X3.198-1992 and International Standards Organization, ISO/IEC 1539: 1991, Information technology -- Programming languages -- Fortran. This standard emphasizes modernization of the language by introducing new developments. For information about differences between Fortran 90 and FORTRAN 77, see the Intel® Fortran Language Reference.

  • FORTRAN 77

    American National Standard Programming Language FORTRAN, ANSI X3.9-1978. This standard added new features based on vendor extensions to FORTRAN 66 and addressed problems associated with large-scale projects, such as improved control structures.

  • FORTRAN 66

    American National Standard Programming Language FORTRAN, ANSI X3.9-1966. This was the first attempt to standardize the languages called FORTRAN by many vendors. The language was based heavily on IBM's FORTRAN IV language.

Although a language standard seeks to define the form and the interpretation uniquely, a standard may not cover all areas of interpretation. It may also include some ambiguities. You need to carefully craft your program in these cases to insure that you get the desired answers when producing a portable program.

Use Standard Features

Use standard language features to achieve the greatest degree of portability for your Intel® Fortran programs. You can design a robust implementation to improve the portability of your program, or you can choose to use extensions to the standard to increase the readability, functionality, and efficiency of your programs.

You can request that the compiler warn you about program syntax that violates the standard's numbered syntax rules and constraints. While this does not insure that the program as a whole is standard-conforming, it can help to avoid many possible compatibility issues. The /stand (Windows*) or -std (Linux* and macOS) options enable this checking, and you can specify the desire standard to check against. If you do not specify a standard, Fortran 2018 is used.

You can use the standard-semantics compiler option to enable all of the options that implement the current Fortran Standard behavior of the compiler where those differ from the compiler's default.

Use Standard Extensions

Not all extensions to the Fortran standard cause problems when porting to other platforms. Many extensions are supported on a wide range of platforms, and if a system you are porting a program to supports an extension, there is no reason to avoid using it. There is no guarantee, however, that the same feature on another system will be implemented in the same way as with Intel® Fortran. Only the Fortran standard is guaranteed to coexist uniformly on all platforms.

The Intel® Fortran Compiler supports many language extensions on multiple platforms, including Linux*, macOS, and Microsoft Windows* operating systems. The Intel® Fortran Language Reference Manual identifies whether each language element is supported on other platforms.

It is a good programming practice to declare any external procedures either in an EXTERNAL statement or in a procedure interface block, for the following reasons:

  • The newer Fortran standards have added many new intrinsic procedures to the language.

    Programs that conformed to earlier Fortran Standards (such as FORTRAN 77) may include non-intrinsic functions or subroutines having the same name as new Fortran Standard procedures.

  • Some processors include nonstandard intrinsic procedures that might conflict with procedure names in your program.

If you do not explicitly declare the external procedures and the name duplicates an intrinsic procedure, the processor calls the intrinsic procedure, not your external routine. For more information on how the Intel® Fortran Compiler resolves name definitions, see Resolving Procedure References.

Use Compiler Optimizations

Many Fortran compilers perform code-generation optimizations to increase the speed of execution or to decrease the required amount of memory for the generated code. Although the behaviors of both the optimized and non-optimized programs fall within the language standard specification, different behaviors can occur in areas not covered by the language standard. Compiler optimization can influence floating-point numeric results.

The Intel® Fortran Compiler can perform optimizations to increase execution speed and to improve floating-point numerical consistency.

Floating-point consistency refers to obtaining results consistent with the IEEE binary floating-point standards. For more information, refer to the /fp:consistent option of fp-model.

Product and Performance Information

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.

Notice revision #20201201