| Cray C/C++ Reference Manual | ||
|---|---|---|
| Prev Section | Chapter 2. Compiler Commands | Next Section |
The following sections describe task optimization options.
| Default option: | -h task0 |
The -h taskn option specifies the level of automatic tasking (Autotasking) to be performed. Tasking allows segments of code to execute in parallel on multiple processors. This option has no effect on tasking directives. Tasking and tasking directives are described in Section 4.8.
Note: The -h taskn option is accepted and ignored on UNICOS/mk systems.
Argument n can be one of the following:
Autotasking is disabled when -h nostack is specified.
This option gives task private status to all statically-allocated objects in the program. It has no effect if -h nostack is specified.
Unlike -h taskcommon, initialized objects can be made private to each task with the -h taskprivate option. They are initialized at startup for each task prior to the execution of the main entry point.
For information on tasking and tasking directives, see Section 4.8.
| Default option: | -h common |
The -h taskcommon option gives task common status to all statically-allocated objects in the program. It has no effect if -h nostack is specified. The -h common option gives common (as opposed to taskcommon) status to all global objects in the program. Tasking and tasking directives are described in Section 4.8.
Objects that are initialized will not be marked as task common. The -h taskprivate option can be used to make these objects private to each task and be initialized at startup for each task prior to the execution of the main entry point.
| Default option: | -h notaskinner |
(UNICOS systems) Autotasking attempts to maximize the amount of parallel work in a taskable loop by interchanging the loop outwards. Sometimes this fails and a taskable loop remains innermost. By default, such a remaining innermost and taskable loop will not task if, at compile time, sufficient parallel work cannot be found. The -h taskinner option enables tasking of the innermost loop with a run-time threshold check to ensure that there is sufficient parallel work in the loop. Aggressive Autotasking (-h task3) must also be specified for this option to take effect.
| Default option: | -h threshold |
(UNICOS systems) The -h [no]threshold option enables or disables generation of run-time threshold testing for autotasked loops. Aggressive Autotasking (-h task3) must also be specified for this option to take effect.
| Prev Section | Table of Contents | Title Page | Next Section |
| Optimization (Vector) | Up one level | Optimization (Inline) |