Parallelization Overview

For shared memory parallel programming, the Intel® Fortran Compiler supports both the OpenMP* API and an automatic parallelization capability.

The compiler supports the OpenMP Fortran version 2.0 API specification and provides symmetric multiprocessing (SMP), which relieves the user from having to deal with the low-level details of iteration space partitioning, data sharing, and thread scheduling and synchronization; it also provides the performance gain from shared memory, multiprocessor systems.

The auto-parallelization feature of the Intel Fortran Compiler automatically translates serial portions of the input program into equivalent multithreaded code. Automatic parallelization determines the loops that are good worksharing candidates, performs the dataflow analysis to verify correct parallel execution, and partitions the data for threaded code generation as is needed in programming with OpenMP directives.

The following table lists the options that perform OpenMP and auto-parallelization  support.

Option

Description

-openmp

Enables the parallelizer to generate multithreaded code based on the OpenMP directives. Default: OFF.

-openmp_report{0|1|2}

Controls the OpenMP parallelizer's diagnostic levels. Default: -openmp_report1.

-openmp_stubs

Enables compilation of OpenMP programs in sequential mode. The OpenMP directives are ignored and a stub OpenMP library is linked. Default: OFF.

-parallel

Enables the auto-parallelizer to generate multithreaded code for loops that can be safely executed in parallel. Default: OFF.

-par_threshold{n}

Sets a threshold for the auto-parallelization of loops based on the probability of profitable execution of the loop in parallel, n=0 to 100. n=0 implies "always." Default: n=75.

-par_report{0|1|2|3}

Controls the auto-parallelizer's diagnostic levels.
Default: -par_report1.

 Note
When both -openmp and -parallel are specified on the command line,  the -parallel option is only honored in routines that do not contain OpenMP directives. For routines that contain OpenMP directives, only the -openmp option is honored.

Important component of the parallelization programming is the Intel Fortran Compiler's vectorizer. The vectorizer detects operations in the program that can be done in parallel, and then converts the sequential program to process 2, 4, 8 or up to 16 elements in one operation, depending on the data type. In some cases auto-parallelization and vectorization can be combined for better performance results.