15.2.4.2 CHUNK Directive (TU*X only)

The CHUNK directive sets a default chunksize to adjust the number of iterations assigned to a thread. The effect of CHUNK varies, depending on the scheduling type.

The CHUNK directive takes the following form: [See Note]

c$PAR CHUNK = chunksize

c
Is one of the following: C (or c), !, or * (see Section 15.2.1).


chunksize
Is a scalar integer expression.

Rules and Behavior

The effect of chunksize varies by scheduling type, as follows:

The chunksize used for any parallel DO loop is determined by the following (in the order shown):

  1. A chunksize specified in the PDO directive for the current DO loop

  2. A user-specified default specified in the most recent CHUNK directive

  3. If the scheduling for the current DO loop is INTERLEAVED, DYNAMIC, GUIDED, or RUNTIME, a user-specified default specified in the environment variable MP_CHUNK

  4. The compiler default of one

Note: The following form is also allowed: c$CHUNK = chunksize

For More Information:

For details about scheduling types, see Section 15.2.4.6.


Previous Page Next Page Table of Contents