From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 27269 invoked from network); 18 Nov 1998 18:15:53 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 18 Nov 1998 18:15:53 -0000 Received: from alpha.cc.tut.fi (alpha.cc.tut.fi [130.230.56.11]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id NAA22701 for ; Wed, 18 Nov 1998 13:15:52 -0500 Received: from tau.cc.tut.fi (tau.cc.tut.fi [130.230.56.19]) by alpha.cc.tut.fi (8.9.1/8.9.1) with SMTP id UAA07698 for ; Wed, 18 Nov 1998 20:15:51 +0200 (EET) From: Hirsim{ki Mika Received: by tau.cc.tut.fi (5.65v4.0/1.1.19.2/26Jun98-0318PM) id AA09226; Wed, 18 Nov 1998 20:15:47 +0200 Date: Wed, 18 Nov 1998 20:15:47 +0200 Message-Id: <199811181815.AA09226@tau.cc.tut.fi> To: axp-list@redhat.com Cc: axp-list@redhat.com In-Reply-To: <3651EF92.41C6@paralleldata.com> (wsb@paralleldata.com) Subject: Re: egcs g77 and DgncppB > 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. :)