I recently updated Intel compiler to version 184.108.40.206 [IA-32] on Windows. One of the projects started to generate runtime errors. After debugging, I isolated the problem to a memcpy "call". The relevant part of the code is:
float mataux ;
That routine have not changed for years. If I compile with the previous version of the compiler, or if compile for debug, or if I change to memmove() or if I copy the matrix elements with a loop, the problem vanished. Also, if other compiler is used, the problem vanished too.
In fact, the compiler is not calling the __intel_fast_memcpy , it is generating an inlined version of memcpy(). See the ASM listing of the generated code :
;;; memcpy(mataux, mat,sizeof(mataux));
movaps xmm1, XMMWORD PTR [100+esp] ;1460.3
movaps XMMWORD PTR [148+esp], xmm1 ;1460.3
movaps xmm5, XMMWORD PTR [116+esp] ;1460.3
movaps XMMWORD PTR [164+esp], xmm5 ;1460.3
mov edi, DWORD PTR [132+esp] ;1460.3
mov DWORD PTR [180+esp], edi ;1460.3
In other parts of the code where memcpy is generating the call to __intel_fast_memcpy, there is no problem.
Compiler switches :
/c /O3 /Ob2 /Oi /Ot /Oy /Qip /GA /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "MYSDL_MEVIS" /D "___MNPS_PROJECT___" /D "_MBCS" /MT /Zp1 /GS- /fp:fast /J /GR- /Fo"Release/" /Fd"Release/vc90.pdb" /W3 /nologo /Zi /TC /Qopenmp /QxSSE3 /Qopt-matmul- /Quse-intel-optimized-headers /fp:double /Qstd=c99 /Qrestrict /Qdiag-disable:1786,2557
Running on Windows 7 or 8 or Vista. All processors are Intel I7 of several generations.