3.3 Directed Parallelization Using the kfort Driver and PCF Directives

Use directed parallelization if you are experienced with parallel programming, and you want to explicitly control which loops KAP parallelizes with PCF directives. PCF directives eliminate the need for you to write calls to the DECthreads library. This is helpful if you previously parallelized your program on a non-OpenVMS Alpha system, because you may be able to replace those directives with PCF directives. For example, Table 3-1 gives a functional comparison of Cray autotasking directives and PCF directives.

In general, use PCF directives only with loops that are safe to parallelize. Where KAP sees loops prefaced with PCF directives, it does not perform data dependence analysis and does not prevent you from using a parallel directive incorrectly.

To compile a program with PCF directives for directed parallel execution, use the compiler and linker qualifiers, as shown in the following example:

kfort myprog_pcf.f sys$common:[syslib]kmp.olb/lib /threads_enable

The qualifiers are as follows:

KAP provides the following PCF directives. Refer to the appropriate sections for explanations and code examples, as follows:


C*KAP* ONE PROCESSOR SECTION . . . END ONE PROCESSOR SECTION - See Section 3.3.7.
C*KAP* PARALLEL REGION . . . END PARALLEL REGION - See Section 3.3.2.
C*KAP* PARALLEL DO - See Section 3.3.3.
C*KAP* CRITICAL SECTION . . . END CRITICAL SECTION - See Section 3.3.6.


Previous Page | Next Page | Contents | Index |
Command-Line Qualifiers

Copyright © Digital Equipment Corporation. 1999. All Rights Reserved.