Technical data
#pragma Directives [3]
Autotasking is enabled by specifying the -h taskn option on the command
line. For more information on the -h taskn option, see Section 2.11.1,
page 20.
• User-directed tasking, sometimes called microtasking or simply tasking,is
controlled by the directives you add to your code. This requires that you
understand the requirements for tasking and perform your own analysis.
To direct tasking manually, you must identify the regions of your program
that are to run in parallel; then insert tasking directives to specify these
regions to the compiler.
Those jobs that do significant amounts of work and are inherently parallel
are candidates for tasking. You must determine where to insert the tasking
directives, determine the tasking context of variables, and check whether the
results are correct.
The Autotasking directives described in the following sections are not available
on UNICOS/mk systems.
3.8.1 Transformations of code for tasking
When analyzing tasking performance, you must understand some of the
implementation details of tasking. This section describes the following tasking
issues:
• Generation of the master, slave, and unitasked code
• Tasking initialization
• Vectorization with tasking
• Vectorization messages and tasking
• Reserved semaphores and shared registers
3.8.1.1 Master, Slave, and Unitasked Code
When the compiler encounters a parallel region, it creates three distinct sections
of code from the region; this is the 3-code model of tasking. These three sections
of code are called the master code, the slave code, and the unitasked code. Each
of these sections are as large, or larger, than the original code. Therefore, the
object file generated for a highly tasked program can be triple the size of the
nontasked object file. Compilation time also increases accordingly.
S–2179–36 63










