Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: egcs g77 and DgncppB
@ 1998-11-17 22:00 Greg Lindahl
  1998-11-17 22:38 ` Wes Bauske
  0 siblings, 1 reply; 11+ messages in thread
From: Greg Lindahl @ 1998-11-17 22:00 UTC (permalink / raw)
  To: axp-list

> That statement in itself 
> indicates there must be FP calculations in the library,
> which in turn means -mieee is not "free".

Sorry, I thought you were reading the thread. The original bug report
included a gdb session which makes it clear that the library was doing
an fp operation (d < 0.0). I then speculated on the relative number of fp
operations in the library, and predicted that no one would lose if we
made -mieee the default for the library.

> Be that as it may, the solution for DgncppB

I was posting about a different issue: all codes that use -mieee need
a library which can print NaN's. If you want to talk about debugging
that one code, that's great -- what we need for that is an exact
prescription of how to get precise exceptions and core dumps in the
face of NaN and Infinity generation. But be aware that there is more
than one issue being talked about.

-- g


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: egcs g77 and DgncppB
@ 1998-11-17 20:27 Greg Lindahl
  1998-11-17 21:50 ` Wes Bauske
  0 siblings, 1 reply; 11+ messages in thread
From: Greg Lindahl @ 1998-11-17 20:27 UTC (permalink / raw)
  To: axp-list

> > You're assuming that -mieee makes a big difference in library
> > run-time. I suspect it doesn't, since it doesn't have that many
> > floating point ops in it, and when it does, it does expensive things
> > anyway, like converting to ascii and back.
> > 
> 
> As I said, those that want it should have their own
> version. Those that don't should not get it in their
> code path.

So let me get this straight: you think that even if there is no
difference in CPU time consumed, someone should still spend human
effort to make this "feature" available, when nobody needs it?

> Ask yourself how many customers would pay you to
> produce a NaN for them....

Many legitimate algorithms use IEEE in interesting ways to produce
fast answers -- there are NaN's along the way, but the final answer is
right. Just because you don't use such algorithms doesn't mean other
people shouldn't use them.

-- g


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: egcs g77 and DgncppB
@ 1998-11-17 17:25 Greg Lindahl
  1998-11-17 18:19 ` Wes Bauske
  0 siblings, 1 reply; 11+ messages in thread
From: Greg Lindahl @ 1998-11-17 17:25 UTC (permalink / raw)
  To: axp-list

> > This looks like libI77 was not itself compiled with -mieee. Don't the
> > egcs build scripts default to building libI77 with -mieee?
> > 
> 
> Would make sense to have the libraries built both ways.
> That way people who don't want to fix the bugs in their
> code can pay the penalty for using -mieee and those willing
> to get their code working correctly get the best performance
> available by using a non -mieee version of the library.

You're assuming that -mieee makes a big difference in library
run-time. I suspect it doesn't, since it doesn't have that many
floating point ops in it, and when it does, it does expensive things
anyway, like converting to ascii and back.

I also don't see why you think that only bugs generate NaN's. But
that's a different issue.

-- g


^ permalink raw reply	[flat|nested] 11+ messages in thread
* egcs g77 and DgncppB
@ 1998-11-15  9:55 Hirsim{ki Mika
  1998-11-16 17:22 ` Greg Lindahl
  0 siblings, 1 reply; 11+ messages in thread
From: Hirsim{ki Mika @ 1998-11-15  9:55 UTC (permalink / raw)
  To: axp-list

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]

Hi!

I am trying to compile Matthias Fuchs' pseudopotential generation 
program (DgncppB, written in fortran, available at fhi-berlin.mpg.de) 
with egcs-1.1. If anyone here has been able to compile it on Alpha
Linux, I would appreciate if you could help me.

The problem is that I keep running into runtime arithmetic exceptions
(SIGFPE). Using -mieee got rid of a number of these in the actual
program, but for some reason I haven't been able to fix a problem that 
seems to be occuring in the egcs' libI77-sources.

Here's an excerpt from my gdb session...

--<cut here>--

(gdb) run
Starting program: /home/mhi/DgncppB/src/gncpp.x 

Program received signal SIGFPE, Arithmetic exception.
0x12003e350 in wrt_E (p=0x120166818, w=12, d=5, e=2, len=8) at wref.c:46
46              if (dd < 0.) {
(gdb) whatis dd
type = double
(gdb) print dd
$1 = -NaN(0x4344a80000000)

--<cut here>--

If I continue the program execution with "signal 0", I get another
exception a bit later, but after that the program exists normally.
It also seems to have produced all the output files properly. What
is going on? Does this look like a bug in egcs' Fortran front? Its 
version is:

GNU F77 version egcs-2.91.57 19980901 (egcs-1.1 release) (alphaev5-unknown-linux-gnu) compiled by GNU C version egcs-2.91.57 19980901 
(egcs-1.1 release). 
GNU Fortran Front End version 0.5.24-19980804
__G77_LIBF77_VERSION__: 0.5.23
@(#)LIBF77 VERSION 19970919
__G77_LIBI77_VERSION__: 0.5.23
@(#) LIBI77 VERSION pjw,dmg-mods 19980617
__G77_LIBU77_VERSION__: 0.5.23
@(#) LIBU77 VERSION 19980709

--
Mika Hirsimäki






^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1998-11-18 20:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-11-17 22:00 egcs g77 and DgncppB Greg Lindahl
1998-11-17 22:38 ` Wes Bauske
  -- strict thread matches above, loose matches on Subject: below --
1998-11-17 20:27 Greg Lindahl
1998-11-17 21:50 ` Wes Bauske
1998-11-18 18:15   ` Hirsim{ki Mika
1998-11-18 20:25     ` Wes Bauske
1998-11-17 17:25 Greg Lindahl
1998-11-17 18:19 ` Wes Bauske
1998-11-15  9:55 Hirsim{ki Mika
1998-11-16 17:22 ` Greg Lindahl
1998-11-16 23:07   ` Wes Bauske

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox