System information

Intel® Xeon Phi Coprocessor DEVELOPERS QUICK START GUIDE
28
out(C:length(matrix_elements) alloc_if(0) free_if(0)) // output data
{
omp_set_num_threads(64); // set num threads in openmp
sgemm(&transa, &transb, &N, &N, &N, &alpha, A, &N, B, &N,
&beta, C, &N);
}
Code Example 17: Controlling Threads on the Intel® Xeon Phi™ Coprocessor Using
omp_set_num_threads()
Intel® MKL Automatic Offload Model
A few of the host Intel® MKL functions are Automatic Offload-aware--you call them as you normally would on
the host. However, if you have preceded the library call with a call to mkl_mic_enable(), Intel MKL will
automatically decide at runtime whether some or all of the work required to complete the call should be
divided between the host and the Intel® Xeon Phi™ Coprocessor. It bases this decision on problem size, the
load on both processors, and other metrics. Turn this functionality off with mkl_mic_disable().
Automatic Offload applies only to select host Intel MKL library calls made outside of code run on the Intel®
Xeon Phi™ Coprocessor via _Cilk_offload or #pragma offload. As a result, you should be careful to
minimize transferring the same data both in Automatic Offload calls and in code run on the coprocessor by
_Cilk_offload or #pragma offload. At present, there is no way to keep common data on the
coprocessor between automatic MKL offloads and explicit programmer-controlled offloads (via
_Cilk_offload or #pragma offload).
An example that demonstrates how to control Automatic Offload can be found at
/opt/intel/composerxe/mkl/examples/mic_ao/blasc for C code, and at
/opt/intel/composerxe/mkl/examples/mic_ao/blasf for Fortran code.
Debugging on the Intel® Xeon Phi Coprocessor
You will find information specific to debugging Intel® MIC Architecture applications under the “Debugging with
the Intel® Debugger on Eclipse*” and “Debugging on the Command Line” sections of
/opt/intel/composerxe/Documentation/en_US/debugger/debugger_documentation.htm
Performance Analysis on the Intel® Xeon Phi™ Coprocessor
Information on collecting performance data on the Intel® Xeon Phi™ Coprocessor using Intel® VTune Amplifier
XE for Linux* can be found in mic-data-collection.pdf, located in
/opt/intel/vtune_amplifier_xe_2013/documentation/en.