makefile changing -> ICPC, TBB and openMP

makefile changing -> ICPC, TBB and openMP

I know that there are information on this forum about changing makefile if you want to use TBB, ICPC or openMP, but i think that all these information should be on the one place.I will start and tell what i know:- If you want to use TBB , this is important line: LDLIBS = -ltbb -ltbbmalloc- How to use openMP ? LDLIBS = -fopenmp ? I have tried to compile my code in which i added #pragma omp parallel for and it worked very well without upper line. No errors, warning or something like that.- ..and ICPC (intel compiler) ? I have installed PS XE 2011, but terminal tells me that icpc command is unrecognized. Should i add path to the makefile? Something like opt/intel/bin ?Thanks for help :)

10 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

To use the intel compiler you need to run the script first. Run this in your terminal before compiling:
source /opt/intel/bin/ ia32
Switch ia32 with intel 64 if you're on a 64 bit linux.
That should do it. I got another problem after that, the compiler can't find the errno.h and I'm still unable to resolve this and use the intel compiler. Still working on it.

Best regards,

catastrophic error: cannot open source file "bits/predefs.h" #include Hm...

Hi,Here's the thread speaking about that problem: it helps!

I have tried all of that and nothing. I ve installed libc6-dev using Synaptics package manager and erorr are still there. The worst thing is that that my code works much better on icpc (i have tested it on VS 2008 ).

for Openmp work correctly:

# using gcc :
# using gcc :
FLAGS ?= -std=c++0x -O3 -fopenmp -Wall $(GCC_SUPPFLAGS)
LDLIBS = -fopenmp

if you don't use the fopenmp in both ldlibs and flags the #pragmas will be ignored by the compiler and it will not show errors but will not use any openmp.

look if you have those libs: ia32-libs, lib32gcc1, lib32stdc++6, libc6-dev-i386, gcc-multilib, in the System Requirements topic from the Intel C++ Composer XE 2011 for Linux* Installation Guide and Release Notes they say you might need them.

Obs.: install them by synaptics because they might need some other libs, and synaptics will do the job automatically

then redo the step pointed by neshon

I have a strange problem. When i use gcc compiler my code runs normaly on intel machine, but when i change it to icpc, and only that (comment two lines for gcc and uncomment two lines for icpc) i get message that my program could not compile... I'm also using intel tbb for parallelization. Do i need to add something to Makefile? Have anyone encountered this problem before? Thanks

same problem. using intel compiler, i get errors. it seems to try to include gcc headers and fails in it. what should i do ?


I made it a few days ago on the Intel's machine, and i didnt change anything inside a makefile. Only uncommented ICC and //GCC :)When i uploaded my code, benchmark result was terrible. It told me that none of my loops was vectorized and real time was about 10. they expect from us to parallelize every loop with ICC if we want to use it. Otherwise, we should use GCC. That my opinion, ofcourse. I use TBB and openMp , and because of that, i made that conclusion.
But i cannot make it works on my machine, and i ve really tried a lot of things. I ve installed PS XE 2011 ofc, and main problem is with some headers and libraries which is not in the expected folder.

Leave a Comment

Please sign in to add a comment. Not a member? Join today