3 KAP Parallel Processing

KAP does parallel decomposition of programs so they run on symmetric multiprocessor systems (SMP). This chapter describes how to compile and run a program for parallel execution using the kfort driver. The chapter also describes how you can adjust the degree to which KAP automatically performs parallel decomposition inside your program. KAP parallel processing provides three methods of programmer control, as follows:

  1. automatic - The KAP driver automatically performs parallelization on loops in your program without your intervention. Optionally, you can insert C*$* directives and assertions inside the program to guide KAP. However, KAP makes the final decisions regarding optimizations.

    KAP performs data dependence analysis to decide whether a given loop can be parallelized. KAP automatically inserts calls where it is safe to do so to the parallel run-time library. Then KAP informs you of the data dependencies that prevent parallelization. Section 3.1 shows how to use KAP to perform automatic parallelization of your program.

  2. directed - You can explicitly control where and when KAP performs parallelization inside your program with C*KAP* directives. The C*KAP* directives are the KAP implementation of the X3H5 standard produced initially by the Parallel Computing Forum (PCF). These directives are called PCF directives in this manual.

    When you use directed parallelization, KAP does not perform data dependence analysis and does not prevent you from using a directive incorrectly. Section 3.2 shows how to use KAP to perform directed parallelization of your program.

  3. combination - You control the ownership of parallelization decisions by combining KAP automatic parallelization with your placement of PCF directives inside the program. For example, you can control the parallelization of individual loops with PCF directives, but have KAP do automatic parallelization of the remaining loops in your program. Section 3.3 shows how to use KAP to perform combination parallelization of your program.

Each method uses the same run-time parallel processing libraries.

Review Chapter 2 for general information on KAP syntax, file naming conventions, and optimizing programs.


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