On 03/20/12 01:17, Nikos Chantziaras wrote: > On 19/03/12 16:11, Andrew Lowe wrote: >> On 03/19/12 17:39, Nikos Chantziaras wrote: >>> On 19/03/12 07:26, Andrew Lowe wrote: >>>> Hi all, >>>> Has anyone played around with the various "better known" compilers on >> [snip] >> ... >> ... >> [snip] >>> >>> You don't need to "change" compilers. You can use whatever one you like >>> to build your program. The compiler portage uses to build its packages >>> does not affect your own usage of the others. >>> >>> As for the fastest one, I can only speak for Intel CPUs where Intel C++ >>> gives me the fastest binaries. >>> >>> >>> >> Nikos, >> Your experience with Intel is what I'm after. Aster, the FEA code I'm >> going to use is not in Portage hence I will be using it's own build >> system. When you've used Intel, have you just exported "CC="icc" or >> something similar, as make.conf won't be used? Also, I've read somewhere >> that there are libraries that you have to link against that are specific >> to the Intel compiler as it does not create libraries that are >> comparable with the gcc produced ones - is this true or does the >> compiler now "play well" with the gcc world? > > No special libs required. The binaries I get (both C and C++) don't use > anything extra. I checked both with "ldd" as well as with lsof at > runtime (in case it dlopens anything). > > For building, you use "CC=icc" and "CXX=icpc" for regular makefiles or > autoconf scripts. I mostly use qmake though (I use Qt for my GUIs). In > that case, you call qmake like this: > > qmake -spec linux-icc > > and it creates a makefile that will use ICC. This is also an example of > ICC using C and C++ libs (Qt is C++) that were built by GCC without > issues; its ABI is fully GCC compatible. > > There are way to use ICC for portage too. I tried that once. It worked > quite well. But I didn't went with it since too much of a bother. > > Note that the link Florian posted is a bit outdated. For example the > sections that tells you that "binaries compiled with icc won't work > after icc is uninstalled" is not true. They will work just fine. The > exception of course if when you specifically use an ICC library, like > the Intel math kernel library. > > > Thanks for that. The library question was the reason I didn't proceed with playing around with icc ages ago. Your experience tells me it's now rectified.
Andrew