4.2.2 /minconcurrent, /mc, (/minconcurrent=1000)

Executing a loop in parallel incurs overhead that varies with different systems. If a loop has little computational work, the overhead required to set up parallel execution may make the loop execute more slowly than it executes serially. The minconcurrent qualifier sets the level of work in a loop above which KAP should execute the loop in parallel. Setting the /minconcurrent qualifier causes KAP to automatically set the /concurrentize qualifier for you.

The range of values for /minconcurrent is all integers greater than or equal to 0. The higher the minconcurrent value, the more iterations and/or statements the loop body must have to run concurrently.

At compilation time, KAP estimates the amount of work inside a loop on the basis of loop computations and loop iterations. KAP multiplies the loop iteration count by the sum of the noindex operands/results and the nonassignment operators. KAP compares its estimation with the minconcurrent value. If the estimated amount of work is greater than the minconcurrent value, KAP generates parallel code for the loop. Otherwise, the loop execution is serial. This is called a two-version loop.

If the loop bounds are known at compilation time, KAP computes the exact iteration count. However, if the loop bounds are unknown, KAP generates a block IF around the parallel code. The block IF allows a run-time decision whether or not to execute the loop in parallel.

To disable the generation of two-version loops throughout the program, use the command-line qualifier /minconcurrent=0 . To disable this action in specific loops, use the C*$* minconcurrent(0) directive.


Previous Page Next Page Contents Index
Command-Line Qualifiers