MP_SCHEDTYPE (TU*X only)

Compaq Fortran Parallel Compiler Directive: Sets a default run-time scheduling type. The scheduling type does not effect the semantics of the program, but may affect performance.

Syntax

c$PAR MP_SCHEDTYPE = mode

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


mode
Is one of the following:


For details on chunksize, see CHUNK.

Rules and Behavior

The MP_SCHEDTYPE directive can appear anywhere in a Compaq Fortran program. When more than one MP_SCHEDTYPE directive appears in the same program, the most recently encountered directive is used.

The scheduling type used for any parallel DO loop is determined from the following (in the order shown):

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

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

  3. If the scheduling type for the current DO loop is RUNTIME, a user-specified default specified in the environment variable MP_SCHEDTYPE

  4. The compiler default of STATIC

The DYNAMIC and GUIDED scheduling types introduce a certain amount of overhead to manage the continuing assignment of iterations to threads during the execution of the loop. However, this overhead is sometimes offset by better load balancing when the average execution time of iterations is not uniform throughout the DO loop.

The STATIC and INTERLEAVED types assign all of the iterations to the threads in advance, with each thread receiving approximately equal numbers of iterations. One of these is usually the most efficient scheduling type when the average execution time of iterations is uniform throughout the DO loop.

The following form is also allowed: c$MP_SCHEDTYPE = mode

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