Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* F77 Compiler underflow question
@ 1999-03-23  5:00 Richard J. Healy
  1999-03-24  5:00 ` Steve Lionel
  0 siblings, 1 reply; 4+ messages in thread
From: Richard J. Healy @ 1999-03-23  5:00 UTC (permalink / raw)


HELP

I'm running on an Alpha using F77 and I'm getting an underflow error
that causes my program to halt.   Now, according to the f77 man page if
I specify -fpe4 option the program will "continue [...] execution if a
floating-point operation results in overflow, a division by zero,
invalid data, or floating-point underflow...."  However, this does not
prevent the program from stopping.  My other (relevant) options are 
-noerror_limit -fast. The error is occurring in the DEXP function for
which a return value of 0 will suffice for the underflow.  It is not
practical to code in an error check myself as this is a large climate
model and the error is bound to occur elsewhere.  Any help appreciated. 
Thanks.

-- 
Richard J. Healy                           rhealy@whoi.edu
Marine Chemistry & Geochemistry MS 25      Voice Phone:(508) 289-3514
Woods Hole Oceanographic Institution       Fax:(508) 457-2193 
Woods Hole, MA 02543



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

* Re: F77 Compiler underflow question
  1999-03-23  5:00 F77 Compiler underflow question Richard J. Healy
@ 1999-03-24  5:00 ` Steve Lionel
  1999-03-24  5:00   ` Richard J. Healy
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Lionel @ 1999-03-24  5:00 UTC (permalink / raw)


On Tue, 23 Mar 1999 17:23:38 -0500, "Richard J. Healy"
<rhealy@whoi.edu> wrote:


>I'm running on an Alpha using F77 and I'm getting an underflow error
>that causes my program to halt.   Now, according to the f77 man page if
>I specify -fpe4 option the program will "continue [...] execution if a
>floating-point operation results in overflow, a division by zero,
>invalid data, or floating-point underflow...."  However, this does not
>prevent the program from stopping.  My other (relevant) options are 
>-noerror_limit -fast. The error is occurring in the DEXP function for
>which a return value of 0 will suffice for the underflow.  It is not
>practical to code in an error check myself as this is a large climate
>model and the error is bound to occur elsewhere.  Any help appreciated. 

You don't say what compiler or OS version you are using - but I have
to wonder why you're using -fpe4 and not the default -fpe0 if you want
underflows to go to zero (or perhaps -fpe2).  If you want speed (and
your use of -fast suggests this), then -fpe0 is preferable.

I tried a short example with a current version of the compiler (V5.2)
and didn't see any errors with an underflow from DEXP.




--
Steve Lionel (mailto:Steve.Lionel@compaq.com)
Fortran Engineering
Compaq Computer Corporation, Nashua NH

Compaq Fortran web site: http://www.compaq.com/fortran



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

* Re: F77 Compiler underflow question
  1999-03-24  5:00 ` Steve Lionel
@ 1999-03-24  5:00   ` Richard J. Healy
  1999-03-24  5:00     ` Steve Lionel
  0 siblings, 1 reply; 4+ messages in thread
From: Richard J. Healy @ 1999-03-24  5:00 UTC (permalink / raw)


Steve Lionel wrote:
> 
> On Tue, 23 Mar 1999 17:23:38 -0500, "Richard J. Healy"
> <rhealy@whoi.edu> wrote:
> 
> >I'm running on an Alpha using F77 and I'm getting an underflow error
> >that causes my program to halt.   Now, according to the f77 man page if
> >I specify -fpe4 option the program will "continue [...] execution if a
> >floating-point operation results in overflow, a division by zero,
> >invalid data, or floating-point underflow...."  However, this does not
> >prevent the program from stopping.  My other (relevant) options are
> >-noerror_limit -fast. The error is occurring in the DEXP function for
> >which a return value of 0 will suffice for the underflow.  It is not
> >practical to code in an error check myself as this is a large climate
> >model and the error is bound to occur elsewhere.  Any help appreciated.
> 
> You don't say what compiler or OS version you are using - but I have
> to wonder why you're using -fpe4 and not the default -fpe0 if you want
> underflows to go to zero (or perhaps -fpe2).  If you want speed (and
> your use of -fast suggests this), then -fpe0 is preferable.
> 
> I tried a short example with a current version of the compiler (V5.2)
> and didn't see any errors with an underflow from DEXP.
> 
> --
> Steve Lionel (mailto:Steve.Lionel@compaq.com)
> Fortran Engineering
> Compaq Computer Corporation, Nashua NH
> 
> Compaq Fortran web site: http://www.compaq.com/fortran


Oops.  I meant to say -fpe2. The man page says fpe0 will terminate when
an exception occurs. It says fpe2 will not.  But it does.  I'm running
OSF1 v4.0 on an alpha.


-- 
Richard J. Healy                           rhealy@whoi.edu
Marine Chemistry & Geochemistry MS 25      Voice Phone:(508) 289-3514
Woods Hole Oceanographic Institution       Fax:(508) 457-2193 
Woods Hole, MA 02543



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

* Re: F77 Compiler underflow question
  1999-03-24  5:00   ` Richard J. Healy
@ 1999-03-24  5:00     ` Steve Lionel
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Lionel @ 1999-03-24  5:00 UTC (permalink / raw)


On Wed, 24 Mar 1999 15:37:11 -0500, "Richard J. Healy"
<rhealy@whoi.edu> wrote:

>
>Oops.  I meant to say -fpe2. The man page says fpe0 will terminate when
>an exception occurs. It says fpe2 will not.  But it does.  I'm running
>OSF1 v4.0 on an alpha.

You didn't say what compiler version you are running.  I tried an
example again with -fpe2 and DEXP underflowed to zero without
problems.

The current compiler version is V5.2.



--
Steve Lionel (mailto:Steve.Lionel@compaq.com)
Fortran Engineering
Compaq Computer Corporation, Nashua NH

Compaq Fortran web site: http://www.compaq.com/fortran



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

end of thread, other threads:[~1999-03-24  5:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-03-23  5:00 F77 Compiler underflow question Richard J. Healy
1999-03-24  5:00 ` Steve Lionel
1999-03-24  5:00   ` Richard J. Healy
1999-03-24  5:00     ` Steve Lionel

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