1 |
On Fri, 2006-06-09 at 15:36 +0200, Hemmann, Volker Armin wrote: |
2 |
|
3 |
> > Haven't noticed any problems on my laptop or a workstation. |
4 |
> > |
5 |
> |
6 |
> because they were filtered out. |
7 |
> |
8 |
> DO NEVER USE FFAST-MATH! |
9 |
> |
10 |
> Apps that can use it safely, usually set it in their makefile. |
11 |
> |
12 |
> Everything else is prone to break. |
13 |
> |
14 |
> And that is the reason, that almost all ebuilds have 'filter-flags' |
15 |
> and 'strip-flags'. |
16 |
> |
17 |
> Again: NEVER USE IT. |
18 |
> |
19 |
> And: NEVER TELL ANYBODY TO USE IT. |
20 |
|
21 |
If -ffast-math is filtered or stripped out, there is no harm in leaving |
22 |
it in CFLAGS, right? |
23 |
|
24 |
But, on my system, only 14 packages filter out -ffast-math: gnubg |
25 |
postgresql pgcluster libpq zoom mpfr gmp octave openoffice gsl goffice |
26 |
rrdtool xv gimp. None strip it out. So, the huge majority of the |
27 |
packages on my system are compiled with -ffast-math, unless I've made a |
28 |
mistake in grepping for "fast-math" in ebuilds that contain |
29 |
"filter-flags". |
30 |
|
31 |
Here are 4 other opinions about using -ffast-math. |
32 |
|
33 |
http://forums.gentoo.org/viewtopic-t-10535.html |
34 |
--fast-math can and does cause errors, but as I understand it |
35 |
(can't remember where I read this) the errors it can create are |
36 |
only single-byte errors. IOW, your answer to a FP |
37 |
calculation /might/ be one least-signifigant digit off. |
38 |
|
39 |
Unless you're doing important scientific calculations, you're |
40 |
probably never going to notice /or/ care. I would expect that |
41 |
any linux packages that would have a problem with this (ALSA, or |
42 |
GSL and the like) probably tell you not to use it if they don't |
43 |
like it. |
44 |
|
45 |
http://gcc.gnu.org/ml/gcc/2004-03/msg01459.html |
46 |
I've heard it argued that people who are serious about floating |
47 |
point don't use -ffast-math. I consider myself serious, and |
48 |
make a very nice living from selling software to solve |
49 |
finite-difference Poison-Boltzmann electrostatic calculations on |
50 |
regular grids, and molecular minimizations using quasi-newtonian |
51 |
numerical optimizers. Toon does numerical weather forecasting, |
52 |
and he seems happy with -ffast-math. Laurent performs large |
53 |
scale Monte-Carlo simulations, and he also seems happy with it. |
54 |
|
55 |
http://gcc.gnu.org/ml/gcc/2004-03/msg01511.html |
56 |
For me, it's very simple: If -ffast-math leads to answers that are less |
57 |
accurate (in the verification-against-observation-sense) or unphysical |
58 |
(against theoretical limit analysis), then I'll inspect my Fortran code |
59 |
and repair the formulation (either a single expression or the layout of |
60 |
loop code) that is responsible for the mayhem. |
61 |
|
62 |
Under no circumstances I will give up using -ffast-math. |
63 |
|
64 |
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32035.pdf |
65 |
-ffast-math is recommended by AMD. |
66 |
|
67 |
These opinions seem to contradict your advice. Could you be more |
68 |
specific about why -ffast-math should not be used? |
69 |
|
70 |
--- Vladimir |
71 |
-- |
72 |
Vladimir G. Ivanovic <vgivanovic@×××××××.net> |
73 |
-- |
74 |
gentoo-amd64@g.o mailing list |