Preprocessing Fortran Files

You do not usually preprocess Fortran source programs. If, however, you choose to preprocess your source programs, you must use the preprocessor fpp, or the preprocessing capability of a Fortran compiler. It is recommended to use fpp, which is the preprocessor supplied with the Intel® Fortran Compiler.

The compiler driver automatically invokes the preprocessor, depending on the source filename suffix and the option specified. For example, to preprocess a source file that contains standard Fortran preprocessor directives, then pass the preprocessed file to the compiler and linker, enter the following command:

IA-32 applications:

prompt>ifc source.fpp

Itanium(TM)-based applications:

prompt>efc source.fpp

  Note
Using the preprocessor can make debugging difficult. To get around this, you can save the preprocessed file (-P), and compile it separately, so that the proper file information is recorded for the debugger.

Enabling Preprocessing with Compiler Options

You can enable Preprocessor for any Fortran file by specifying the -fpp option. With -fpp, the compiler automatically invokes the fpp preprocessor to preprocess files with the .f, .for or .f90 suffix.

Note
Another option that automatically invokes the preprocessor is -openmp.