Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Hiroyuki_Yata
Beginner
193 Views

"typedef double v4df __attribute__((vector_size(32)));" with OpenMP makes strange output.

Hello,

"typedef double v4df __attribute__((vector_size(32)));" with OpenMP makes strange output.

Please decompress the attached file and do "make, make test", then you will find the following.

"icpc & -DV4DF=auto",  "g++ & -DV4DF=auto", "g++ & -DV4DF=v4df" make right output.

On the other hand, "icpc & -DV4DF=v4df" make wrong output.

Thank you

0 Kudos
1 Reply
Judith_W_Intel
Employee
193 Views

 

First, what version of the Intel compiler and what version of GNU are you using? What operating system and architecture?

I see the same result with both icpc_vfdf.out and icpc_auto.out, i.e.:

sptel15-208> icpc_v4df.out
A pair-file is found. I use it.
Number of pairs: 15679772
Illegal instruction (core dumped)
sptel15-209> icpc_auto.out
A pair-file is found. I use it.
Number of pairs: 15679772
Illegal instruction (core dumped)
sptel15-210>

I also can't get gcc 5.4.0 to compile the test case:

g++ -O3 -march=native -std=c++11 -fopenmp -DV4DF=v4df test.cpp -o gcc_v4df.out
In file included from /site/spt/rdrive/ref/gcc/5.4.0/rhel60/efi2/lib/gcc/x86_64-linux-gnu/5.4.0/include/immintrin.h:43:0,
                 from test.cpp:2:
/site/spt/rdrive/ref/gcc/5.4.0/rhel60/efi2/lib/gcc/x86_64-linux-gnu/5.4.0/include/avx2intrin.h: In function ‘<built-in>’:
/site/spt/rdrive/ref/gcc/5.4.0/rhel60/efi2/lib/gcc/x86_64-linux-gnu/5.4.0/include/avx2intrin.h:1049:1: error: inlining failed in call to always_inline ‘__m          256d _mm256_permute4x64_pd(__m256d, int)’: target specific option mismatch
 _mm256_permute4x64_pd (__m256d __X, const int __M)
 ^
test.cpp:187:52: error: called from here
         V4DF vdf_d = _mm256_permute4x64_pd(vdf, 255);
                                                    ^
In file included from /site/spt/rdrive/ref/gcc/5.4.0/rhel60/efi2/lib/gcc/x86_64-linux-gnu/5.4.0/include/immintrin.h:43:0,
                 from test.cpp:2:
/site/spt/rdrive/ref/gcc/5.4.0/rhel60/efi2/lib/gcc/x86_64-linux-gnu/5.4.0/include/avx2intrin.h:1049:1: error: inlining failed in call to always_inline ‘__m          256d _mm256_permute4x64_pd(__m256d, int)’: target specific option mismatch
 _mm256_permute4x64_pd (__m256d __X, const int __M)
 ^
test.cpp:186:52: error: called from here
         V4DF vdf_c = _mm256_permute4x64_pd(vdf, 170);

thanks

Judy
 

Reply