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 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 switches for your version of DIGITAL UNIX as follows:
kf77 myprog_pcf.f -lkmp_osf -threads
-threads
- causes KAP to link
to POSIX 1003.4a/d4-compliant DECthreads library
libpthreads.so
.
-lkmp_osf
- causes KAP to link to the
parallel processing library libkmp_osf.a
.
kf77 myprog_pcf.f -lkmp_osfp10 -pthread
-pthread
- causes KAP to link
to POSIX 1003.1c-compliant DECthreads library
libpthread.so
.
-lkmp_osfp10
- causes KAP to link to the
parallel processing library libkmp_osfp10.a
.
cshell
command:
uname -r
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.2.7.)
C*KAP* PARALLEL REGION . . . END PARALLEL REGION
(See Section 3.2.2.)
C*KAP* PARALLEL DO
(See Section 3.2.3.)
C*KAP* CRITICAL SECTION . . . END CRITICAL
SECTION
(See Section 3.2.6.)
Copyright © Digital Equipment Corporation. 1997.
All Rights Reserved.