From: "G. Hugh SONG" <ghsong@\"Spamspoiler\"kjist.ac.kr>
Subject: FP interrupt (was Re: Wait on DVF6)
Date: 1998/10/27 [thread overview]
Message-ID: <713fhi$d1n$1@news.kjist.ac.kr> (raw)
In-Reply-To: 36351890.3DF6@ipa.net
Donald L. Baker wrote:
> Anyone considering buying DEC Visual Fortran 6 to develop numerical
> code should wait until DEC publicly demonstrates two things:
> 1) That the DVF6 debugger can catch the numerical errors in the
> program below and point to the proper line of source code - on
> all machine architectures, (DVF5d can't on Alpha) and
> 2) Why anyone should be forced to buy an upgrade when other compiler
> products have been catching these errors for most of a decade.
>
> program never
>
> implicit real*8(a-h,o-z)
>
> a = 0.d0
> x = dlog(a)
> a = -1.d0
> x = a**2.d0
> a = 0.d0
> x = 2.d0/a
>
> end
>
> Don Baker
> Aquarius Engineering
> don.baker@aquarien.com
I did some experiment with the first two executable lines
which is basically "x = dlog(0.d0) ".
Program Never
implicit real*8 (a-h,o-z)
call FPUSETDEF
a = 0.d0
x = dlog(a)
stop
end
Then, the following C routine works as desired with Intel/Linux:
/*
* Set the floating point control to fault on divide by zero etc...
* instead of returning a NaN. This is *not* IEEE compliant but is much
* easier to use when debugging.
*/
#include <fpu_control.h>
void
fpusetdef_(void)
{
__setfpucw(0x1372);
}
However, the above C-routine does not work with Alpha/Linux.
Can someone correctly point out the right floating point
interrupt address (instead of 0x1372 for Intel)?
In /usr/include/fpu_control.h, there is a bunch of important
messages which I don't understand. If Steve Lionel cannot
help us, then the problem must be some hardware limitation
(or design choice) of Alpha.
BTW, I think I can understand Don Baker's frustration.
Above C-routine for Intel/Linux was provided by David Klein.
When I was working with DECstation 3000 running MIPS FORTRAN,
a similar C-routine was provided by one of DEC insiders.
When DEC released DEC FORTRAN for MIPS, the interrupt handler
became unnecessary.
With no such tools provided, Alpha/Linux/NT cannot be considered
as a machine for numerical code developments, IMHO. So I am
using K6-2/Linux and Alpha/Linux side by side.
Best regards,
--
G. Hugh Song
PS: Please remove "Spamspoiler" when replying
for spam extractors, FCC Commisioners' email addresses are:
wkennard@fcc.gov,sness@fcc.gov,pmisener@fcc.gov,mpowell@fcc.gov
next parent reply other threads:[~1998-10-27 5:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <36351890.3DF6@ipa.net>
1998-10-27 5:00 ` G. Hugh SONG [this message]
1998-10-27 5:00 ` FP interrupt (was Re: Wait on DVF6) Donald L. Baker
1998-10-27 5:00 ` Greg Lindahl
1998-10-27 5:00 ` Greg Lindahl
1998-10-27 5:00 ` Donald L. Baker
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox