Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
6 Views

offload_signaled documentation

In the C++ (v16.0 update 1) documentation:

Determining if Code has Completed Running on a Coprocessor

To determine if a section of offloaded code has completed running on a given coprocessor, you can use the API _Offload_signaled().

The syntax for this API is:

extern int _Offload_signaled(int target_number, void *signal);

Nowhere is it described what the return values are.

Same thing in the Fortran documentation

Determining if Code has Completed Running on a Coprocessor

To determine if a section of offloaded code has completed running on a given coprocessor, you can use the API OFFLOAD_SIGNALED().

The syntax for this API is:

OFFLOAD_SIGNALED(target_number,signal)

0 Kudos
3 Replies
Highlighted
Employee
6 Views

I'll confirm, but I understand offload_signaled() returns a 1 (true) or 0 (false) based on the signal having been set (1) or not (0). The values cited from mic_lib.f90 correspond to the STATUS() clause.

0 Kudos
Highlighted
6 Views

Kevin,

The results of STATUS() clause are those listed above. My interest is in the return of OFFLOAD_SIGNALED, which has a different (additional) set of return values.

In particular, OFFLOAD_SIGNALED is intended for use with asynchronous offloads. The intended purpose is not only to determine STATUS(), but also if the signaled state is not signaled and the offload associated with the signal has not aborted (IOW running).

Note, status OFFLOAD_UNAVAILABLE is not suitable for SIGNAL_BUSY or SIGNAL_NOT_SIGNALED. Though I could envision a naïve implementation to assume OFFLOAD_UNAVAILABLE  is interchangeable.

Jim Dempsey 

0 Kudos
Highlighted
Employee
6 Views

Jim,
   The return value is 1 (true)  or 0 (false) if offload associated with the signal has completed or not.

Ravi

0 Kudos