Software Archive
Read-only legacy content
17061 Discussions

Strange compilation problem of "undefined reference to `_mm512_loadu_ps'"

Xiaoling_Y_
Beginner
985 Views

I met a really strange problem when I tried to compile code with AVX-512 intrinsics. The compiler is 64bit Intel C++ Version 14.0.1.139 Build 20131008 on Windows platform and I installed the latest MPSS 3.1.

I just selected a piece of code to reduce the check workload. If I changed the intrinsics to AVX-2, everything was fine.

==========================================================================================

#include <immintrin.h>

int nx, ny, nz;
float *rEdx, *rEdy, *rEdz;
float *rHdx, *rHdy, *rHdz;
float ***Ex, ***Ey, ***Ez;
float ***Hx, ***Hy, ***Hz;
float ***Cexe, ***Cexh, ***Ceye, ***Ceyh, ***Ceze, ***Cezh;
float Chh;
int SIMDWidth = 4;
bool AVXSupported = false;
bool AVX2Supported = false;
bool AVX512FSupported = false;
bool FMAApplied = false;

void FDTDUpdateECore512_FMA(int n1, int n2)
{
__m512 *vrHdz = (__m512 *)rHdz;

__m512 *vEx, *vEy, *vEz, *vHx, *vHy, *vHz, *vHz01, *vHz10, *vHy10, *vHx01;
__m512 *vCexe, *vCexh, *vCeye, *vCeyh, *vCeze, *vCezh;
__m512 ssereg1, ssereg2, ssereg3, ssereg4;
__m512 vrHdx, vrHdy;

int i, j, k, vk;

ssereg1 = _mm512_loadu_ps(&Hy[k-1]);

// Ex
ssereg4 = _mm512_sub_ps(vHz[vk], vHz01[vk]);
ssereg4 = _mm512_mul_ps(ssereg4, vrHdy);
ssereg3 = _mm512_sub_ps(vHy[vk], ssereg1);
//ssereg3 = _mm512_mul_ps(ssereg3, vrHdz[vk]);
//ssereg3 = _mm512_sub_ps(ssereg3, ssereg4);
ssereg3 = _mm512_fmsub_ps(ssereg3, vrHdz[vk], ssereg4);
ssereg3 = _mm512_mul_ps(ssereg3, vCexh[vk]);
//ssereg4 = _mm512_mul_ps(vEx[vk], vCexe[vk]);
//vEx[vk] = _mm512_sub_ps(ssereg4, ssereg3);
vEx[vk] = _mm512_fmsub_ps(vEx[vk], vCexe[vk], ssereg3);
}

void test()
{
float *data = 0;
__m512 ssereg1 = _mm512_loadu_ps(data);
}

int main(int argc, char **argv)
{
test();

return 0;
}

======================================================================================

When I tried to compile the code with the following command line

icl /Qmic main.cpp -o test

I got the error message as below

Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.1.139 Build 20131008
Copyright (C) 1985-2013 Intel Corporation. All rights reserved.
C:\Users\Xiaoling\AppData\Local\Temp\96603.o: In function `FDTDUpdateECore512_FMA(int, int)':main.cpp:(.text+0x7f): undefined reference to `_mm512_loadu_ps'

The really strange thing is that I used "_mm512_loadu_ps" twice in my code, but the linker only told me the one in function "FDTDUpdateECore512_FMA(int,int)" was undefined reference. I tried to delete some lines in that function and it could be compiled then.

Does anyone have any idea about that? Should I report it as a bug to Intel?

Thanks a lot!

0 Kudos
1 Solution
Kevin_D_Intel
Employee
985 Views

The AVX-512 instructions and this particular intrinsic are not currently available for Xeon Phi™. They will be available with Knight’s Landing. There is a nice discussion in James’ blog: http://software.intel.com/en-us/blogs/2013/avx-512-instructions.

I’m not sure whether this earlier discussion (here) about this intrinsic might aid in your case also (where development suggests a method for using  _mm512_loadunpacklo_ps/_mm512_loadunpackhi_ps).

View solution in original post

0 Kudos
1 Reply
Kevin_D_Intel
Employee
986 Views

The AVX-512 instructions and this particular intrinsic are not currently available for Xeon Phi™. They will be available with Knight’s Landing. There is a nice discussion in James’ blog: http://software.intel.com/en-us/blogs/2013/avx-512-instructions.

I’m not sure whether this earlier discussion (here) about this intrinsic might aid in your case also (where development suggests a method for using  _mm512_loadunpacklo_ps/_mm512_loadunpackhi_ps).

0 Kudos
Reply