Automatic parallelization is most useful on large programs with the following characteristics:
KAP is unable to automatically parallelize loops with data
dependencies between loop iterations or loops with calls to external
routines. You may be able to cause KAP to parallelize such loops by
using C*$*
assertions and directives to give KAP more
information.
To compile a program for automatic parallel execution, use the
KAP /concurrentize
qualifier, abbreviated
/conc
, with the kfort
driver, as follows:
kfort /fkapargs=(/conc/verbose) myprog.f
The /verbose
qualifier causes processing information to
display as follows:
kapf /cmp=myprog_cmp.f myprog.f /natural KAP/Digital_VMS_F V3.1 k271625 970317 08-Apr-1997 13:46:03 0 errors in file myprog.f Issuing the compiler command: for/fast/optimize=(tune=host,level=5) myprog_cmp.f issuing link command: link /threads_enable/EXECUTABLE=myprog.exe myprog_cmp.obj, SYS$COMMON:[SYSLIB]kmp/lib
The /conc
qualifier tells KAP to automatically
restructure code for parallel processing. When you use the
/conc
qualifier with the kfort
command, the
driver sets the compiler qualifier /automatic
by
default to ensure correct execution of a multithreaded program.
Do not override the /automatic
qualifier.
The /conc
qualifier causes the kfort
driver to set the correct linker qualifiers for your versions of
the OpenVMS Alpha parallel run-time and DECthreads libraries. For
example, the /conc
qualifier sets the following OpenVMS
Alpha compiler and linker qualifiers:
/automatic
/fast
sys$common:[syslib]kmp.olb/lib
/threads_enable
/optimize=(tune=host,level=5)
Section 3.4 explains these qualifiers.