Auto-parallelization Overview

The auto-parallelization feature of the Intel® Fortran Compiler implements a high-level symmetric multiprocessing (SMP) programming model that provides you with an easy way to exploit the parallelism of SMP systems.

Automatic parallelization relieves the user from having to deal with the low-level details of iteration modification, data partitioning, thread scheduling and synchronizations, while exploiting the performance potential available from multiprocessor systems.

Enabling Auto-parallelizer

To enable the auto-parallelizer, use the -parallel option. The -parallel option detects parallel loops capable of being executed safely in parallel and automatically generates multithreaded code for these loops.  An example of the command using auto-parallelization is as follows:

IA-32 compilations:

prompt>ifc -c -parallel -par_threshold0 myprog.f

Itanium-based compilations:

prompt>efc -c -parallel -par_threshold0 myprog.f

Auto-parallelization Environment Variables

Option

Description

Default

OMP_NUM_THREADS

Controls the number of threads used.

Number of processors currently installed in the system

OMP_SCHEDULE

Specifies the type of runtime scheduling.

static

Guidelines for Effective Auto-parallelization Usage

Enhance the power and effectiveness of the auto-parallelizer by following these coding guidelines:

Analyzing Compiler for Auto-parallelization

Currently, compiler is analyzed only on loop nests, but potentially on independent regions of code (task parallelism). A loop is parallelizable if:

Privatization of scalars is an operation of re-assigning the storage of scalars from the static or parent stack area to the local stack of a thread to enable parallelization. This operation requires a WRITE permission and is usually performed to remove a data dependency between concurrently executing threads.

Preparing for Auto-parallelization

To prepare auto-parallelization, the compiler performs the following transformations:

- work/overhead threshold analysis

- runtime dependency testing