next up previous contents
Next: Syntax of the ON Up: Approved Extensions for Data and Previous: Other Restrictions on Active

The ON Directive

 

The purpose of the ON directive is to allow the programmer to control the distribution of computations among the processors of a parallel machine. In a sense, this is the computational analog of the DISTRIBUTE and ALIGN directives for data. The ON directive does this by specifying the active processor set for a statement or set of statements. This temporarily shrinks the active processor set.

If the computations in two ON block executions are not related (for example, if the ON block executions are two iterations of an INDEPENDENT loop), their ON directives give the compiler clear instructions for exploiting this potential parallelism.