- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, something seems not right with the functioning of in intel's valarray implementation. I tried using both the previous compilers as well as the most recent 2017 version of icpc. For instance, when we compile with icpc, we find that 0.1 - 0.05 = -0.05, instead of 0.1-0.05 = 0.05. g++ works fine though. Please find attached an example C++ file, and the makefile. Note that the makefile has a .txt extension that needs to be removed, or copy paste its contents in the terminal.
- 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
Is it only a problem when you use the -use-intel-optimized-headers switch?
I had to remove the switch because it wouldn't compile for me and I don't see the problem without it.
ptel42-80> make -f makefile.save
icpc -use-intel-optimized-headers simple.cpp -I/opt/intel/mkl/include -L/opt/intel/mkl/lib -Wl,-rpath,/opt/intel/mkl/lib -lmkl_rt -lm
In file included from /rdrive/crunlib/mainline_20170707/efi2/linux_test/include/perf_headers/c++/valarray(47),
from simple.cpp(5):
/rdrive/crunlib/mainline_20170707/efi2/linux_test/include/perf_headers/c++/ippvalarray(37): catastrophic error: cannot open source file "ipp.h"
#include <ipp.h>
^
compilation aborted for simple.cpp (code 4)
Normally we would just the valarray from GNU but it looks like with that switch we have our own version of valarray.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I created a bug report (cmplrs-44937) to track this issue. Thanks for reporting it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry about the slightly wrong report, I thought I was using the 2017 version of Intel compiler, while I was using the 2015 version. Everything seems to work fine with the 2017 version. I think this must have already been addressed.
Without the flags -use-intel-optimized-headers I believe we use only GNU's version of valarray (according to Intel's documentation), and GNU's version seems okay for this case, as compiling with g++/gcc produces right results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok thanks for the additional info. I will close the report.
Judy
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page