Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Anyone else using ICC?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
kikawala
n00b
n00b


Joined: 20 Aug 2002
Posts: 41
Location: Dallas, TX

PostPosted: Mon Mar 24, 2003 5:12 pm    Post subject: Re: Using gcc-config to configure icc Reply with quote

habakke wrote:
Does anyone know which ebuilds supports icc?


Code:
for FILE in `find /usr/portage/ -name "*.ebuild"`;do cat $FILE|grep "use icc" >/dev/null &&echo $FILE;done
Back to top
View user's profile Send private message
rajl
Apprentice
Apprentice


Joined: 25 Sep 2002
Posts: 287

PostPosted: Mon Mar 24, 2003 8:50 pm    Post subject: Reply with quote

the only ebuild that supports icc currently is for povray, a 3-d ray tracing program.
_________________
-Rajl

-----------------------------------------------------------
It's easy to be brave once you consider the alternatives.
Back to top
View user's profile Send private message
UnuMondo
n00b
n00b


Joined: 18 Oct 2002
Posts: 72
Location: Madrido, Hispanio

PostPosted: Fri Mar 28, 2003 1:49 pm    Post subject: Reply with quote

I've been having a hard time compiling abiword with icc. Is there anything I have to tweak other than
Code:
export CC="icc"
?

UnuMondo
Back to top
View user's profile Send private message
Gnufsh
Guru
Guru


Joined: 28 Dec 2002
Posts: 400
Location: Portland, OR

PostPosted: Mon Apr 07, 2003 4:57 pm    Post subject: Reply with quote

Where can I find docs about flags to use with ICC? On an athlon-xp?
Back to top
View user's profile Send private message
avenj
Retired Dev
Retired Dev


Joined: 11 Oct 2002
Posts: 495
Location: New Hampshire

PostPosted: Mon Apr 07, 2003 5:16 pm    Post subject: Reply with quote

Gnufsh wrote:
Where can I find docs about flags to use with ICC? On an athlon-xp?


ICC basically only optimizes for Pentiums.
Back to top
View user's profile Send private message
rajl
Apprentice
Apprentice


Joined: 25 Sep 2002
Posts: 287

PostPosted: Mon Apr 07, 2003 9:09 pm    Post subject: Reply with quote

type man icc to see all the flags icc uses. however, it is made by intel for intel chips, so your athlon is out of luck. If you're looking for other compiler alternatives, try tenDRA compiler. It was developed by DERA, the U.K.'s version of DARPA here in the U.S., but has been BSD licensed, with continued development being done by an open source group at stanford university. For more information, go to http://www.tendra.org there isn't an ebuild for it, so you'll have to manually install it yourself.
_________________
-Rajl

-----------------------------------------------------------
It's easy to be brave once you consider the alternatives.
Back to top
View user's profile Send private message
()
l33t
l33t


Joined: 25 Nov 2002
Posts: 610

PostPosted: Mon Apr 07, 2003 9:50 pm    Post subject: Reply with quote

Isn't the Athlon XP relatively similar to the piii architecture wise though? One would think it should benefit from the same optimizations.
Back to top
View user's profile Send private message
rajl
Apprentice
Apprentice


Joined: 25 Sep 2002
Posts: 287

PostPosted: Tue Apr 08, 2003 12:01 am    Post subject: Reply with quote

athlon xp uses the x86 instruction set, and produces similar output as an intel chip, but there are significant architechtural differences. Example, 3dnow vs sse and sse2. ICC takes advantage of mmx, mmx2, sse and sse2 to the fullest, which is why it so much faster than gcc. Basically it turns every math operation it can into a an sse vector, and then dumps it onto the sse unit to do fast vector math. Since athlons don't have the same sse and mmx units as the pentiums, the code can be (though isn't necessarily) imcompatible.
_________________
-Rajl

-----------------------------------------------------------
It's easy to be brave once you consider the alternatives.
Back to top
View user's profile Send private message
KBAKEP
n00b
n00b


Joined: 07 Dec 2002
Posts: 58
Location: Russia

PostPosted: Wed Apr 09, 2003 12:50 pm    Post subject: Reply with quote

SPEC CINT2000 and CFP2000
Back to top
View user's profile Send private message
()
l33t
l33t


Joined: 25 Nov 2002
Posts: 610

PostPosted: Wed Apr 09, 2003 5:18 pm    Post subject: Reply with quote

One would think that Athlon XP should handle the same SSE code as Pentium though, since it supports the SSE instruction set? I mean, if someone handcoded SSE for a game for instance, it should work with XP.

I wouldnt use 3DNow as an example of major architectural differences either, with XP supporting SSE, SSE2 optimization with ICC can be turned off. From what I remember Athlon is pretty similar to piii architecture wise, but with a beefed up FPU among other things.
Back to top
View user's profile Send private message
zealot
n00b
n00b


Joined: 13 Apr 2003
Posts: 1

PostPosted: Sun Apr 13, 2003 5:10 am    Post subject: Reply with quote

I believe icc, should work fine with Athlon chips... you just might not be able to use certain flags (like don't allow SSE2 code). AMD usually uses the Intel compilers for their SPEC submissions (www.spec.org). Even though the optimizations in the compiler are targetted specifically for Intel processors, many of them benefit modern processors in general.

For example, keeping memory accesses (function calls, reading variables, etc.) aligned to a 4 byte boundary helps modern processors, because if the memory is unaligned they have to shift the data that gets returned, which on many designs takes extra time. I believe this applies to the Athlon, P3, and P4... the P4 just has a higher penalty for unaligned accesses, so it will benenfit more from this optimization.

Anyway, I'm interested in trying out ICC on my gentoo 1.4 box... any new suggestions/tips? Is it better to use the version in emerge, or should I just download the latest version from Intel's site? Any faqs/updates on how to get emerge packages to try to compile with ICC?

Thanks.
Back to top
View user's profile Send private message
Cheesefoam
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2003
Posts: 89

PostPosted: Thu Apr 17, 2003 2:54 pm    Post subject: Reply with quote

FYI, I just managed to get MPQC (a quantum chemistry package) to compile with ICC. I used "-O3 -xW -ipo -tpp7" to optimize for the P4, and got it compiled no problem.

Makes a HUGE difference for computational chemistry.

Thanks for the tips. I'll post other things I get to work if anyone is interested.


Last edited by Cheesefoam on Thu Apr 17, 2003 4:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
avenj
Retired Dev
Retired Dev


Joined: 11 Oct 2002
Posts: 495
Location: New Hampshire

PostPosted: Thu Apr 17, 2003 3:02 pm    Post subject: Reply with quote

I'd love to hear about packages that're known to compile with ICC. In fact, after we get ICC functionality implemented in (g)cc-config, I may start keeping a list of what's known to compile fine with ICC.
Back to top
View user's profile Send private message
()
l33t
l33t


Joined: 25 Nov 2002
Posts: 610

PostPosted: Thu Apr 17, 2003 3:11 pm    Post subject: Reply with quote

I modified the abiword ebuild to use icc once and it worked fine (with moderate optimizations), I think Qt has support for icc, but haven't tried myself yet.
Back to top
View user's profile Send private message
Cheesefoam
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2003
Posts: 89

PostPosted: Thu Apr 17, 2003 4:15 pm    Post subject: Reply with quote

I'll let you know as I figure out packages that work. I'm running some test computations under ghemical with mpqc to really bog down the system and stress test it - seems to be doing just fine.

Should packages that work just be posted here, or should bug reports / feature requests be made?
Back to top
View user's profile Send private message
Cheesefoam
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2003
Posts: 89

PostPosted: Thu Apr 17, 2003 4:45 pm    Post subject: Reply with quote

Got XMMs 1.27-r19 to compile. You'll need to leave out "-ip" or "-ipo" flags, though... They b0rk the compile. Otherwise, it goes very well.

Now to try and get xine-lib to compile. 8O
Back to top
View user's profile Send private message
avenj
Retired Dev
Retired Dev


Joined: 11 Oct 2002
Posts: 495
Location: New Hampshire

PostPosted: Thu Apr 17, 2003 5:08 pm    Post subject: Reply with quote

Here is fine for me - I'd rather not clutter up Bugzilla much more than it already is....
Back to top
View user's profile Send private message
Cheesefoam
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2003
Posts: 89

PostPosted: Thu Apr 17, 2003 5:46 pm    Post subject: Reply with quote

I should point out that this is a list only of things that *compile* - they may not work, as such. For example, I know that the XMMS compile is not properly generating libxmms.so. Anyone got any ideas on that? Packages that I *know* work are marked "**"

Some additions:
Known to compile "out of the box"
zlib-1.1.4-r1
libdvdcss-1.2.6
libfame-0.9.0
alsa-xmms-1.27-r19
eog-2.2.1
**mpqc-2.1.2
xmms-1.27-r19
bzip2-1.0.2-r2
gzip-1.3.3-r1
tar-1.13.25-r3
jpeg-6b-r3
libpng-1.2.5-r4
libogg-1.0
libvorbis-1.0-r2
libmikmod-3.1.10
libsdl-1.2.5-r1
mpg123-0.59r-r2
alsa-oss-0.9.1
openquicktime-1.0-r1

Do not compile
mpeg-lib-1.3.1-r1
xine-lib-1_beta10
gimp-1.2.3
xine-ui-0.9.20
tiff-3.5.7-r1
giflib-4.1.0-r3
imlib-1.9.14
lame-3.93.1-r1
libmpeg2-0.3.1
jpeg-mmx-1.1.2-r1
xvid-0.9.1

Configuration Problems
mozilla-1.2.1-r5
unzip-5.5.0-r1
gtk-perl-0.7008-r9
zip-2.3-r1
PDL-2.3.2-r2
libmpeg3-1.5-r1
quicktime4linux-1.5.5-r1

Mozilla (I know, I know... but I had to try), zip, and xine-lib so far don't work. I'll update this post as I find more packages that work "out of the box" and require no special abuse. Mozilla is interesting because it dies at one point saying that it can't find a compiler, but it's already compiled some stuff up to that point. I didn't take time to really mess with it, though.

Gtk-perl seems to want to stick with gcc only... It doesn't pull up the compiler from the envirment variables - always seems to override with gcc. PDL is the same way. This seems to be the most common problem with the "Configuration Problem" emerges.

Seems that also Intel has made the -tpp7 option default for the compiler, so there's really no need to specify it anymore - it automatically optimizes for the P4. 8)


Last edited by Cheesefoam on Thu Apr 17, 2003 7:46 pm; edited 16 times in total
Back to top
View user's profile Send private message
iamarug
Apprentice
Apprentice


Joined: 09 Feb 2003
Posts: 220

PostPosted: Thu Apr 17, 2003 5:59 pm    Post subject: Reply with quote

at one point I was able to compile electric with icc but not an ebuild. Will try that tonight and report back with any results.
Here is my questions though:
since c++ is not compatible between ICC and GCC, if I were to build a package like qt with ICC, would that create problems for applications compiled with GCC that use the qt libs? I think this would stop many people from compiling main system packages with ICC if it is the case.
Back to top
View user's profile Send private message
Cheesefoam
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2003
Posts: 89

PostPosted: Thu Apr 17, 2003 6:02 pm    Post subject: Reply with quote

BTW, does anyone know how to make emerge compile fortran with ifc instead of g77? I have a couple of packages built with g77 that'd I'd like to redo in ifc.

Iamarug, from what I understand about linking, the real problem lies in the fact that you cannot link libraries which have been compiled with different versions of compilers. An example is if you try to compile avifile. It will give you an error about not being able to link to the Qt libraries because they were built with a different compiler version.
Back to top
View user's profile Send private message
fishhead
Apprentice
Apprentice


Joined: 07 Mar 2003
Posts: 162
Location: Pasadena, CA

PostPosted: Thu Apr 24, 2003 6:54 am    Post subject: Reply with quote

I encoutered an interesting problem building some packages (tar.gz from the providers, not from the ebuilds, but not that it realy matters....). I used icc version 7.1, build 20030307Z. I was trying to build them on a dual Athlon MP with the CFLAGS: "-ip -O3 -xMiK -unroll -openmp -parallel". Each time I tried to run a program, it segfaulted. I traced the instructions and found that the code at fault was always the function "intel_cpu_dispatch_fail". Appearently it didn't like my Athlons, which should be able to run P3 (-xMiK) code just fine. I disassembled the code and found that it was:
080758f0 <__intel_cpu_dispatch_fail>:
80758f0: c7 05 00 00 00 00 01 movl $0x1,0x0
80758f7: 00 00 00
80758fa: c3 ret
80758fb: 90 nop

Which I believe tries to move the value 1 to a location unlikley to be in the program's address space ... I think. Anyway, on removing this code, the program ran just fine, as it should. The way I fixed it was by running:
cat <program_name> | sed -e 's/\xc7\x05\x00\x00\x00\x00\x01\x00\x00\x00\xc3\x90/\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\xc3\x90/g' > <program_name_2>
Which replaces the mov instruction with nops, preventing the problem.

This fix has two problems:
1) I will assume that if the processor won't be able to run this code, this routine might be called, but replacing it may erroniously cause the code to continue executing.
2) If the hex sequence c7 05 00 00 00 00 01 00 00 00 c3 90 occours in the data secton of the program, it will be changed - which could cause any number of problems. However, since the chances of this are ~1 in 7.9 x 10^28 this will hopefuly not be a problem.


Perhaps some more people with Athlon MPs / XPs could try this and see if it works ... It appears that this won't always break .... just sometimes.
Back to top
View user's profile Send private message
()
l33t
l33t


Joined: 25 Nov 2002
Posts: 610

PostPosted: Thu Apr 24, 2003 3:05 pm    Post subject: Reply with quote

If I remember correctly, Intel C++ 7 is meant to be object compatible with GCC, so that you can link link Qt compiled with ICC with apps compiled with GCC etc. Ie. compatible ABI. This is similar to the Windows version, which should be interchangeable with the .NET compiler.
Back to top
View user's profile Send private message
Twist
Guru
Guru


Joined: 03 Jan 2003
Posts: 414
Location: San Diego

PostPosted: Thu Apr 24, 2003 7:30 pm    Post subject: Reply with quote

Quote:
For example, I know that the XMMS compile is not properly generating libxmms.so. Anyone got any ideas on that?


Short path to almost always getting this to work: switch to GCC as a compiler, ./configure you package, manually search and replace the "gcc <cflags>" with icc <cflags>.

Most of the shared object failures are ./configure scripts that dump out because they are either overly fond of gcc syntax or have older (broken) libtools embedded. Doing the above is ugly but usually works in these cases. For instance, this makes freetype a one stop compile - unpackage, configure with gcc, replace gcc compile lines with icc, voila.

