CHUNK (TU*X only)

Compaq Fortran Parallel Compiler 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.

Syntax

c$PAR CHUNK = chunksize

c
Is one of the following: C (or c), !, or * (see Syntax Rules for Parallel Directives).


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

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

See Also: MP_SCHEDTYPE, Parallel Directives for Tru64 UNIX Systems, Compaq Fortran Parallel Compiler Directives (TU*X only), OpenMP Fortran API Compiler Directives (TU*X only)