Software Archive
Read-only legacy content
17061 Discussions

Illegal instruction using _mm512

George
Beginner
1,354 Views

Hello ,

I am using in my code intrinsics.

If I compile like:

icc -std=c99 -g -openmp -qopt-report=2 -o mycode mycode.c

I am receiving : Illegal instruction in line:

__m512 D = _mm512_set1_ps( FLT_MAX );

 

If I compile :

icc -std=c99 -g -mavx -openmp -qopt-report=2 -o mycode mycode.c

I am receiving: Illegal instruction in line:

__m512i tempy = _mm512_set1_epi32( y );

which is after "D" and after 'tempx , xIdx" . ( x and y are integers )

__m512i tempx = _mm512_set1_epi32( x );
__m512	xIdx  = _mm512_castsi512_ps( tempx );
					
__m512i tempy = _mm512_set1_epi32( y );
__m512	yIdx  = _mm512_castsi512_ps( tempy );

 

Any ideas?

Thanks!

 

0 Kudos
2 Replies
James_C_Intel2
Employee
1,354 Views

Since this is the MIC forum, I assume you are trying to target a MIC processor, not AVX512, but whichever of those it is, you need to tell the compiler that that is what you are trying to do, since 512 bit operations are not valid on most machines.

So, add "-mmic" to your compiler flags to target the MIC, or consult the compiler manual to find the right flags for AVX512.

0 Kudos
George
Beginner
1,354 Views

Ok, thanks , I misunderstood.

0 Kudos
Reply