Xref: utzoo alt.sys.sun:2658 comp.lang.fortran:4704 Path: utzoo!utgpu!cs.utexas.edu!sun-barr!newstop!exodus!exodus-bb!khb From: khb@chiba.Eng.Sun.COM (Keith Bierman fpgroup) Newsgroups: alt.sys.sun,comp.lang.fortran Subject: Re: How Broken is Sun Fortran (Summary) Message-ID: Date: 8 Feb 91 04:20:31 GMT References: <1991Feb04.013025.8087@ariel.unm.edu> <1991Feb4.194628.12615@tukki.jyu.fi> <49413@seismo.CSS.GOV> <1991Feb8.023527.20806@fs7.ece.cmu.edu> Sender: news@exodus.Eng.Sun.COM Followup-To: alt.sys.sun Organization: Sun MegaSystems Lines: 67 In-reply-to: winstead@faraday.ECE.CMU.EDU's message of 8 Feb 91 02:35:27 GMT In article <1991Feb8.023527.20806@fs7.ece.cmu.edu> winstead@faraday.ECE.CMU.EDU (Charles Holden Winstead) writes: 1- Is Fortran on these Suns different than 'conventional' Fortran? i.e. what do I have to look out for? It is a "standard" Unix fortran by parentage, with several years of extensions. Most inspired by user requests for "vax-like" features, sometimes others (Cray style pointers). See the Fortran User's Guide, and Reference manuals. 2- Is there a debugger that works? I've tried gdp and dbx and neither can read the source code that fortran produces. The same program compile dwith the same flags can be read on a DEC machine, so I'm figuring it's a problem in Sun Fortran. Care to be more specific. dbx is far from perfect, but it can handle many codes (the problem is that there are many that cause it grief ;<) 3- Every now and then I get an error that says Warning: IEEE floating Point Error. Inexact Underflow. But it doesn't tell me where it happened! I guess an anwer to 2 would also answer this. That isn't what it sez. Inexact and Underflow are not errors. I'd bet a beer that the message is something like Warning: the following IEEE floating-point arithmetic exceptions occurred in this program and were never cleared: Inexact; Underflow The easiest reference is the Numerical Computation Guide. Should have been in the box with your other Fortran manuals (the entire set includes the reference, the user guide, dbx, source browser and ncg). There are also excellent papers by Kahan (From UCB, turning award winner for floating point work). Exceptions are NOT errors. These two are particularly common. If you expected your computation to be exact (see the ieee 754 spec for the definition) you would WANT to know if it wasn't (most of us use fp specifically because we are interested in approximations, else we'd be tempted to used fixed point arithmetic ;> or symbolic techniques ;>). Underflow means that some computation was very close to zero. So close, that _some_ accuracy was lost (unlike non-ieee machines, or -fnonstandard mode where the result would have been flushed to zero, entailing a larger and completely silent lossage). If you wish to never see the message, irrespective of events (not recommended!, what if there had been overflow? illegal operand?) you can do one of several things: 1) add a call to ieee_flags (man ieee_flags shoudl work) clearing them all, or just the ones you don't care about. Something like ieeer= ieee_flags("clear","exception","all",out) 2) if you want to be truly evil, you could write your own routine called ieee_retrospective, and link it in before libm. There is also a sort of hitchhikers guide to this stuff in the Fortran User's guide, Chapter 10. -- ---------------------------------------------------------------- Keith H. Bierman kbierman@Eng.Sun.COM | khb@chiba.Eng.Sun.COM SMI 2550 Garcia 12-33 | (415 336 2648) Mountain View, CA 94043