View previous topic :: View next topic |
Author |
Message |
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Tue Nov 28, 2006 5:45 am Post subject: |
|
|
I've seen fast-math enabled in the Makefile of some Quake 1 & 2 engines. Just in case anyone's wondering whether it's ever safe to use - the answer is that it can be, as long as the app's writer says so |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Tue Nov 28, 2006 6:00 am Post subject: |
|
|
PaulBredbury wrote: | I've seen fast-math enabled in the Makefile of some Quake 1 & 2 engines. Just in case anyone's wondering whether it's ever safe to use - the answer is that it can be, as long as the app's writer says so |
True, -fast-math can help out with many different apps. _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
Torangan Apprentice
Joined: 21 Mar 2003 Posts: 178
|
Posted: Thu Nov 30, 2006 7:49 pm Post subject: |
|
|
piwacet wrote: | Didn't 4.2 recently branch from mainline? Would there be that much difference yet? |
Mainline develops toward 4.3, 4.2 is in stabilizing only mode. It has a few improvements as you can see on the wiki but it won't be a huge step. |
|
Back to top |
|
|
cruzki Tux's lil' helper
Joined: 13 Dec 2005 Posts: 137
|
Posted: Fri Dec 01, 2006 9:16 am Post subject: |
|
|
I saw yesterday that the new kernel have an option only for gcc-4.2, is this option enough important to use 4.2 for compile this kernel?¿? |
|
Back to top |
|
|
Enverex Guru
Joined: 02 Jul 2003 Posts: 501 Location: Worcester, UK
|
Posted: Fri Dec 01, 2006 10:13 am Post subject: |
|
|
I remember things like XMame and Widelands use things like -funroll-all-loops -ffast-math, etc (force them on for that ebuild). I guess things like XMame need all the code speed they can get. |
|
Back to top |
|
|
no4b Bodhisattva
Joined: 18 Jan 2004 Posts: 774 Location: Tarnów, Poland
|
Posted: Fri Dec 01, 2006 10:34 am Post subject: |
|
|
Although mplayer's developers are tough with optimalization flags, it uses -ffast-math. This flag is bad *only* in some cases, not in general. So no, nobody's soul is dying when you use it. _________________ GTK2/GNOME - The weakest link! |
|
Back to top |
|
|
Zubzub Tux's lil' helper
Joined: 14 Jun 2006 Posts: 91 Location: ::1
|
Posted: Fri Dec 01, 2006 12:30 pm Post subject: |
|
|
cruzki wrote: | @vipernicus
It's safe to use hash-style=gnu?¿?¿?
What are your recomendation to an x86 machine?¿?¿?, what do you think about the CFLAGS that use nesl247 in the evolution-emission guide?¿?¿
Code: |
#nesl247's CFLAGS in the evo-emi 4.0
CHOST="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
CFLAGS="${CFLAGS} -fno-ident -frename-registers -combine -fprefetch-loop-arrays -fweb -fgcse-after-reload"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-znow"
LDFLAGS="${LDFLAGS} -Wl,--hash-style=both"
MAKEOPTS="-j2"
|
PS: where I will learnd about the new options in GCC-4.2 or 4.3 for a non experiment programer like kernel-for-newbies??¿? |
LDFLAGS is defined twice, does this have a reason? |
|
Back to top |
|
|
Enverex Guru
Joined: 02 Jul 2003 Posts: 501 Location: Worcester, UK
|
Posted: Fri Dec 01, 2006 2:11 pm Post subject: |
|
|
It's not defined twice, it's just split up (notice the variable is specified on the second line making it an append rather than replacing the old one). |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sat Dec 02, 2006 11:58 am Post subject: |
|
|
no4b wrote: | Although mplayer's developers are tough with optimalization flags, it uses -ffast-math. This flag is bad *only* in some cases, not in general. So no, nobody's soul is dying when you use it. |
NO, it's generally bad. That's not to say it _will_ cause problems but it can . That is enough to make it generally bad. That's not to say it's a bad option, it's a bad option if used inappropriately.
-ffast-math does some none std things and skips some basic checks that are standard in order to gain a small speed improvement. These checks are expected to be present by some software and things will misfunction if they are not there. This is correct and reasonable use by the program but will cause breakage with this compiler option. ie BAD.
Now some programs have been written with due care to aviod such problems with specific aim to profit from the small gains possible where this is really needed. ie GOOD.
So this option is generally BAD in /etc/make.conf , it may be benificial if used intellegently for specific pkgs that are designed for it. It is likely that such pkgs will have it added to the ebuild but it could be added on a case by case basis in /etc/portage/package.use if you want to be sure.
For more discussion on arbitary use of obscure CFLAG options please find CFLAG CENTRAL thread. There's about 20 pages of such material there if it is of interest to anyone. The title of this thread is gcc 4.3
If we cut out the chaff and general disinformation posted in this thread it would still fit on one page. _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
DualCpuUser n00b
Joined: 03 Mar 2005 Posts: 71
|
Posted: Sat Dec 02, 2006 4:21 pm Post subject: |
|
|
Ok, I have to chime in here:
1) Starting to use gcc-4.3.0-svn as of yesterday/todays, sources. Compiled fine.
2) patch set for that alpha does not carry forward, but not relevant CPU's.
3) I was using a modified 4.1.1 + the generic(32/64) patches and SVN of Binutils as I wanted to make sure I got the SSSE3 updates to GAS.
4) I WANT/NEED/Demand 4.3 to work, because of -MARCH=CORE2 support!!! Overall, not need to many switches to turn on, as long as the ins-scheduler optimizes for my cpu.
5) Mentioned earlier can't compile glibc, I think I tried that a few days ago with the alpha version that version need removal and grab 1201 core2 wasn't in that.
6) 4.1.1+patches did pass all the compiler tests, but I was having ICE when some switches were enabled.
7) If you are going to play with compiler flags, MOVE flag-o-matic to your overlay directory, yes it gets used there. ADD the flags you NOT want stripped. Flags get stripped even if use flags are used.
QT Last time I compiled it, 4.1.1+HJ patches was 6 mins 50 seconds. f0rk. God, an hour+20, or 2 hrs.. I have some hardware to sell. AMD X2 and Opteron X2.
9) Python compiled just fine atm with 4.3.0.
10) never used LDFlags, going to used vipers suggestion on pg 2 from nesl247.
11) for now, most of the flags are what I used while on my AMD64 box.
12) Oh, FEATURES=${FEATURES} test" ADD TEST RUNS, YES, ITS A PAIN And watch out for DB.... its test run for hours, kill that build and start over.
CAVEAT: I'm seeing tests fail, more to there age, than a real failure. Coreutils test failed as with hash=both, it sees both definitions as errors.
13) BEFORE ANYTHING, IF YOU DON'T USE 'buildpkg' in your FEATURES FLAG, add it and rebuild your major system components for going back to gcc-4.1.1 and the binaries compiled with it. It will save you a lot of grief if gcc-4.3.X is used.
-Ron
[I reserve the right to edit this as I see fit. ][/code] _________________ -Ron |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sun Dec 03, 2006 12:23 am Post subject: |
|
|
anyone tested gfortran off 4.3 ?
BTW s.o. remind me how to unmask a -* pkg . Thx. _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
masterdriverz Retired Dev
Joined: 28 Mar 2006 Posts: 391 Location: Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the galaxy
|
Posted: Sun Dec 03, 2006 12:24 am Post subject: |
|
|
Gentree wrote: | remind me how to unmask a -* pkg |
package.keywords ... _________________ Solutions to misc kde problems |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sun Dec 03, 2006 12:27 am Post subject: |
|
|
damn, you're too quick, I was hoping to edit that out before anyone read it
thanks a lot _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
masterdriverz Retired Dev
Joined: 28 Mar 2006 Posts: 391 Location: Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the galaxy
|
Posted: Sun Dec 03, 2006 12:46 am Post subject: |
|
|
Gentree wrote: | damn, you're too quick, I was hoping to edit that out before anyone read it |
email notifications++ _________________ Solutions to misc kde problems |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sun Dec 03, 2006 9:57 am Post subject: |
|
|
(email notifications++) ++
just ran some of the benchmarks from http://www.polyhedron.com/pb05/linux/f90bench_p4.html an my athlon-xp system using gfortran from 4.3
encouraging , some healthy reductions of 25-30% and one regression where it was slower.
I dont see gfortran being so far behind ifc on any of the test as seen that link. Maybe due to the fact that their test ran on suse 9.3 , probably gcc-4.0.2 where gfortran was rather new and the hardware was an intel dual core for which the intel compiler may produce more fine tuned code.
if anyone's interested here's a summary.
Code: |
gfortran aermod.f90 -O3 -march=athlon-xp -funroll-loops -ffast-math -static -$
ifort channel.f90 -O3 -xK -ipo -o acf
sync && time ./acg
sync && time ./acf
ac
4.1.1
real 0m19.760s
user 0m19.602s
sys 0m0.060s
4.3
real 0m16.140s
user 0m15.990s
sys 0m0.047s
ifc
real 0m15.920s
user 0m15.644s
sys 0m0.055s
air
4.1.1
real 0m29.082s
user 0m28.032s
sys 0m0.168s
4.3
real 0m28.499s
user 0m27.651s
sys 0m0.167s
ifc
real 0m35.408s
user 0m26.475s
sys 0m0.374s
aermod
4.1.1
real 1m11.299s
user 1m9.872s
sys 0m0.229s
4.3
real 0m53.570s
user 0m51.644s
sys 0m0.186s
ifc
real 0m39.021s
user 0m37.758s
sys 0m0.149s
capacita
4.1.1
real 2m23.763s
user 2m20.741s
sys 0m2.199s
4.3
real 2m21.856s
user 2m19.587s
sys 0m1.525s
ifc
segf
channel
4.1.1
real 0m35.256s
user 0m34.815s
sys 0m0.165s
4.3
real 0m36.283s
user 0m35.820s
sys 0m0.174s
ifc
real 0m42.996s
user 0m42.493s
sys 0m0.191s
doduc
4.1.1
real 0m52.825s
user 0m51.713s
sys 0m0.173s
4.3
real 0m50.462s
user 0m49.841s
sys 0m0.173s
ifc
real 0m59.586s
user 0m58.658s
sys 0m0.199s
fatigue
4.1.1
real 0m15.892s
user 0m15.713s
sys 0m0.042s
4.3
real 0m19.577s
user 0m19.407s
sys 0m0.054s
ifc
real 0m18.640s
user 0m18.359s
sys 0m0.069s
gas_dyn
4.1.1
real 0m39.803s
user 0m38.424s
sys 0m0.288s
4.3
real 0m39.476s
user 0m38.195s
sys 0m0.279s
ifc
real 0m42.836s
user 0m26.187s
sys 0m0.997s
tfft
4.1.1
real 0m15.490s
user 0m15.261s
sys 0m0.080s
4.3
real 0m15.528s
user 0m15.343s
sys 0m0.069s
ifc
real 0m16.007s
user 0m15.652s
sys 0m0.102s
test_fpu
4.1.1
Benchmark running, hopefully as only ACTIVE task
Test1 - Gauss 2000 (101x101) inverts 4.8 sec Err= 0.000000000000003
Test2 - Crout 2000 (101x101) inverts 5.3 sec Err= 0.000000000000000
Test3 - Crout 2 (1001x1001) inverts 16.5 sec Err= 0.000000000000001
Test4 - Lapack 2 (1001x1001) inverts 14.8 sec Err= 0.000000000000273
total = 41.4 sec
real 0m42.176s
user 0m41.644s
sys 0m0.261s
4.3
Benchmark running, hopefully as only ACTIVE task
Test1 - Gauss 2000 (101x101) inverts 4.9 sec Err= 0.000000000000013
Test2 - Crout 2000 (101x101) inverts 6.1 sec Err= 0.000000000000006
Test3 - Crout 2 (1001x1001) inverts 17.6 sec Err= 0.000000000000002
Test4 - Lapack 2 (1001x1001) inverts 14.8 sec Err= 0.000000000000287
total = 43.4 sec
real 0m43.896s
user 0m43.376s
sys 0m0.271s
ifc
Benchmark running, hopefully as only ACTIVE task
Test1 - Gauss 2000 (101x101) inverts 5.6 sec Err= 0.000000000000005
Test2 - Crout 2000 (101x101) inverts 13.0 sec Err= 0.000000000000006
Test3 - Crout 2 (1001x1001) inverts 23.4 sec Err= 0.000000000000029
Test4 - Lapack 2 (1001x1001) inverts 14.4 sec Err= 0.000000000000329
total = 56.4 sec
real 0m56.788s
user 0m56.141s
sys 0m0.301s
|
No CFLAG flames or comments , I took those basically from the test suite as what worked best. I do not pretend this is a scientific study and I did not spend a long time optimising either compilers options. My main interest was to see what improvements 4.3 made to gfortran and the results are very encouraging.
-ftree-vectorize made no difference I could detect to any of the longer tests that I tried it on.
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sat Dec 16, 2006 1:16 pm Post subject: |
|
|
hmm, no-one testing 4.3 ?
I had a hard job even finding this thread again.
just compiled a few pkgs that were needed by revdep and it seems to have gone smoothly.
Any good features to be gained from 4.3 for us ludites still using only one core CPUs?
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sat Dec 16, 2006 4:10 pm Post subject: |
|
|
Code: | amule: /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6: version `GLIBCXX_3.4
.9' not found (required by amule) |
just rebuild amule but it did not seem to be listening.
.la issues??
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
zxy Veteran
Joined: 06 Jan 2006 Posts: 1160 Location: in bed in front of the computer
|
Posted: Sat Dec 16, 2006 5:11 pm Post subject: |
|
|
Gentree wrote: | hmm, no-one testing 4.3 ?
I had a hard job even finding this thread again.
just compiled a few pkgs that were needed by revdep and it seems to have gone smoothly.
Any good features to be gained from 4.3 for us ludites still using only one core CPUs?
|
The plans for 4.3 are here:
http://gcc.gnu.org/wiki/GCC_4.3_Release_Planning
It looks good for non core duo, too. _________________ Nature does not hurry, yet everything is accomplished.
Lao Tzu |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sat Dec 16, 2006 9:27 pm Post subject: |
|
|
thanks, very informative. Looks like gfortran is moving fast as well.
any idea what the libc++ error above is about? I got a similar bounce on kdelib.
It looks like gcc-config is not doing enough. It's still refering to 4.1.1 and my current glibc++-v3 is 3.3.6
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
drwook Veteran
Joined: 30 Mar 2005 Posts: 1324 Location: London
|
Posted: Sat Dec 16, 2006 10:08 pm Post subject: |
|
|
Gentree wrote: | thanks, very informative. Looks like gfortran is moving fast as well.
any idea what the libc++ error above is about? I got a similar bounce on kdelib.
It looks like gcc-config is not doing enough. It's still refering to 4.1.1 and my current glibc++-v3 is 3.3.6
|
Sounds like the gcc 3.3 -> 3.4 thing (is it libstdc++-v3 ?) ? If so it should just take a revdep-rebuild to sort... |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sat Dec 16, 2006 10:44 pm Post subject: |
|
|
thanks but no, I already tried that (not that revdep not finding anything means that much ...).
It looks similar to the way gcc-config fails to swap gfortran. 1.3.14 only half works but 2.0.0_rc is masked. _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sat Dec 16, 2006 11:34 pm Post subject: |
|
|
f0rk wrote: |
3) Some part of KDE:
kde-base/kdelibs-3.5.5
kde-base/libkonq-3.5.5
kde-base/ksmserver-3.5.5
kde-base/kcontrol-3.5.5
kde-base/kdesktop-3.5.5
kde-base/kicker-3.5.5
kde-base/konqueror-3.5.5
and some themes...
All packages were compiled fine!
...
I use: x86 + ~x86 for some packages, but packages.keywords becomes rather big and I'm pondering about migrating to ~x86 only.
9) python-2.4.3-r4 |
fork, I'd say go for ~x86 . I found I had more in keywords than not and so I swapped over.
The change went easily and I've had less problems than when I was running stable. _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
zxy Veteran
Joined: 06 Jan 2006 Posts: 1160 Location: in bed in front of the computer
|
Posted: Sun Dec 17, 2006 11:37 am Post subject: |
|
|
I just saw that gcc 4.3.0_alpha20061216 came into portage.
Anybody tried it yet.
@Gentree: Maybe it solves your problem from above. _________________ Nature does not hurry, yet everything is accomplished.
Lao Tzu |
|
Back to top |
|
|
nbvcxz Guru
Joined: 02 Sep 2005 Posts: 379 Location: Kraków / PL
|
Posted: Sun Dec 17, 2006 12:59 pm Post subject: |
|
|
Has anybody succeeded in building system with 4.3.0 - mine always fails at glibc / btw any important news in 20061216 except of ppc bugfix? _________________ nBVCXz
zen-kernel (bfq compcache) | /tmp -> tmpfs | ext4 | zsh | xfce | schedtool |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sun Dec 17, 2006 9:57 pm Post subject: |
|
|
zxy wrote: | I just saw that gcc 4.3.0_alpha20061216 came into portage.
Anybody tried it yet.
@Gentree: Maybe it solves your problem from above. |
I solved that one by removing the new hardmask on eselect-compiler-2.0.0* . That fixed the gfortan swap and the GXX problem.
just managed to rebuild qt-4 and kdelibs with 20061211.
added --hash-style but nothing too tweeky.
Code: | LDFLAGS="-Wl,-O1 -Wl,--sort-common -s"
LDFLAGS="${LDFLAGS} -Wl,--hash-style=both" |
have not gone for full system build yet. I had some h/w probs to clear up first.
looks good so far.
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
|