To compile a program for parallel execution using kapf
, use the following commands:
kapf /conc /cmp=myprog_mp.f myprog.f fort myprog_mp.f /fast/optimize=(tune=host,level=5) /automatic link myprog_cmp.obj/threads_enable/EXECUTABLE=myprog.exe,SYS$COMMON:[SYSLIB]kmp/lib
An explanation of the compiler and linker qualifiers follows:
/automatic - tells the compiler to allocate
   local variables on the run-time stack.
   /conc - tells KAP to restructure source code
   for parallel processing.
   /cmp - causes KAP to save the optimized
   source program under the file name of your choice. The
   kapf default is to name the optimized source
   file_name_cmp .
   /fast - sets the following qualifiers that
   can improve run-time performance: /alignment=natural
   , assume=noaccuracy_sensitive , math_
   library=fast , and /optimize=level=4 .
   /sys$common:[syslib]kmp.olb - tells the
   linker to use the KAP parallel processing library for OpenVMS
   Alpha. The parallel processing library provides an interface
   to DECthreads. See Section 3.1 for more
   information.
   /threads_enable - tells the linker to
   allow a multithreaded application to have a thread executing
   on every CPU in a multiprocessor system. See Section 3.1 for more information.
   /optimize=(tune=host,level=5) -
   tells the compiler to optimize for the architecture of
   the host processor. Note that the Digital Fortran 
   /optimize=(tune=host,level=5) qualifiers and the KAP
   Fortran /tune qualifier work independently and
   perform different optimizations. For information about the
   KAP Fortran /tune qualifier, see Section 4.1.7.
   kapf
to process a file, you must set the Digital Fortran compiler
and linker qualifiers appropriately. For this reason, Digital
recommends that you use kfort whenever possible,
as kfort automatically sets the compiler and linker
qualifiers correctly.