Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
1699 Discussions

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

David_F_8
Beginner
1,797 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
Honored Contributor III
1,797 Views
If you don't get a response here, either the Mic or mkl forum are more likely to elicit an expert response.
0 Kudos
Reply