Hi guys, I am facing a weird linker error with _mm512_storenr_ps() intrinsic in offload mode programming. I post this issue here and hope that someone could give the advice.
I have implemented successfully a Xeon Phi program in native mode and then changed to offload mode.
There are 3 files and the code is summarized like this
file main.cpp
#include myfunction.h
void main()
{
// CPU code
...
//pragma code, simply call the computeX() function to offload to Xeon Phi
#pragma offload target(mic)
computeX()
//CPU code
....
}
And file myfunction.h (header file)
#pragma offload_attribute (push,target(mic))
void computeX()
#pragma offload_attribute(pop)
And file myfuncion.cpp (implementation of functions in header file)
#pragma offload_attribute (push,target(mic))
#include myfunction.h
void computeX(){
//many KNC intrinsic instructions such as _mm512_add_epi32(...);
_mm512_storenr_ps(...); //execute the _mm512_storenr_ps(...)
//many KNC intrinsic instructions such as _mm512_sub_epi32(...);
}
#pragma offload_attribute(pop)
When I compile the code, there is a weird linker error like this: undefined reference to `_mm512_storenr_ps'
However, if I remove the _mm512_storenr_ps() intrinsic in my code, the offload program is complied, linked, executed successfully. I have to stress that besides using _mm512_storenr_ps(), I also use many KNC intrinsic instructions but the compiler only generate the linker error with the code line of calling _mm512_storenr_ps().
I guess this is such a bug in Intel compiler (linker). Could someone give me some feedback about this?
For more information, my OS: centOS 7, ICC: 15, MPSS: 3.4
Thanks in advance.