Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Hirsim{ki Mika <mhi@alpha.cc.tut.fi>
To: axp-list@redhat.com
Cc: axp-list@redhat.com
Subject: Re: egcs g77 and DgncppB
Date: Wed, 18 Nov 1998 20:15:47 +0200	[thread overview]
Message-ID: <199811181815.AA09226@tau.cc.tut.fi> (raw)
In-Reply-To: <3651EF92.41C6@paralleldata.com> (wsb@paralleldata.com)

> in LIBI77 or, since it's a problem specific to that code,
> rebuild egcs with the -mieee flag active for the library
> and see if that helps. Note using -mieee does not guarantee
> FPE's go away.

     I re-compiled the libI77 with -mieee and with -mieee-with-
     inexact, but neither fixed the problem.

     I've traced the problem to following part of Dgncpp code:

      real*8    sgrad,pi4
      ...
      sgrad=0.16*abs(dcp(i)/pi4)/(dc(i)/pi4)**1.33
      write(28,'(5(e12.6,1x))') r(i),dc(i),sgrad,ves(i),vxc(i)
      ...

     The problem is that the variable sgrad goes infinite (as
     the denominator becomes zero, which is what it should do
     in any case) and write chokes on it. This, of course, 
     is easily fixed by manually adding code that checks the 
     denominator before calculating sgrad, but to my mind the 
     compiler/runtime-libs should be able to handle a NaN. I 
     don't mind if it prints out NaNs, because that's basically
     what the physics predicts. What I do mind is getting SIGFPEs
     and a stopped execution just because write can't handle NaNs.

     However at least Martin Fuchs (not Matthias as I previously 
     wrote) and the other people at fhi-berlin.mpg.de, some of whom 
     I received mail from regarding my previous post, might find 
     it interesting to know that their more complex program fhi96md 
     (an ab initio code) compiled and ran almost unmodified on
     Alpha Linux. Just had to add -mieee to the compiler options.
     A very nice surprise. :)



     
    




  reply	other threads:[~1998-11-18 18:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-17 20:27 egcs g77 and DgncppB Greg Lindahl
1998-11-17 21:50 ` Wes Bauske
1998-11-18 18:15   ` Hirsim{ki Mika [this message]
1998-11-18 20:25     ` Wes Bauske
  -- strict thread matches above, loose matches on Subject: below --
1998-11-17 22:00 Greg Lindahl
1998-11-17 22:38 ` 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
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