As you've already noted -ipo seems to break all kinds of things, I stopped using it.

-Twist
Back to top
View user's profile Send private message
()
l33t
l33t


Joined: 25 Nov 2002
Posts: 610

PostPosted: Thu Apr 24, 2003 8:41 pm    Post subject: Reply with quote

[quote="Twist"]
Quote:


As you've already noted -ipo seems to break all kinds of things, I stopped using it.

If I recall correctly there's a switch to create regular object files with -ipo turned on, perhaps this would help?
Back to top
View user's profile Send private message
Cheesefoam
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2003
Posts: 89

PostPosted: Fri Apr 25, 2003 1:19 pm    Post subject: Reply with quote

That's the "-ipo_obj" flag. I've used it in a couple of cases, and it does seem to help, though for the life of me I still can't get libraries built properly through ebuilds or get ifc to be used in ebuilds. I was able to get ifc to work in one ebuild by manually changing the ebuild, but that's not exactly a good way to go, since I b0rked many other things when I tried to emerge.

I would love to see a second variable for the make.conf file, something like ICFLAGS & ICXXFLAGS, where you can set flags for icc & ifc.

Is there a variable similar to CC/CXX which is used for specifying the fortran compiler? I noticed a FC variable in one of the ebuilds, but it seemed to be local in scope, which is too bad.

Since I've been unable to get ebuilds to make libraries properly yet, I've been trying to get ifc to work, mainly on octave, scilab, ghemical, and mpqc. In all cases, it is tenuous at best just to get the compiler used. I've tried making a set of symlinks to ifc as g77 in a separate directory, then exporting that directory into the path ahead of the regular gcc path, but that doesn't work. Anyone have any ideas?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum