icc

Intel C++ Composer and CUDA

杀马特。学长 韩版系。学妹 提交于 2019-12-08 04:09:15
问题 I create a default CUDA project in VisualStudio2008. It works OK for the MS compiler. When I try the Intel C++ Composer, it fails as showed in the following: 1>------ Rebuild All started: Project: testCUDA, Configuration: Debug Win32 ------ 1>Deleting intermediate files and output files for project 'testCUDA', configuration 'Debug|Win32'. 1>Compiling with CUDA Build Rule... (Microsoft VC++ Environment) 1>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\\bin\nvcc.exe" -G -gencode=arch

Slower code with OpenMP how it can be parallelized?

老子叫甜甜 提交于 2019-12-08 02:46:13
问题 This code is slower with OpenMP. Without OpenMP I get about 10s. With OpenMP i get about 40s. What is happening? Thank you very much friends! for (i=2;i<(nnoib-2);++i){ #pragma omp parallel for for (j=2; j<(nnojb-2); ++j) { C[i][j]= absi[i]*absj[j]* (2.0f*B[i][j] + absi[i]*absj[j]* (VEL[i][j]*VEL[i][j]*fat* (16.0f*(B[i][j-1]+B[i][j+1]+B[i-1][j]+B[i+1][j]) -1.0f*(B[i][j-2]+B[i][j+2]+B[i-2][j]+B[i+2][j]) -60.0f*B[i][j] )-A[i][j])); c2 = (abs(C[i][j]) > Amax[i][j]); if (c2) { Amax[i][j] = abs(C

Why do I have to explicitly link to pthreads in my main.c compilation when my main.c does not use pthreads?

a 夏天 提交于 2019-12-08 01:29:58
问题 In Linux, I have a shared library I made that uses pthreads and a main.c that does not. libpthread.so shows up in an ldd of my shared library, which is correct. $ ldd libmapreduce.so.1.0 linux-gate.so.1 => (0x0067d000) libpthread.so.0 => /lib/libpthread.so.0 (0x0058c000) [...] But when I compile and link my main.c that does not use pthreads to my shared library that does, I see: $ icc -Wall -o main main.c -lmapreduce /opt/intel/Compiler/11.1/046/lib/ia32/libiomp5.so: undefined reference to

intel_sse2 problems when linking to gsl with icc

你离开我真会死。 提交于 2019-12-07 21:30:45
问题 My program links to both PETSc and gsl, and both libraries were compiled with icc. Here's the link command: /usr/local/mpich2/bin/mpicc -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -I/usr/local/gsl-icc-1.15/include/ -I/usr/local/gsl-icc-1.15/include/ -L/usr/local/gsl-icc-1.15/lib/ -lgsl -lgslcblas prog_name.o -L/usr/local/petsc-3.2-p6/lib -lpetsc -lX11 -lpthread -llapack -lblas -L/central/intel/Compiler-11.1.072/mkl/lib/em64t -L/central/intel/Compiler-11.1.072/lib

icpc C++11 with gcc stdlib

时光毁灭记忆、已成空白 提交于 2019-12-07 16:20:24
问题 I am using icpc (non optional) and I am compiling with -std=c++0x so I can use lambas. However when I do so it creates havok with gcc stdlib with features that one supports that the other doesn't. I have tried defining __GXX_EXPERIMENTAL_CXX0X__ but that didn't help. So ideally what I am asking for is the ability to use the c++0x language features with the C++03 stdlib. gcc 4.6 icc 12.1] EDIT example of error: /usr/include/c++/4.6.2/type_traits(74): error: identifier "constexpr" is undefined

How to override python's distutils gcc linker with icc?

爱⌒轻易说出口 提交于 2019-12-07 08:47:49
问题 I was able to successfully build cython on Ubuntu 14.04 from source as explained in this SE question/answer Compiling cython From source with icc and I downloaded the source code from here - Cython source code download. The command to compile cython is CC=icc LINKCC=icc python3.4 setup.py build I am enclosing the build log. It is STILL using gcc for linking. Here is a sample of build log. It appears CC=icc LINKCC=icc does NOT seem to change the linker to icc. It is still using x86_64-linux

Why do I have to explicitly link to pthreads in my main.c compilation when my main.c does not use pthreads?

女生的网名这么多〃 提交于 2019-12-06 07:22:33
In Linux, I have a shared library I made that uses pthreads and a main.c that does not. libpthread.so shows up in an ldd of my shared library, which is correct. $ ldd libmapreduce.so.1.0 linux-gate.so.1 => (0x0067d000) libpthread.so.0 => /lib/libpthread.so.0 (0x0058c000) [...] But when I compile and link my main.c that does not use pthreads to my shared library that does, I see: $ icc -Wall -o main main.c -lmapreduce /opt/intel/Compiler/11.1/046/lib/ia32/libiomp5.so: undefined reference to `pthread_atfork' Adding -lpthread to my compile command, i.e., $ icc -Wall -o main main.c -lmapreduce

Existence of “simd reduction(:)” In GCC and MSVC?

不想你离开。 提交于 2019-12-06 06:43:58
问题 simd pragma can be used with icc compiler to perform a reduction operator: #pragma simd #pragma simd reduction(+:acc) #pragma ivdep for(int i( 0 ); i < N; ++i ) { acc += x[i]; } Is there any equivalent solution in msvc or/and gcc? Ref(p28): http://d3f8ykwhia686p.cloudfront.net/1live/intel/CompilerAutovectorizationGuide.pdf 回答1: GCC definitely can vectorize. Suppose you have file reduc.c with contents: int foo(int *x, int N) { int acc, i; for( i = 0; i < N; ++i ) { acc += x[i]; } return acc; }

Diferences between pragmas simd and ivdep vector always?

末鹿安然 提交于 2019-12-06 06:08:31
问题 I am currently trying to vectorize a program and i have observed an odd behaviour Seems that a for loop is vectorized when using #pragma simd (262): (col. 3) remark: SIMD LOOP WAS VECTORIZED. but it doesn't when i use #pragma vector always #pragma ivdep (262): (col. 3) remark: loop was not vectorized: existence of vector dependence. I always thought that both sentences do the same vectorization 回答1: Pragma SIMD is a explicit vectorization tool given to the developer to enforce vectorization

Recommended ways to use CMake with icc via configuration options?

安稳与你 提交于 2019-12-06 05:52:44
问题 I would like to use the Intel compiler icc (or icpc) with a CMake-based project (on Linux for what it's worth). I can of course export the CXX variable when calling cmake, e.g. like CXX=icpc cmake ../ and this works fine. I would however like to make this choice available via a custom option. For this I parse custom option, e.g. cmake -DMY_COMPILER_OPTION=Intel .. as IF (MY_COMPILER_OPTION STREQUAL "Intel") MESSAGE(STATUS "** Compiling with Intel settings **") SET(CMAKE_CXX_COMPILER "icpc")