The Intel® Fortran Compiler provides optimizations that help your applications to run faster in Intel® 64 and IA-32 architectures, with support for the latest Fortran language standards. This compiler produces optimized code that can run significantly faster by taking advantage of the ever-increasing core count and vector register width in Intel® Xeon® processors and compatible processors. The Intel® Compiler will help you boost application performance through superior optimizations and Single Instruction Multiple Data (SIMD) vectorization, integration with Intel® Performance Libraries, and by leveraging the latest OpenMP* 5.0 parallel programming model.

Start using the compiler from the command line.

Before You Begin

Before you can use this tool, you must first set the environment variables by sourcing the environment script using the initialization utility to initialize all the tools in one step:

  1. From a command prompt or script, change directory (cd) to <install_dir>/compilers_and_libraries_2020.<update number>.<package number>/linux/bin
  2. Enter source compilervars.sh ia32|intel64 or source compilervars.csh ia32|intel64

By default, <install_dir> is:

Use the Command Line

Use the command below to invoke the compiler from the command line.

Build a Program

Follow the steps below to test your compiler installation and build a program.

  1. Use a text editor to create a file called "hello.f90" with the following contents:
    print *, “hello!”
    end
  2. From a command window, issue the following command to define the compiler using the C-SHELL.
    /usrs/users/me$   source /opt/intel/parallel_studio_xe_2018/bin/psxevars.csh intel64

    Or issue the following command using a BASH-style shell:

    /usrs/users/me$   . /opt/intel/parallel_studio_xe_2018/bin/psxevars.sh intel64

    This command adds the compiler directors to PATH and updates LD_LIBRARY_PATH to make it easier to run a Fortran program. This particular configuration defaults the compiler to generating 64-bit objects. That can be overridden using command line options.

    The command to invoke the setup script must be done in any command window where you want to use the Intel® Fortran Compiler. Alternatively, the command can be added to a .cshrc, .bashrc, or other shell startup file.

  3. From the command window, issue the following command:
    /usrs/users/me$    ifort –o hello hello.f90
  4. Now you have an executable called "hello", which can be run and will give immediate feedback.
/usrs/users/me$   hello
hello!

Fortran supports parallel processing by replicating images and allowing inter-image communication. This is done using coarrays, described in Intel® Fortran Compiler Tutorial: Using Coarray Fortran. Even though the "hello" program used above does not contain any coarray data, it can still be run as a coarray program.

/usrs/users/me$   ifort –o hello–coarray -coarray-num-images=4 hello.f90
/usrs/users/me$   hello
hello!
hello!
hello!
hello!

Next Steps

Find More: Intel® Fortran Compiler

Document Description

Intel® Fortran Compiler 19.1 Developer Guide and Reference

The Developer Guide and Reference contains information on:

  • How to use the command line or the Eclipse* CDT
  • Support for the latest compiler technologies and architectures.
  • Compiler reference material, including options, program structures, class and math libraries, and much more

Code Samples

Intel® Fortran Compiler Tutorials

Find the latest code samples and product support. Learn specific compiler optimizations, features, tools, and programming concepts.

Intel® Fortran Compiler Release Notes

Information on product installation, new and changed features, and issues that are not described in the product documentation.

This link takes you an archive of Intel® Fortran Compiler release notes on the Intel® Developer Zone.

Intel® Software Documentation Library

Software product documentation on the Intel® Developer Zone.

Other Help

You can access general help for compiler options after setting up the environment by entering ifort -help or man ifort at the command line.

Find More: Intel® Parallel Studio

Document Description

Online Training

The online training site is an excellent resource for training on using the compiler in conjunction with your product suite.

Release Notes

Information on the product installation, new and changed features, and issues that are not described in the product documentation.

This link takes you to the Intel® Developer Zone.

Code Samples and Tutorials

Code samples and corresponding tutorials. Learn specific compiler optimizations, features, tools, and programming concepts.

Notices and Disclaimers

Intel, the Intel logo, Intel Atom, Intel Core, Intel Xeon Phi, VTune and Xeon are trademarks of Intel Corporation in the U.S. and/or other countries.

*Other names and brands may be claimed as the property of others.

This software and the related documents are Intel copyrighted materials, and your use of them is governed by the express license under which they were provided to you (License). Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, disclose or transmit this software or the related documents without Intel's prior written permission.

This software and the related documents are provided as is, with no express or implied warranties, other than those that are expressly stated in the License.