- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
if i compile programs using ICC compiler with -xCORE-AVX2 and my cpu doesn't support AVX/AVX2, can it compile successfully?
if it compiles ok, can it run successfully?
The man of ICC CORE-AVX2 is "CORE-AVX2 May generate Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2), Intel(R) AVX, SSE4.2, SSE4.1, SSE3, SSE2, SSE, and SSSE3 instructions for Intel(R) processors.". I am not sure whether it compiles with AVX2 instructions.
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If your code contains no statements that would use AVX/AVX2 then it should run.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It should compile successfully; however, compiler may generate AVX2 instructions and you will run into issue if you execute on the processors that aren't supported AVX2.
You should use -axCORE-AVX2 instead of -xCORE-AVX2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Pay attention that in my experience using -ax on the latest version (19.3) yields code that requires the added instructions and not only additional dispatched path.
For instance /arch:SSE3 /Qax:AVX yielded a code which doesn't work on Westmere / Nehalem while both support SSE4.2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By default, the Intel compiler generates a set of run-time checks for all of the instruction sets that the compile line allows to be used in the executable. These checks are run as soon as the program is launched (i.e., before "main()"), and will cause the program to abort if the platform does not support all of the instruction sets that might be in the executable. For example, attempting to run a code compiled for "CORE-AVX512" on a Broadwell system gives the message:
Please verify that both the operating system and the processor support Intel(R) AVX512DQ, AVX512F, AVX512CD, AVX512BW and AVX512VL instructions.
If I recall correctly, the "-ffreestanding" compiler option removes these run-time checks, so that the executable will run until it hits an illegal instruction. If the execution does not run into any unsupported instructions, then it will execute normally. Note that the executable might still have illegal instructions, but if they are not on the path executed by a particular run, then they won't be seen.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page