Sun Performance WorkShop Fortran Overview

Automatically Parallelize Applications

Performing multiple tasks in parallel speeds program execution and improves performance. Iterative loops tend to dominate application runtime and are the natural focus of automatic parallelization. Use parallelization to distribute the computational work of a loop over several processors without having to modify your source program.

By parallelizing (or multithreading) your application, you can recast the compiled program to take full advantage of a multiprocessor system. Parallelization enables single tasks, such as loops, to run over multiple processors with a significant increase in execution speed.

Analyze your source code with the FORTRAN 77, Fortran 90, and C compilers to determine which loops have iterations that are independent of one another, and therefore safe to parallelize.

Automatically Restructure Code

The FORTRAN 77, Fortran 90, and C compilers perform extensive automatic restructuring of source code, exposing higher degrees of loop-level parallelization. Some of the techniques the compilers use for this transformation are:

Put Pragma Support to Work

Frequently, the compiler has insufficient information to decide whether parallelization is advantageous. In such cases, you can use parallelization directives, or pragmas--comment lines that tell the compiler whether to parallelize the loop that follows the directive.