Appendix C. Power Fortran Assertions

This appendix lists and describes the following Power Fortran assertions alphabetically:

This chapter describes the assertions that are supported by Power Fortran. Chapter 1, “Overview of Power Fortran,” describes the purpose of assertions.

For details about using assertions, refer to Chapter 7, “Fine-Tuning Power Fortran.”

C*$* ASSERT CONCURRENT CALL

C*$* ASSERT CONCURRENT CALL tells Power Fortran to ignore assumed dependencies that are due to a subroutine call or a function reference. However, you must ensure that the subroutines and referenced functions are safe for parallel execution. This assertion applies to all subroutine and function references in the immediately following loop.

C*$* ASSERT DO (CONCURRENT)

The C*$* ASSERT DO (CONCURRENT) assertion tells Power Fortran to ignore assumed data dependencies. Normally, Power Fortran is conservative about what loops it converts to run in parallel. When Power Fortran analyzes a loop to see if it is safe to run in parallel, it categorizes the loop into one of three groups:

  • yes (loop is safe to run in parallel)

  • no

  • not sure

Normally, Power Fortran does not run “not sure” loops in parallel. C*$* ASSERT DO (CONCURRENT) tells Power Fortran to go ahead and run “not sure” loops in parallel.


Note: If Power Fortran identifies a loop as containing definite (as opposed to assumed) data dependencies, it does not run the loop in parallel even if a C*$* ASSERT DO (CONCURRENT) assertion precedes the loop.


C*$* ASSERT DO (SERIAL)

The C*$* ASSERT DO (SERIAL) assertion tells Power Fortran to run the specified loop serially. Power Fortran does not try to convert the specified loop to run in parallel. Nor does it try to run any enclosing loop in parallel. However, Power Fortran can still convert any loops nested inside the serial loop to run in parallel.

C*$* ASSERT DO PREFER (CONCURRENT)

The C*$* ASSERT DO PREFER (CONCURRENT) assertion runs a particular nested loop in parallel whenever possible. Power Fortran runs other nested loops in parallel only if a condition prevents running the selected loop in parallel.

The C*$* ASSERT DO PREFER (CONCURRENT) assertion applies only to the DO loop that it precedes. Power Fortran does not generate parallel code if you use the –noconcurrentize command-line option or the C*$* NO CONCURRENTIZE directive.

C*$* ASSERT DO PREFER (SERIAL)

The C*$* ASSERT DO PREFER (SERIAL) assertion indicates that you want to execute a DO loop in serial mode. This assertion directs Power Fortran to leave the DO loop alone, regardless of the setting of the optimization level. You can use this assertion to control which loop (in a nest of loops) Power Fortran chooses to run in parallel.

C*$* ASSERT [NO] LAST VALUE NEEDED

The compiler usually uses a temporary variable within an optimized loop when it assigns a scalar in a loop that is concurrentized. It then assigns the last value of the variable to the original scalar if it is possible that the scalar might be reused before it is assigned again. The C*$* ASSERT NO LAST VALUE NEEDED assertion lets the compiler assume that such last-value assignments are unnecessary. This assertion is active until reset or until the end of the program.

C*$* ASSERT NO RECURRENCE

The C*$* ASSERT NO RECURRENCE(variable) assertion tells Power Fortran to ignore all data dependencies associated with variable. Power Fortran ignores not just assumed dependencies (as with the C*$* ASSERT DO (CONCURRENT) assertion) but also real dependencies. Use this assertion to force Power Fortran to parallelize a loop when other, gentler means have failed. Use this assertion with caution, as indiscriminate use can result in illegal parallel code.

C*$* ASSERT NO SYNC

Sometimes when Power Fortran concurrentizes a loop, it adds unnecessary synchronization directives or other synchronization code. You can use the C*$* ASSERT NO SYNC assertion to eliminate synchronization overhead.

C*$* ASSERT PERMUTATION

The C*$* ASSERT PERMUTATION(array) assertion tells Power Fortran that array contains no repeated values. This assertion permits Power Fortran to run in parallel certain kinds of loops that use indirect addressing.

C*$* ASSERT RELATION

The C*$* ASSERT RELATION(name.xx.name) assertion indicates the relationship between two variables or between a variable and a constant. name is the variable or constant, and xx is any of the following: GT, GE, EQ, NE, LT, or LE. This assertion applies only to the next DO statement.