OFFLOAD_WAIT

OFFLOAD Compiler Directive: Specifies a wait for a previously initiated asynchronous activity. This directive only applies to Intel® MIC Architecture.

!DIR$ OFFLOAD_WAIT specifier[[,] specifier...]

specifier

Can be any of the following:

  • TARGET (target-name [:target-number])

  • IF (if-specifier)

    An optional specifier. Include it to allow a test at execution time for whether or not the executable should try to offload the statement.

  • WAIT (tag [, tag, ...])

    This is a required specifier. It indicates a wait for completion of a previously initiated asynchronous data transfer or asynchronous computation.

target-name

Is an identifier that represents the target. The only allowable target name is MIC.

target-number

(Optional) Is an integer expression whose value is interpreted as follows:

>=0

A value greater than or equal to zero specifies execution on a specific coprocessor. The specific coprocessor is determined as follows:

coprocessor = MOD (target-number, number_of_coprocs)

If the correct target hardware needed to run the offloaded code is not available on the system, the program fails with an error message.

<=-1

These values are reserved.

If you don't specify this argument, the runtime system chooses whether to execute the code on the CPU or the coprocessor, and if multiple coprocessors are available, on which coprocessor.

For example, in a system with 4 coprocessors:

  • Specifying 2 or 6 tells the runtime systems to use coprocessor 2 for the transfer, because both MOD(2,4) and MOD(6,4) equal 2.

  • Specifying 1000 tells the runtime systems to use coprocessor 0 for the transfer, because MOD(1000,4) = 0.

if-specifier

Is a Boolean expression.

If the expression evaluates to true, then execution waits for the completion of a previously initiated asynchronous data transfer or asynchronous computation. If the specified target coprocessor is absent from the system or not available at that time because it is fully loaded, then no action is taken.

If the expression evaluates to false, then no action is taken and none of the other offload clauses have any effect.

tag

Is an integer expression.

When used with WAIT, this integer expression is asynchronous input data that is a memory reference. Use the value that you specified to start the asynchronous computation or data transfer with the OFFLOAD or OFFLOAD_TRANSFER directive.

The OFFLOAD_WAIT directive specifies a wait for the completion of a previously initiated asynchronous data transfer done by the OFFLOAD_TRANSFER directive, or an asynchronous computation and return data transfer, if any, done by the OFFLOAD directive.

See the example in OFFLOAD.

関連情報


このヘルプについてのフィードバックを送信