Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

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

Marco
Beginner
2,176 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
2,176 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?

0 Kudos
JR
New Contributor I
1,618 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!

0 Kudos
Viet_H_Intel
Moderator
1,607 Views

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

Thanks,

0 Kudos
Reply