🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.dec
Article #5428

Re: Fascinating DecStation 3100 Fortran problem.

#5428
From: Charlos Potma
Date: Thu, 08 Jun 1989 14:38
61 lines
2619 bytes
In article <1253@riscy.dec.com>, graham@fuel.dec.com (kris graham) writes:
> 
> > 1)  If compiled with version 1 of the compiler, the program runs fast,
> > bug generates an output file that consists of NaN, which somebody told me
> > means not a number.  However, the exact same program works like a charm under
> > VMS.
> > 
> 
> 
> 
> I am taking a guess (not knowing your code) on how to get rid of those NaNs...
> 
> Try compiling with the -static option.  
> 
> The -static option saves local variables in one static location.
> Subsequent calls to the procedure containing the variables can 
> change their values.
> 
> The DECstation 3100 (aka PMAX) Fortran compiler, unlike some other F77-compatible compilers,
> does not have the -static switch as a default.
> 
> Hey, I speak for myself..not for Digital.
> 
> Christopher Graham, [ graham@fuel.dec.com ]
> Digital Equipment Corp,
> Ultrix Resource Center,

I am not certain if this is the appropriate place to mention but:

We had the same problem: NaN's were produced however,when porting
F77 code from a HP9000/550 to a HP9000/840 machine.
The HP Fortran 77 Reference Manual states:
(speaking about real format)
If the exponent is all 1s and the fraction is 0,the number is
regarded as signed infinity. If the exponent is all 1s and the
fraction is not 0,then the interpretation is "not-a-number"
(NAN).
......

So perhaps in this case the problem is caused by an illegal
operation on a variable . It might be a case
of an "unforgiving" Fortran compiler on the DECstation,
whereas the VMS compiler assured (?) clipping the variables
to max or min range.

We found that a NaN could be produced by : 0.0/0.0
                                      or : INF/INF

The HP F77 compiler has an option to generate a trap when an
attempt is made to operate on infinities and NaNs, to make it
easier to trace the problem. Perhaps DEC Fortran has the same option.

I am not familiar however with DEC systems,I am speaking
here as a Fortran programmer.

Charlos Potma
National Institute for Public Health and Environment
Laboratory for Air Research
Pb 1 3720 Bilthoven
The Netherlands.
mcvax!rivm!llocp
Technical Details
Message-ID: <1366@rivm05.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!hp4nl!rivm!llocp
References: <2227@blake.acs.washington.edu> <1253@riscy.dec.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!hp4nl!rivm!llocp
From: llocp@rivm.UUCP (Charlos Potma)
Newsgroups: comp.sys.dec
Subject: Re: Fascinating DecStation 3100 Fortran problem.
Summary: Illegal operations may cause NaN's
Message-ID: <1366@rivm05.UUCP>
Date: 8 Jun 89 14:38:32 GMT
References: <2227@blake.acs.washington.edu> <1253@riscy.dec.com>
Organization: RIVM, Bilthoven, The Netherlands
Lines: 61