How to translate or expand openmp code into C pseudo code?
How to translate or expand openmp code into C pseudo code?
Why are the two run's qopt-report the same but the two run's performance are very different?
I had compiled the same program using the two different parameters to compile.
1. icc -qopt-report -g -O2 MD.c util.c control.c coord.h -c -lm
2. icc -qopt-report -g -O2 -ipo MD.c util.c control.c coord.h -c -lm //add "-ipc"
Then I compared every corresponding .optrpt file from the two. The result is that all the contents are the same except the second's content is
-inline-max-per-routine: disabled
-inline-max-per-compile: disabled
while the first's content is
-inline-max-per-routine: 10000
-inline-max-per-compile: 500000
It seems that the two's performances will also be the same. But the amazing result is that the second is three times speed up than the first!
So what is the reason? Who can help me explain it?
GNU inline assembly: ICC memory input interpretation differs from GCC/Clang
Dear developers,
Please consider the following code snippet.
Compiled with GCC or Clang, it prints "abcdefghijklmno" but with ICC, it prints junk bytes.
The problem here is that when an entry allows only memory constraint, both GCC and Clang interpret the following expression as an lvalue, whereas ICC interpret it as an expression either way.
Thus, here, the token %1 is "expected" to be substituted by the address of the memory block pointed by s but is substituted by an address that point to the value of s here.
This behavior is not really documented, but still, casting a pointer to an array type is suggested in the examples given by GCC here.
So, I am wondering if this difference is made on purpose by ICC or if it could be considered as a bug.
Best regards,
Frédéric Recoules
#include <stdio.h> static inline void copy128(void *d, const void *s) { __asm__("movaps %1, %%xmm0 \n\t""movaps %%xmm0, %0 \n\t" : "=m"(*(char (*)[16])d) : "m" (*(const char (*)[16])s) : "xmm0"); } int main (int argc, char *argv[]) { const char t[16] = "abcdefghijklmno"; char u[16]; copy128(u, t); printf("%s\n", u); return 0; }
ABI compatibility between 19.0 (2019) and 19.1 (2020)
hello,
disclaimer: I am working on Intel C++ Compiler support for Conan package manager. for us and our users, it's important to know when packages are fully ABI compatible, and when is it safe to mix objects/libraries produced by different versions of the compiler, in order to avoid run-time and compile-time compatibility issues.
the first question: did Intel C++ Compiler just change the versioning scheme? it seems like the new "major" release 2020 has version number 19.1, but not 20.0, which might be a bit confusing, as before we had major version number bump for each year (e.g. 2018 - 18.0, 2019 - 19.0, etc).
the second question: can we assume ABI compatibility between 19.0 (2019) and 19.1 (2020)? in other words, if we compile some C++ library by 19.1, can we safely link this library into application compiled by 19.0? (assuming the library may use C++ interfaces and C++ API, e.g. pass vectors, strings, etc. on library boundaries. also assuming compiler flags are the same - C++ standard, etc).
so far, I have found few things in the official release notes:
Features/APi changes
More algorithms support parallel and vector execution policies: find_first_of, is_heap, is_heap_until, replace, replace_if.
More algorithms support vector execution policies: remove, remove_if.
More algorithms support parallel execution policies: partial_sort.
and:
The Intel® C++ Compiler 19.1 supports the following features under the /Qstd=c++20 (Windows*) or -std=c++20 (Linux*/OS X*) options:
std::is_constant_evaluated and __builtin_is_constant_evaluated
thus, I'd assume if library is using Parallel STL it might be unsafe to mix 19.0 and 19.1.
I've also have compared some Intel compiler libraries and found several differences in public symbols provided:
110a111
> __intel_avx_memmove
129a131
> __intel_new_feature_proc_init_n
296a299
> _intel_fast_memmove.V
358d360
< get_feature_name
361d362
< isa_init_once
110a111,113
> _ZN3tbb8internal13numa_topology11nodes_countEv
> _ZN3tbb8internal13numa_topology19default_concurrencyEi
> _ZN3tbb8internal13numa_topology4fillEPi
164a168
> _ZN3tbb8internal24itt_metadata_ptr_add_v11ENS0_15itt_domain_enumEPvyNS0_12string_indexES2_
which also might cause some incompatibilities if the library is using such symbols.
Intel compiler c++ to build tensorflow from source in Windows
Hi,
I would like to know if there is any documentation or process related to use of Intel compiler c++ to build tensorflow from source in windows using bazel.
Thanks,
Aditya
catastrophic error: cannot open source file "stdio.h"
I am trying to compile some C code using the Intel compiler. This is standard C code that has been compiled by other C compilers. I am on Windows 10. I just downloaded and installed the 2020 version of Parallel_Studio XE (Update 1). I have two versions of Microsoft Visual Studio installed they are: Visual Studio Professional 2019 and Visual Studio Professional 2017. Both versions of Visual Studio have the desktop C++ module installed. They also have the Windows C++ SDK installed.
When I try to compile the code I get errors that say catastrophic error: cannot open source file "stdio.h" and catastrophic error: cannot open source file "stdlib.h".
I am compiling using the command line from a .bat file.
I have seen many people asking about these errors on the forums and the answer is always "Intel requires Microsoft Visual Studio for these files. Make sure that the C++ module is installed in Visual Studio". I have done all of the suggested fixes but nothing works. I have uninstalled and reinstalled the C++ modules in both versions of Visual Studio and I then uninstalled and reinstalled Intel Parallel Studio.
Does anybody have any other suggestions?
Thanks,
Ed
Unable to install any version of Parallel Studio
I am trying to install Parallel Studio XE Cluster Edition in my workstation laptop. However, I am unable to do it because a "Package checksum verification failed" error always pops up irrespective of the version or the mode (online or offline) of installation. I am not sure what to do; I have tried it more than 10 times.
I was just using it two days back but had to uninstall it due to some problems in Visual Studio. Now I am unable to reinstall it.
Even during un-installation, I could not do it from the control panel for the same reason ("Package checksum verificaion failed"). The uninstallation just would not proceed. At the end, I had to simply delete the entire installation folder and remove all the registry entries. I removed all other temporary files and leftovers etc..
Now the same problem is happening while reinstallation.
Is there anything that I can do?
__declspec(noinline) virtual void inlined
Why?
I am compile this project https://github.com/lurumdare/stack_protection
With MSVC works good.
Thanks.
Unable to install Parallel Studio XE 2020 Update 1 for Windows
Every time I try to install Parallel Studio XE 2020 Professional Edition Update 1 for Windows it stops when trying to download files to install with:
"Download failed
Failed to download installation files, possibly due to a network connection problem. Retry or cancel installation"
The network connection has no problems.This update either needs to be fixed so that it works. It clearly is not working now despite the network and Internet connection working perfectly.
Buggy behavior in constexpr memeber variable
Hi,
I found that intel c++ compiler behaves suspiciously for constexpr member variable of a template class. With
$ icpc -v icpc version 19.0.5.281 (gcc version 8.3.0 compatibility)
The following code print nothing.
#include <iostream> template<typename T> struct Derived { constexpr static char test_[] = "test"; }; /* These lines are useless in C++17 template<typename T> constexpr char Derived<T>::test_[]; */ int main() { std::cout << Derived<double>::test_ << std::endl; //print nothing return 0; }
I just used '-std=c++17' option. GCC version 8 compiles the code and print "test" as expected. I strongly suspect that GCC's behavior is the standard and ICC is buggy.
In addition, ICC version 2019.3.199 does not compile the code and print error "incomplete type is not allowed".
Best,
Compiler 17.0 Update 4 for Intel 64 Visual Studio 2012 environment
Hi guys,
I have a code written in Visual Studio 2012 and I need to compile it with Intel Parallel Studio XE 2017. Does "Intel Parallel Studio XE 2017" support Visual studio 2012?
Or any other version can support my visual studio 2012 program?
Regards
Visual studio 2012 required
I am now trying to link ABAQUS and visual studio 2012 and Intel Parallel studio XE 2013. However I cannot find a visual studio 2012 that updates properly.
I tried VS2010 as well, but I need a vcvarsall.bat in the VC fold, but I cannot find one.
So far, I either need to have a nice VS2012, or a vcvarsall.bat for my VS2010.
Thank you!
How are array allocation size computed when overloading new [] operator ?
Hello All,
We upgraded from Intel compiler XE 2011 to the most recent version, 2020, and noticed an change that is blocking the upgrade.
We've developed our own specific memory allocator, and therefore we overload the new and delete operator in our classes. My question is about the way the size of the allocation, passed to the new[] () operator, is computed when allocating an array of objects whose class have a destructor. For example:
class Foo {
private:
int a_ = { 0 };
public:
Foo(int a = 0) a_(a) { ; }
~Foo() {
// ... do something
}
void* operator new[](std::size_t count) {
void* ptr = nullptr;
// Allocate memory for the array
return ptr;
}
};
int main() {
Foo* pFoo = new Foo[1];
}
If the class does not have destructor, the allocation size passed onto the new[] operator, count, is straightforward: it's the number of allocated objects multiplied by the size of the class: N x sizeof(Foo)
If the Foo class defines a destructor, then the allocation is N x sizeof(Foo) + offset. I believe the offset is to store a pointer to the destructor. With Intel 2011, when compiling on Windows 64bits, this offset was always 8 bytes. But with Intel compiler 2020, it varies. If the size of the class is smaller than 8 bytes, then the offset is 4 bytes. Otherwise it's 8 bytes as before.
Is there an explanation for that offset ? And can it be changed so that the offset is constant as before ?
I tried with Visual Studio 2019, and the offset is always 8 bytes.
I include a small testcase that shows the behavior.
Thanks for any info on that subject,
Brendan
Problem on invoking icl in Windows 10
Hi,
My computer os is windows 10, and I have installed the Visual Studio 2019 community and Intel parallel studio XE 2020, also the CUDA toolkit 10.2.
I want to use the OpenMp and Cuda to accellerate my program, and the version of OpenMp should be at least 3.1, so Intel C++ compiler is set as the host compiler. There are several sources files in my program, only one includes the OpenMp primitives.
When I run the code with Intel compiler, the error message reports that " invalid preprocessor command ' include_next'", this 'include_next' located in the 'math.h' in intel include directory. I also find some other cuda codes, which can be run well with vs compiler, cannot work with Intel compiler and the same error reported.
Someone tell me I need to perform isolation compilation with the code. So I need to use command lines to compiler each souce file seperately. However I find I cannot use the command icl in intel command window. When I open the intel command window, the error massege emerged:
//////////
Copyright (C) 2009-2020 Intel Corporation. All rights reserved.
Intel(R) Inspector 2020 (build 604266)
Copyright (C) 2009-2020 Intel Corporation. All rights reserved.
Intel(R) Advisor 2020 (build 605410)
Intel(R) Trace Analyzer and Collector 2020 Update 1 for Windows* OS for Intel(R) 64 applications
Copyright (C) 1996-2020 Intel Corporation. All rights reserved.
'where' is not recognized as an internal or external command,
operable program or batch file.
'where' is not recognized as an internal or external command,
operable program or batch file.
'findstr' is not recognized as an internal or external command,
operable program or batch file.
///////////
Also the icl command cannot be recognized. Then I run the compilervars.bat with clause intel64 and vs2019, the same error message reported:
///////////
'where' is not recognized as an internal or external command,
operable program or batch file.
'where' is not recognized as an internal or external command,
operable program or batch file.
'findstr' is not recognized as an internal or external command,
operable program or batch file.
//////////
I don't know the reason and I cannot find some relative information about this error online. Could someone give me some advise, I really appreciate any comment you posted. Thank you.
in the compiler options is broken
VS2019.
In "options->intel compilers and libraries->C++ ->compilers", if I set the selected compiler to <Latest> (which is the default), I will receive a `MSB600: Failed to locate: "icl.exe"`. If I choose a specific version in the "selected compiler" list, the error will no longer exist. So, I guess that <Latest> doesn't point to any version and is a broken option.
List predefined macros
In the Intel C++ Windows compiler is there a compiler command that will output the list of predefined macros to the console window ?
ICC for Linux cost
Hi,
How much ICC for Linux cost per year/ per life???
ICC failed some tests from Monocypher crypto library
hi all,
https://monocypher.org/
https://github.com/LoupVaillant/Monocypher
Monocypher is unique one file crypto library.
It already compiles and passed tests on different compilers and platforms: gcc, clang, tcc, "Oracle Developer studio", "IBM XL C".
Also it passing TIS and CompCert (both interpreter mode) and runtime SANs from gcc-clang family.
ICC failed on *some* tests from library test suite.
My Ubuntu 18.04.4 LTS, x64 environment:
$ uname -a
Linux ubuntu 5.3.0-46-generic #38~18.04.1-Ubuntu SMP Tue Mar 31 04:17:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ icc -v
icc version 19.1.1.219 (gcc version 7.5.0 compatibility)
How to repeat:
$ wget https://monocypher.org/download/monocypher-3.1.0.tar.gz
$ tar zxvf monocypher-3.1.0.tar.gz
$ cd monocypher-3.1.0/
$ make test
// all lines starting with "OK"
// "All tests OK!" as last line of output
$ make clean
$ make test CC=icc
// three FAILED tests:
// FAILED 48 tests: poly1305
// FAILED 320 tests: aead_ietf
// FAILED: Poly1305 (incremental)
List of optimization flags
Hi,
Is it possible to invoke individual optimizations separately with ICC? For eg: Can dead code elimination pass be invoked on source code? If possible, is there a document that lists the supported optimization flags?
Thanks,
Venkat
VS 2019 Debugger + ICC 2020 : "step over" works like "step into"
Hello,
i use VS 2019 with Intel c++ 2020.
If i compile a program with VC only the debugger works like expected. I can go through the code line by line using "step over".
If I compile the same code with intel c++ "step over" works like "step into".
How do I get the normal behavior of "step over"?