Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Marco
Beginner
423 Views

Intel compiler uses gcc immintrin.h header instead of its own one

I'm using the intel compiler 19.0.3.199 on ubuntu 18.04 and I have a problem when I include the file immintrin.h.

The error is:

In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h(41),
                 from ../lib/io/exchange_format.c(38):
/usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h(615): error: identifier "____m128d" is undefined
    return (__m128d) __builtin_ia32_vpermilvarpd ((__v2df)__A,
                     ^

In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h(41),
                 from ../lib/io/exchange_format.c(38):
/usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h(615): error: expected a ")"
    return (__m128d) __builtin_ia32_vpermilvarpd ((__v2df)__A,
                     ^

In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h(41),
                 from ../lib/io/exchange_format.c(38):
/usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h(615): internal error: assertion failed at: "shared/cfe/edgcpfe/sys_predef.c", line 485

    return (__m128d) __builtin_ia32_vpermilvarpd ((__v2df)__A,
                     ^

compilation aborted for ../lib/io/exchange_format.c (code 4)
Makefile:1178: recipe for target '../obj/exchange_format.o' failed

The compiler seems to use the header file of gcc instead of the one in the directory /opt/intel/compilers_and_libraries_2019/linux/include/icc.

If I add the option -I/opt/intel/compilers_and_libraries_2019/linux/include/icc to the makefile rule I can compile this object.

I'd like to understand why icc doesn't look into its own include directories but it looks into the gcc ones.

P.S. I launched the script compilervars.sh before compiling.

 

0 Kudos
1 Reply
Viet_H_Intel
Moderator
423 Views

Not so sure what happened at your end, but it should have used the headers from icc.

Will you be able to give us a test case?

Reply