15.2.4.6 MP_SCHEDTYPE Directive (TU*X only)

The MP_SCHEDTYPE directive sets a default run-time scheduling type. The scheduling type does not effect the semantics of the program, but may affect performance.

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

c$PAR MP_SCHEDTYPE = mode

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


mode
Is one of the following:


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.


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

For More Information:

For details on chunksize, such as defaults, see Section 15.2.4.2.


Previous Page Next Page Table of Contents