Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

Error compiling MKL for Xeon Phi (MIC) with Compiler assited Offload mode in Visual Studio

David_F_8
Beginner
166 Views

Hello all,

I am new to Xeon Phi and MKL and I am trying to compile the Compiler assisted Offload for the sgemm example in C++ in Windows using Visual Studio (VS) Prof. R12.

I have set the properties in VS project to include MKL libraries, parallel for ilp64 (32bit ints) and set "mandatory" in the offload mode.

The tests I am running are on a 7200 KNC MIC. I have tried other simple applications all successful including reductions with compiler assisted offloading, implicit memory model and native execution. The driver is working fine and I can SSH to the MIC and mount a shared NFS directory. But calling an MKL function from VS using the compiled assisted offloading has not worked.

The error I get follows:

"error : function "sgemm" called in offload region must have been declared with compatible "target" attribute 1> sgemm(&transA, &transB, &n, &n, &n, &alpha, A, &n, B, &n, &beta, C, &n);"

It would seem that the cross compilation is simply not happening because the compiler is not informed of it and there is no forward declaration instructing the compiler to do it. I would assume that this gets done in the "mkl.h" header file or some of the other ones called therein.

I have also added the MKL include and lib paths in the VS paths entry in my solution's properties to no avail.

David

0 Kudos
1 Reply
TimP
Black Belt
166 Views
If you don't get a response here, either the Mic or mkl forum are more likely to elicit an expert response.
Reply