Questions tagged [icc]

ICC is Intel's C++ compiler, actually a group of C/C++ compilers that are available for Windows, Linux, and MacOS. This tag should be for questions about using ICC, and you should consider including the [C++] and possibly an Operating System specific tag as well.

The Intel C++ Compiler (ICC) compiles code for 64-bit applications for Windows, Linux, and MacOS. 32-bit applications are only supported on MacOS prior to compiler version 19.0. It can be used with Microsoft Visual Studio (on Windows), Eclipse/CDE (on Linux), or XCode (on MacOS).

The generated code is optimized to run specifically on Intel CPUs. This can sometimes be non-optimal on CPUs from other companies.

Intel's ICC documentation.

743 questions
12
votes
1 answer

Can't force inlining C++ function using Intel compiler

I have a function defined as inline void vec_add(__m512d &v3, const __m512d &v1, const __m512d &v2) { v3 = _mm512_add_pd(v1, v2); } (the __m512d is a native data type mapping to SIMD registers on Intel MIC architecture) As this function is…
lei_z
  • 1,049
  • 2
  • 13
  • 27
12
votes
3 answers

How to install a simple Intel C/C++ compiler on a 64-bit Ubuntu system?

I need to compile c/c++ code, by running a build.sh file. The instruction on the program (that i want to run) says it needs to be compiled by a Intel's compiler1. After searching on the net I came across information on what to do. Some people said…
xeex
  • 189
  • 1
  • 4
  • 14
12
votes
2 answers

Cannot open source file "bits/c++config.h" error with icpc

I am trying to compile a program on a 64-bit machine with icpc. Unfortunately, I get an error message of catastrophic error: cannot open source file "bits/c++config.h". I have adopded some advice from here but with no success. Also, I do not forget…
Eugene B
  • 995
  • 2
  • 12
  • 27
12
votes
3 answers

ld: library not found for -lcrt1.10.6.o after running Intel icc compiler on OS Mavericks

I just upgraded from OS Mountain Lion to Mavericks, ran intel icc compiler, icc test.c, it said #include is not found. So I checked the \usr folder, found \usr\include is missing and copyed include from my back to this folder, upgraded…
Kevin Powell
  • 591
  • 1
  • 5
  • 20
12
votes
5 answers

Combining large C and C++ programs

I have read about several methods to combine C and C++ codes, however, I'm still confused on how to proceed in my case. Here is my problem: I have a relatively large amount of C code (consisting of various .c and .h files) which is used to model…
Leonardo Trivino
  • 295
  • 1
  • 4
  • 11
12
votes
6 answers

How to allocate 16byte memory aligned data

I am trying to implement SSE vectorization on a piece of code for which I need my 1D array to be 16 byte memory aligned. However, I have tried several ways to allocate 16byte memory aligned data but it ends up being 4byte memory aligned. I have to…
PGOnTheGo
  • 805
  • 1
  • 11
  • 25
11
votes
3 answers

Can not find the icc compiler after having installed Intel oneAPI, invoking from bash on Ubuntu 20

my problem is that I want to invoke the icc compiler from the commandline, but my pc can't find it. I have install the latest oneAPI and sourced setvars.sh. Even I search 'icc' file under the installation routine I can't find the icc compiler…
Kuriyama_Shien
  • 123
  • 1
  • 6
11
votes
2 answers

weak_ptr reset affects shared_ptr?

I'm not very used to using weak_ptr and I'm facing a quite confusing situation. I'm using Intel XE 2019 Composer update 5 (package 2019.5.281) in combinaison with Visual Studio 2019 ver. 16.2.5. I compile in 64-bit. I use the standard C++ 17. Here…
dom_beau
  • 2,437
  • 3
  • 30
  • 59
11
votes
1 answer

There's nothing wrong with new[] an array of byte-objects containing constructors, right?

In my physically based renderer, I'm getting a memory corruption bug (the program crashes, and the debugger gives a bogus stack trace that's worthless). I traced it down to this SSCCE. The line with the constructor seems to be what triggers the…
geometrian
  • 14,775
  • 10
  • 56
  • 132
11
votes
7 answers

Are compilers allowed to remove infinite loops like Intel C++ Compiler with -O2 does?

The following testing code does correctly in VS either with debug or release, and also in GCC. It also does correctly for ICC with debug, but not when optimization enabled (-O2). #include class tClassA{ public: int m_first, m_last; …
Samuel
  • 111
  • 3
11
votes
3 answers

how to turn on icc/icpc warnings?

I installed Intel Compiler composer_xe_2013_sp1.3.174 on Linux. I am confused about the icc warnings. Feed icc with a simple program main.c as below: int main(int argc, char **argv) { int a = 1; unsigned int b = -22; if (b = a) { } } I…
Conghui He
  • 299
  • 4
  • 9
11
votes
3 answers

Does gcc, icc, or Microsoft's C/C++ compiler support or know anything about NUMA?

If I have a multi-processor board that has cache-coherent non-uniform memory access ( NUMA ), i.e. separate "northbridges" with separate RAM for each processor, does any compiler know how to automatically spread the data across the different memory…
Ross Rogers
  • 23,523
  • 27
  • 108
  • 164
11
votes
3 answers

configure: error: C preprocessor fails sanity check

I am compiling several libraries on Ubuntu 12.04 x86_64. First I compiled the libraries with GCC 4.7.2 and it went all well. Then I tryed to recompile them with Inte Composer 2013 u2. Fot that purpose i did: export…
RegedUser00x
  • 2,313
  • 5
  • 27
  • 34
11
votes
1 answer

Unable to detect why the following piece of code was not vectorized

I have been struggling with vectorizing a particular application for sometime now and I have tried everything. From autovectorization, to handcoded SSE intrinsics. But somehow I am unable to obtain speedup on my stencil based application. Following…
PGOnTheGo
  • 805
  • 1
  • 11
  • 25
10
votes
3 answers

Generate list of preprocessor macros defined by the compiler

With gcc and gfortran I can generate a list of preprossesor macros defined by the compiler using (edited to reflect ouah's answer) gcc -E -dM - < /dev/null and gfortran -cpp -E -dM /dev/null respectively (on Linux at least). How can I do the same…
Chris
  • 44,602
  • 16
  • 137
  • 156
1 2
3
49 50