This appendix contains the following sections:
C*$* NO CONCURRENTIZE
The C*$* CONCURRENTIZE directive converts eligible loops to run in parallel. This directive, if specified globally, has the same effect as the –concurrentize command-line option. See also the section called “C*$* NO CONCURRENTIZE”.
The C*$* LIMIT(n) directive reduces Power Fortran processing time by limiting the amount of time Power Fortran can spend on trying to determine whether a loop is safe to run in parallel. Power Fortran estimates how much time is required to analyze each loop nest construct. If an outer loop looks like it would take too much time to analyze, Power Fortran ignores the outer loop and recursively visits the inner loops.
Larger limits often allow Power Fortran to generate parallel code for deeply nested loop structures that it might not otherwise be able to run safely in parallel. However, with larger limits Power Fortran can also take more time to analyze a program. (The limit does not correspond to the DO loop nest level. It is an estimate of the number of loop orderings that Power Fortran can generate from a loop nest.)
This directive, when specified globally, has the same effect as the –limit command-line option.
The C*$* MINCONCURRENT(n) option establishes the minimum amount of work needed inside the loop to make executing a loop in parallel profitable. n is a count of the number of operations (for example, add, multiply, load, store) in the loop, multiplied by the number of times the loop is executed. If the loop does not contain at least this much work, the loop is not run in parallel. If the loop bounds are not constants, an IF clause is automatically added to the Power Fortran-generated C$ DOACROSS directive to test at run time if sufficient work exists.
The C*$* NO CONCURRENTIZE option prevents Power Fortran from converting loops to run in parallel. See also C*$* CONCURRENTIZE.
The C*$* OPTIMIZE(n) directive sets the optimization level. The higher this level, the more code is optimized and the longer Power Fortran runs. Valid values for n are:
Avoids converting loops to run in parallel.
Converts loops to run in parallel without using advanced data dependence tests. Enables loop interchanging.
Determines when scalars need last-value assignment using lifetime analysis. Also uses more powerful data dependences tests to find loops that can run safely in parallel. This level allows reductions in loops that execute concurrently but only if the round-off setting is at least 2.
Breaks data dependence cycles using special techniques and additional loop interchanging methods, such as interchanging triangular loops. This level also implements special-case data dependence tests.
Generates two versions of a loop, if necessary, to break a data dependent arc. This level also implements more exact data dependence tests and allows special index sets (called wraparound variables) to convert more code to run in parallel.
Fuses two adjacent loops if it is legal to do so (no data dependencies) and if the loops have the same control values. In certain limited cases, this also recognizes arrays as local variables. Also tells Power Fortran to try harder to run the outermost loop possible (of a set of loops) in parallel.
|Note: If you want to use unrolling, set the optimize level to at least 4 (the default optimization level is above this threshold).|
The C*$* ROUNDOFF(n) directive controls whether Power Fortran runs a reduction operation in parallel. Valid values for n are as follows:
Suppresses any round-off changing transformations.
Allows reductions to be performed in parallel; a common option. The valid reduction operators are addition, multiplication, min, and max.
Recognizes REAL induction variables. Permits memory management transformations.
The C$ DOACROSS directive tells the compiler to generate parallel code for the loop that immediately follows the directive. Putting this directive in the original source marks the loop to run in parallel and signals Power Fortran not to modify the loop. Power Fortran generates and inserts this directive as part of its parallelism analysis.
The C$& directive continues the C$ DOACROSS directive onto multiple lines.
Power Fortran supports the following Cray directives:
CDIR$ NEXT SCALAR
Power Fortran interprets the CDIR$ IVDEP directive as if it were a C*$* ASSERT DO (CONCURRENT) assertion. (Refer to Appendix C, “Power Fortran Assertions.” )
CDIR$ NEXT SCALAR is a Cray directive that generates scalar code for the next DO loop. Power Fortran interprets this directive as if it were a C*$* ASSERT DO(SERIAL) assertion. (Refer to Appendix C, “Power Fortran Assertions,” for details.)
Power Fortran supports the following VAST directives:
Power Fortran interprets the CVD$ CNCALL directive as if it were the C*$* ASSERT CONCURRENT CALL assertion (described in “CVD$ CNCALL” in Chapter 7). The CVD$ CNCALL directive tells Power Fortran to ignore assumed dependencies caused by a subroutine call or function reference.
Power Fortran interprets this directive as if it were the C*$* CONCURRENTIZE directive (described in “Standard Directives”). The CVD$CONCUR directive runs a loop in parallel to optimize performance.