* Q: floatingpoint exceptions
@ 2002-12-05 22:10 Torsten Zirzlaff
2002-12-06 3:35 ` Michal Jaegermann
2002-12-06 11:39 ` Måns Rullgård
0 siblings, 2 replies; 10+ messages in thread
From: Torsten Zirzlaff @ 2002-12-05 22:10 UTC (permalink / raw)
Hi.
Any idea what is wrong that I receive with several programs a
floatingpoint exception? These are not programs written by me, but
programs from my distro (Debian 3.0) e.g. glplanet.
Often those programs are graphics related, but not in every case. On
my intel box they behave and run smoothly.
It is a compiler problem or rather problem with XFree86 4.2 on alpha
or what ever? I also encounter strange seg faults on freeing
memory. Which works fine on my intel box, but cores on my alpha (Miata
500MHz).
TIA
Torsten
--
s-mail: Neckarstr. 120 Torsten Zirzlaff
70190 Stuttgart
Germany e-mail : zirzlaff@nienor.s.bawue.de
phone: +49 711 285 19 40 torsten@zirzlaff.de
mobil: +49 174 857 56 77
data: +49 711 286 40 57/9
+-----------------------------------------------------------------------------+
| The shortest unit of time in the universe is the New York Second, defined |
| as the period of time between the traffic lights turning green and the cab |
| behind you honking. -- Terry Pratchett 'Lords and Ladies' |
+-----------------------------------------------------------------------------+
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Q: floatingpoint exceptions
2002-12-05 22:10 Q: floatingpoint exceptions Torsten Zirzlaff
@ 2002-12-06 3:35 ` Michal Jaegermann
2002-12-06 5:49 ` Robert M. Riches Jr.
2002-12-06 11:39 ` Måns Rullgård
1 sibling, 1 reply; 10+ messages in thread
From: Michal Jaegermann @ 2002-12-06 3:35 UTC (permalink / raw)
Torsten Zirzlaff <zirzlaff@nienor.s.bawue.de> wrote:
>
> Any idea what is wrong that I receive with several programs a
> floatingpoint exception? These are not programs written by me, but
> programs from my distro (Debian 3.0) e.g. glplanet.
>
> Often those programs are graphics related, but not in every case. On
> my intel box they behave and run smoothly.
Intel FPU allows you to get away with things like dividing by zero, or
something pretty close to it. On Alpha running full speed floating
point exceptions are inexact and cannot be restarted hence attempts to
divide by zero are deadly. You can workaround that by using -mieee flag
while compiling. This has a performance hit but unless you are really
taking care how a floating point arithmetic is peformed this can be the
only practical option. Graphics stuff is pretty infamous for playing
loose with a floating point.
Look in gcc docs for descriptions of '-mieee', '-mieee-with-inexact'
and '-mieee-conformant' for more details.
Michal
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: floatingpoint exceptions
2002-12-06 3:35 ` Michal Jaegermann
@ 2002-12-06 5:49 ` Robert M. Riches Jr.
2002-12-06 18:36 ` Stéphane Vaxelaire
0 siblings, 1 reply; 10+ messages in thread
From: Robert M. Riches Jr. @ 2002-12-06 5:49 UTC (permalink / raw)
On 6 Dec 2002, Michal Jaegermann <michal@gortel.phys.ualberta.ca> wrote:
>Torsten Zirzlaff <zirzlaff@nienor.s.bawue.de> wrote:
>>
>> Any idea what is wrong that I receive with several programs a
>> floatingpoint exception? These are not programs written by me, but
>> programs from my distro (Debian 3.0) e.g. glplanet.
>>
>> Often those programs are graphics related, but not in every case. On
>> my intel box they behave and run smoothly.
>
>Intel FPU allows you to get away with things like dividing by zero, or
>something pretty close to it. On Alpha running full speed floating
>point exceptions are inexact and cannot be restarted hence attempts to
>divide by zero are deadly. You can workaround that by using -mieee flag
>while compiling. This has a performance hit but unless you are really
>taking care how a floating point arithmetic is peformed this can be the
>only practical option. Graphics stuff is pretty infamous for playing
>loose with a floating point.
>
>Look in gcc docs for descriptions of '-mieee', '-mieee-with-inexact'
>and '-mieee-conformant' for more details.
In response to a bug report I had filed or commented on, somebody
at Redhat (possibly Mike Harris, but I'm not certain) stated that
_all_ Redhat packages are compiled with -mieee just to avoid
exceptions that shouldn't be fatal. I think the issue I had
filed was that taking the log() of a large negative number (less
than roughly 610, IIRC) would otherwise produce a denormallized
number, and taking the exp() of that would bomb.
Anyway, using -mieee would seem to put one in pretty good
company.
Robert Riches
rm.riches@verizon.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: floatingpoint exceptions
2002-12-06 5:49 ` Robert M. Riches Jr.
@ 2002-12-06 18:36 ` Stéphane Vaxelaire
2002-12-06 18:58 ` Robert M. Riches Jr.
0 siblings, 1 reply; 10+ messages in thread
From: Stéphane Vaxelaire @ 2002-12-06 18:36 UTC (permalink / raw)
> Anyway, using -mieee would seem to put one in pretty good
> company.
Yes, -mieee is a "magic" solution but as said before it is a
performance hit.
And I can say that too because I spent many days trying to get rid of
64
bitness problems in VegaStrike (vegastrike.sourceforge.net) : a OpenGL
3D space simulator.
I also got rid of *every* SIGFPEs I encountered with the great help of
the lead programmer of that game.
Since then it runs just great without compiling with any -mieee
options.
And indeed, the performance was definitly better (at least without 3D
Hardware acceleration).
Stephane
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: floatingpoint exceptions
2002-12-06 18:36 ` Stéphane Vaxelaire
@ 2002-12-06 18:58 ` Robert M. Riches Jr.
2002-12-06 22:32 ` Falk Hueffner
0 siblings, 1 reply; 10+ messages in thread
From: Robert M. Riches Jr. @ 2002-12-06 18:58 UTC (permalink / raw)
On 6 Dec 2002 10:36:50 -0800, St�phane Vaxelaire <surfdargent@free.fr> wrote:
>
>Yes, -mieee is a "magic" solution but as said before it is a
>performance hit.
>And I can say that too because I spent many days trying to get rid of
>64
>bitness problems in VegaStrike (vegastrike.sourceforge.net) : a OpenGL
>3D space simulator.
>I also got rid of *every* SIGFPEs I encountered with the great help of
>the lead programmer of that game.
>
>Since then it runs just great without compiling with any -mieee
>options.
>And indeed, the performance was definitly better (at least without 3D
>Hardware acceleration).
What level of performance degradation have you observed by using
the -mieee switch?
My main encounter with it was in connection with the Rainbow
document indexing package, which uses a lot of floating point in
its document similarity computation. I saw just a few cases that
would blow up without -mieee, so I added it to the Makefile and
recompiled the whole package (something akin to "make clean ;
make", IIRC). I saw only about a 2% performance degradation on
those parts that had worked without the switch. Based on that
number, I formed the opinion that the degradation was not very
serious.
Robert Riches
rm.riches@verizon.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: floatingpoint exceptions
2002-12-06 18:58 ` Robert M. Riches Jr.
@ 2002-12-06 22:32 ` Falk Hueffner
2002-12-07 1:28 ` Robert M. Riches Jr.
0 siblings, 1 reply; 10+ messages in thread
From: Falk Hueffner @ 2002-12-06 22:32 UTC (permalink / raw)
rob@evrtwa1-ar5-4-65-015-110.evrtwa1.dsl-verizon.net (Robert M. Riches Jr.) writes:
> My main encounter with it was in connection with the Rainbow
> document indexing package, which uses a lot of floating point in its
> document similarity computation. I saw just a few cases that would
> blow up without -mieee, so I added it to the Makefile and recompiled
> the whole package (something akin to "make clean ; make", IIRC). I
> saw only about a 2% performance degradation on those parts that had
> worked without the switch. Based on that number, I formed the
> opinion that the degradation was not very serious.
Perhaps you were using an EV6. The EV6 has precise trap reporting, so
the trap barriers are nops, which can be ignored very efficiently. The
effect is much larger on EV5, where it kills the pipelining.
--
Falk
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: floatingpoint exceptions
2002-12-06 22:32 ` Falk Hueffner
@ 2002-12-07 1:28 ` Robert M. Riches Jr.
2002-12-07 21:37 ` Måns Rullgård
0 siblings, 1 reply; 10+ messages in thread
From: Robert M. Riches Jr. @ 2002-12-07 1:28 UTC (permalink / raw)
On 06 Dec 2002, Falk Hueffner <falk.hueffner@student.uni-tuebingen.de> wrote:
>
>Perhaps you were using an EV6. The EV6 has precise trap reporting, so
>the trap barriers are nops, which can be ignored very efficiently. The
>effect is much larger on EV5, where it kills the pipelining.
I'm on a 21264 alias EV67 (on a UP2000). From the sounds of it,
the EV67 must also have precise trap reporting like the EV6.
Thanks for the information.
Robert Riches
rm.riches@verizon.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: floatingpoint exceptions
2002-12-07 1:28 ` Robert M. Riches Jr.
@ 2002-12-07 21:37 ` Måns Rullgård
0 siblings, 0 replies; 10+ messages in thread
From: Måns Rullgård @ 2002-12-07 21:37 UTC (permalink / raw)
rob@evrtwa1-ar5-4-65-015-110.evrtwa1.dsl-verizon.net (Robert M. Riches Jr.) writes:
> >Perhaps you were using an EV6. The EV6 has precise trap reporting, so
> >the trap barriers are nops, which can be ignored very efficiently. The
> >effect is much larger on EV5, where it kills the pipelining.
>
> I'm on a 21264 alias EV67 (on a UP2000). From the sounds of it,
> the EV67 must also have precise trap reporting like the EV6.
The ev67 is an improved ev6. The difference is faster clock and maybe
some difference in caches. A few instructions might have been tuned,
I'm not sure.
--
M�ns Rullg�rd
mru@users.sf.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: floatingpoint exceptions
2002-12-05 22:10 Q: floatingpoint exceptions Torsten Zirzlaff
2002-12-06 3:35 ` Michal Jaegermann
@ 2002-12-06 11:39 ` Måns Rullgård
2002-12-06 13:26 ` Torsten Zirzlaff
1 sibling, 1 reply; 10+ messages in thread
From: Måns Rullgård @ 2002-12-06 11:39 UTC (permalink / raw)
Torsten Zirzlaff <zirzlaff@nienor.s.bawue.de> writes:
> I also encounter strange seg faults on freeing memory. Which works
> fine on my intel box, but cores on my alpha (Miata 500MHz).
Is this when you write your own programs? Because of the larger
address space on Alphas (43 bits for ev56) things often get laid out
differently from on a 32-bit system. I've seen many cases where an
error goes by undetected on intel systems but produces a segfault on
Alpha. The problem is usually a buffer overrun somewhere, or using
free()'d memory. Check your code with electric fence.
--
M�ns Rullg�rd
mru@users.sf.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Q: floatingpoint exceptions
2002-12-06 11:39 ` Måns Rullgård
@ 2002-12-06 13:26 ` Torsten Zirzlaff
0 siblings, 0 replies; 10+ messages in thread
From: Torsten Zirzlaff @ 2002-12-06 13:26 UTC (permalink / raw)
Hi.
mru@users.sourceforge.net (M�ns Rullg�rd) writes:
> Torsten Zirzlaff <zirzlaff@nienor.s.bawue.de> writes:
>
> > I also encounter strange seg faults on freeing memory. Which works
> > fine on my intel box, but cores on my alpha (Miata 500MHz).
>
> Is this when you write your own programs?
Only on rare cases and the problem is then indeed a wrong assupmtion
regarding the memory.
But I also encounter those, when I try to use example programs for
X, Xt and OpenGL.
> Because of the larger address space on Alphas (43 bits for
> ev56) things often get laid out differently from on a 32-bit
> system. I've seen many cases where an error goes by undetected
> on intel systems but produces a segfault on Alpha. The problem
> is usually a buffer overrun somewhere, or using free()'d
> memory. Check your code with electric fence.
I will, but fear the worst for me, when I go through other peoples code.
> --
> M�ns Rullg�rd
> mru@users.sf.net
Thanks anyway :).
--
s-mail: Neckarstr. 120 Torsten Zirzlaff
70190 Stuttgart
Germany e-mail : zirzlaff@nienor.s.bawue.de
phone: +49 711 285 19 40 torsten@zirzlaff.de
data: +49 711 286 40 57/9 t.zirzlaff@caa.de
mobil: +49 174 857 56 77
+-----------------------------------------------------------------------------+
| The shortest unit of time in the universe is the New York Second, defined |
| as the period of time between the traffic lights turning green and the cab |
| behind you honking. -- Terry Pratchett 'Lords and Ladies' |
+-----------------------------------------------------------------------------+
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2002-12-07 21:37 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-05 22:10 Q: floatingpoint exceptions Torsten Zirzlaff
2002-12-06 3:35 ` Michal Jaegermann
2002-12-06 5:49 ` Robert M. Riches Jr.
2002-12-06 18:36 ` Stéphane Vaxelaire
2002-12-06 18:58 ` Robert M. Riches Jr.
2002-12-06 22:32 ` Falk Hueffner
2002-12-07 1:28 ` Robert M. Riches Jr.
2002-12-07 21:37 ` Måns Rullgård
2002-12-06 11:39 ` Måns Rullgård
2002-12-06 13:26 ` Torsten Zirzlaff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox