- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm not sure why, but when I use Intels Optimized Headers(specifically valarray) the compiler will point out about 66 or so syntax errors. I'm unsure why this is happening.
I'm on Visual Studio 2019.4.1(enterprise) and Intel C++ Compiler version 19.1
Thanks
- 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
Can you provide us a test case to reproduce the error along with your command line options?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure, my code is a bit complicated so I've written a small example and this one also fails:
#include <valarray> #include <cstdlib> #include <iostream> int main() { int size = 20; std::valarray<double> num1(size), num2(size), result(size); for (int i = 0; i < size; ++i) { num1 = std::rand(); num2 = std::rand(); } for (int i = 0; i < size; ++i) { result = num1 + num2; } for (int i = 0; i < size; ++i) { std::cout << "Value at position " << i << ": " << result << std::endl; } }
And here is what I see on the command line from the output of the build log. (I'm seting the option from the properties window, I'm not using the command line):
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020\windows\bin\intel64\icl.exe /c /Qm32 /ZI /nologo /W3 /Od /Quse-intel-optimized-headers /D __INTEL_COMPILER=1910 /D WIN32 /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /EHsc /RTC1 /MDd /GS /permissive- /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc142.pdb" /Gd /TP /FC l11.cpp
Thanks,
Dominique
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With /Quse-intel-optimized-headers flag, I am seeing the below error. Did you see the same?
C:\Temp>icl /c /Qm32 /ZI /nologo /W3 /Od /Quse-intel-optimized-headers /D WIN32 /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /EHsc /RTC1 /MDd /GS /permissive- /Zc:wchar_t /Zc:forScope /Gd /TP /FC test2.cpp
test2.cpp
C:\PROGRA~2\INTELS~1\COMPIL~1.166\windows\compiler\perf_headers/c++/ippvalarray(37): catastrophic error: cannot open source file "ipp.h"
#include <ipp.h>
^
compilation aborted for test2.cpp (code 4)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No I'm not seeing that error. I only see the syntax errors I mentioned. Here is a photo. I've not changed any setting other than using Intel's compiler and "Use Intel optimized headers" in the options window.
When I press on one of the errors to the where its pointing to I see the following:
If /Quse-intel-optimized-headers is broken even on your end, what is the correct way to make use of Intels optimized headers?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just tested the same code with the same version of Intel's compiler(its the only one I have access to, 19.1) but with the latest version of Visual Studio 2017(15.9.19) and I get the same exact result. 66 syntax errors in ippvalarray and no syntax highlighting for the file.
Both these tests were conducted on Windows 10 Enterprise LTSC 1809
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Seem to me that you don't have IPP install or somehow didn't have it linked in correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler and all accompanying tools(vTune, Inspector, etc) all work fine. It can also find the files, it just seems to have a problem interpreting them. I tried on another machine with the default installation of Visual Studio 2017 and the compiler and I get identical results. Have you been able to run the code I posted above? Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it compiled after I installed IPP

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