Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7700 Discussions

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

Marco
Beginner
897 Views

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
3 Replies
Viet_H_Intel
Moderator
897 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?

JR
Novice
339 Views

I am facing the same problem with Intel Parallel Studio XE 2022 Update 1 Cluster Edition (oneAPI) on Red Hat Enterprise Linux release 8.5 (Ootpa). Nothing changes even if I explicitly include the intel files.

Please help!

Viet_H_Intel
Moderator
328 Views

Can you provide us a test case and your actual error?

Thanks,

Reply