Intel® Math Kernel Library 2018 Developer Reference - C

mkl_mic_get_status

For the Automatic Offload mode, returns the status of the latest call to an Intel MKL function.

Syntax

int mkl_mic_get_status (void);

Include Files

Description

This function returns the status of the latest call to an Intel MKL function done in the Automatic Offload (AO) mode. The sign of the returned value characterizes the status of the AO computations at a high level:

In an AO call to an Intel MKL function, offloading computations as expected may not be possible for various reasons, such as:

The status returned helps you to find out the reason of offload failure.

Because the status is a thread-local value, to be able to check the status of an Intel MKL AO function, the following sequence of function calls in the same thread is required:

  1. mkl_mic_clear_status

  2. Intel MKL function

  3. mkl_mic_get_status

Return Values

Name

Type

Description

status

int

The thread-local value of the status:
  • MKL_MIC_SUCESS (0) - The computations successfully completed with offloading to Intel Xeon Phi coprocessors.

  • MKL_MIC_NOT_IMPL (1) - The computations successfully completed only on the host because AO is not implemented for this function or for the combination of input parameters of the function.

  • MKL_MIC_HOST_FALLBACK (2) - The computations successfully completed only on the host because AO could not start. Possible reasons: the environment path does not include required system libraries, resources are insufficient, memory allocation failed on a coprocessor, and so on.

  • MKL_MIC_DISABLED (3) - The computations successfully completed only on the host because AO is disabled.

  • MKL_MIC_FAILED (-1) - The computations were not completed. AO could start, but an error occurred during the computations. Note that the function output data may be corrupted in this case.

  • MKL_MIC_HOST_FALLBACK_DISABLED (-2) - The computations were not completed because AO could not start. Possible reasons: the environment path does not include required system libraries, resources are insufficient, memory allocation failed on a coprocessor, and so on. Unlike MKL_MIC_HOST_FALLBACK, the mkl_mic_get_status function can return this status only if the mkl_mic_set_flags function disabled falling back to host. Unlike for MKL_MIC_FAILED status, the function input and output data remain untouched.

Optimization Notice

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804

See Also