* Possible Alpha f77 Problem
@ 1994-07-31 19:11 todd spindler
1994-08-01 15:43 ` Steve Lionel
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: todd spindler @ 1994-07-31 19:11 UTC (permalink / raw)
I tried the following program on a Dec Alpha running OSF/1 1.3,
Dec Fortran T3.4-451:
program bogus
real aaa /-10./
write(*,*) 'log(-10) =', log(aaa)
end
The problem is that I don't get an error message for calculating the log
of a negative number. Fortran simply returns the argument value, and
prints the following line:
log(-10) = -10.00000
What gives? Ultrix Fortran returns an error message, as does VMS Fortran.
Is this a bug or a feature?
--
Todd Spindler |Rosenstiel School of Marine & Atmospheric Science
TSpindler@rsmas.miami.edu|Dept. of Meteorol & Phys Oceanography /U of Miami
---------------------------------------------------------------------------
Beyond the ken of mortal men, beneath the wind and waves, / Lies a land of
shells and sand, of chasms, crags, and caves, / Where coral castles climb
and soar, where swaying seaweeds grow, / While all around, without a sound,
the ocean currents flow... _Sign of the Seahorse_ by Graeme Base
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Possible Alpha f77 Problem 1994-07-31 19:11 Possible Alpha f77 Problem todd spindler @ 1994-08-01 15:43 ` Steve Lionel 1994-08-01 18:47 ` Jim Brown 1994-08-02 6:08 ` Thomas Wright Sysop. UHIBPD 2 siblings, 0 replies; 7+ messages in thread From: Steve Lionel @ 1994-08-01 15:43 UTC (permalink / raw) In article <31gt09$i8d@umigw.miami.edu>, spindler@oj.rsmas.miami.edu (todd spindler) writes: |> |>I tried the following program on a Dec Alpha running OSF/1 1.3, |>Dec Fortran T3.4-451: |> |> program bogus |> real aaa /-10./ |> write(*,*) 'log(-10) =', log(aaa) |> end |> |>The problem is that I don't get an error message for calculating the log |>of a negative number. Fortran simply returns the argument value, and |>prints the following line: |> |>log(-10) = -10.00000 |> |>What gives? Ultrix Fortran returns an error message, as does VMS Fortran. |>Is this a bug or a feature? This was also cross-posted to comp.lang.fortran where someone posted a reply saying that the problem no longer occurred in DEC OSF/1 AXP V2.0. -- Steve Lionel Mail: lionel@quark.enet.dec.com DEC Fortran Development WWW: http://www.digital.com/info/slionel.html Digital Equipment Corporation 110 Spit Brook Road, ZKO2-3/N30 Nashua, NH 03062-2698 "Free advice is worth every cent" For a summary of Digital's Internet services, send mail to info@digital.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Possible Alpha f77 Problem 1994-07-31 19:11 Possible Alpha f77 Problem todd spindler 1994-08-01 15:43 ` Steve Lionel @ 1994-08-01 18:47 ` Jim Brown 1994-08-02 6:08 ` Thomas Wright Sysop. UHIBPD 2 siblings, 0 replies; 7+ messages in thread From: Jim Brown @ 1994-08-01 18:47 UTC (permalink / raw) > log(-10) = -10.00000 Fixed in OSF/1 V2.0 and V3.0. -- Jim Brown, University of Miami, RSMAS/MPO [send mail to jim@lime.rsmas.miami.edu] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Possible Alpha f77 Problem 1994-07-31 19:11 Possible Alpha f77 Problem todd spindler 1994-08-01 15:43 ` Steve Lionel 1994-08-01 18:47 ` Jim Brown @ 1994-08-02 6:08 ` Thomas Wright Sysop. UHIBPD 1994-08-02 13:31 ` Craig Neth USG 2 siblings, 1 reply; 7+ messages in thread From: Thomas Wright Sysop. UHIBPD @ 1994-08-02 6:08 UTC (permalink / raw) In article <31gt09$i8d@umigw.miami.edu>, todd spindler <TSpindler@rsmas.miami.edu> wrote: > >I tried the following program on a Dec Alpha running OSF/1 1.3, >Dec Fortran T3.4-451: > > program bogus > real aaa /-10./ > write(*,*) 'log(-10) =', log(aaa) > end > >The problem is that I don't get an error message for calculating the log >of a negative number. Fortran simply returns the argument value, and >prints the following line: > >log(-10) = -10.00000 > >What gives? Ultrix Fortran returns an error message, as does VMS Fortran. >Is this a bug or a feature? > >-- >Todd Spindler |Rosenstiel School of Marine & Atmospheric Science >TSpindler@rsmas.miami.edu|Dept. of Meteorol & Phys Oceanography /U of Miami >--------------------------------------------------------------------------- >Beyond the ken of mortal men, beneath the wind and waves, / Lies a land of >shells and sand, of chasms, crags, and caves, / Where coral castles climb >and soar, where swaying seaweeds grow, / While all around, without a sound, >the ocean currents flow... _Sign of the Seahorse_ by Graeme Base I have a similar yet different problem... This program gives different results (one correct, one incorrect) on different machines (one is a DEC 5000/200 running ULTRIX 4.2, and the other is an DEC ALPHA AXP 3000/300x running OSF/1 v2.0) running different versions of f77 (v3.1 on the 5000, and v3.3 on the 3000). Is this a bug in the f77 v3.3 DEC fortran compiler? ------------------------------------------------------------------------------ PROGRAM TRACK COMMON/ABC/A(10,10),ID(2) ID(1)=1 ID(2)=5 DO 100 I=1,2 M=ID(1) N=ID(2) DO 200 J=1,3 A(J,M)=1.0 WRITE(*,*) I, J, M, N, A(J,M) A(J,N)=2.0 WRITE(*,*) I, J, M, N, A(J,M) 200 CONTINUE 100 CONTINUE END ------------------------------------------------------------------------------- this is the transcript on the 5000: ------------------------------------------------------------------------------- uhibpd.phys.uh.edu> f77 track.f uhibpd.phys.uh.edu> a.out 1 1 1 5 1.000000 1 1 1 5 1.000000 1 2 1 5 1.000000 1 2 1 5 1.000000 1 3 1 5 1.000000 1 3 1 5 1.000000 2 1 1 5 1.000000 2 1 1 5 1.000000 2 2 1 5 1.000000 2 2 1 5 1.000000 2 3 1 5 1.000000 2 3 1 5 1.000000 uhibpd.phys.uh.edu> ------------------------------------------------------------------------------- the output is correct this is the transcript from the 3000: ------------------------------------------------------------------------------- UHHEP> f77 track.f UHHEP> a.out 1 1 1 5 1.000000 1 1 1 5 2.000000 1 2 1 5 1.000000 1 2 1 5 2.000000 1 3 1 5 1.000000 1 3 1 5 2.000000 2 1 1 5 1.000000 2 1 1 5 2.000000 2 2 1 5 1.000000 2 2 1 5 2.000000 2 3 1 5 1.000000 2 3 1 5 2.000000 UHHEP> ------------------------------------------------------------------------------- A(J,N) is overwriting A(J,M) another trans. from the 3000: ------------------------------------------------------------------------------- UHHEP> f77 -O track.f UHHEP> a.out 1 1 1 5 1.000000 1 1 1 5 2.000000 1 2 1 5 1.000000 1 2 1 5 2.000000 1 3 1 5 1.000000 1 3 1 5 2.000000 2 1 1 5 1.000000 2 1 1 5 2.000000 2 2 1 5 1.000000 2 2 1 5 2.000000 2 3 1 5 1.000000 2 3 1 5 2.000000 UHHEP> ------------------------------------------------------------------------------- still wrong... but with -check bounds: ------------------------------------------------------------------------------- UHHEP> f77 -check bounds track.f UHHEP> a.out 1 1 1 5 1.000000 1 1 1 5 1.000000 1 2 1 5 1.000000 1 2 1 5 1.000000 1 3 1 5 1.000000 1 3 1 5 1.000000 2 1 1 5 1.000000 2 1 1 5 1.000000 2 2 1 5 1.000000 2 2 1 5 1.000000 2 3 1 5 1.000000 2 3 1 5 1.000000 UHHEP> ------------------------------------------------------------------------------- the output is correct... why? And why won't it work with no options? here, with -check all: ------------------------------------------------------------------------------- UHHEP> f77 -check all track.f UHHEP> a.out 1 1 1 5 1.000000 1 1 1 5 1.000000 1 2 1 5 1.000000 1 2 1 5 1.000000 1 3 1 5 1.000000 1 3 1 5 1.000000 2 1 1 5 1.000000 2 1 1 5 1.000000 2 2 1 5 1.000000 2 2 1 5 1.000000 2 3 1 5 1.000000 2 3 1 5 1.000000 UHHEP> ------------------------------------------------------------------------------- it works too... Any ideas? Thomas Wright t-mas@uhibpd.phys.uh.edu System Administrator for UHIBPD and UHHEP... COMBINED!! (can your beer do this) P.S. I installed DEC F77 v3.4 and the problem disappered... ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Possible Alpha f77 Problem 1994-08-02 6:08 ` Thomas Wright Sysop. UHIBPD @ 1994-08-02 13:31 ` Craig Neth USG 1994-08-02 20:13 ` Thomas Wright Sysop. UHIBPD 0 siblings, 1 reply; 7+ messages in thread From: Craig Neth USG @ 1994-08-02 13:31 UTC (permalink / raw) In article <31knsb$40g@masala.cc.uh.edu>, t-mas@uhibpd.phys.uh.edu (Thomas Wright Sysop. UHIBPD) writes: [... bunch of stuff about log(-10.0) not returning an error ...] As near as we can tell, this is probably caused by a bug in the math library on OSF V1.3. As several posters have pointed out, it is fixed in OSF V2.0. |>I have a similar yet different problem... |> |> This program gives different results (one correct, one incorrect) on |>different machines (one is a DEC 5000/200 running ULTRIX 4.2, and the other is |>an DEC ALPHA AXP 3000/300x running OSF/1 v2.0) running different versions of |>f77 (v3.1 on the 5000, and v3.3 on the 3000). Is this a bug in the f77 v3.3 |>DEC fortran compiler? [... Examples deleted ...] |>P.S. I installed DEC F77 v3.4 and the problem disappered... You answered your own question. It appears to be a bug in the optimizer of the V3.3 compiler, which is fixed in V3.4. The Fortran people tell me that there were some optimizer problems in V3.3 that were related to code similiar to your example. These problems were fixed in V3.4. Is there some reason you cannot use V3.4 or were you just curious? -- -------------------------------------------------------------------------------- Craig Neth ! neth@zk3.dec.com Digital Equipment Corporation ! 110 Spit Brook Road ZKO3-3/Y25 ! Nashua, NH 03062 ! Opinions expressed herein are my own. ================================================================================ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Possible Alpha f77 Problem 1994-08-02 13:31 ` Craig Neth USG @ 1994-08-02 20:13 ` Thomas Wright Sysop. UHIBPD 1994-08-02 21:38 ` Craig Neth USG 0 siblings, 1 reply; 7+ messages in thread From: Thomas Wright Sysop. UHIBPD @ 1994-08-02 20:13 UTC (permalink / raw) In article <31lhr9$m2s@jac.zko.dec.com>, Craig Neth USG <neth@granda.zk3.dec.com> wrote: > > >You answered your own question. It appears to be a bug in the optimizer >of the V3.3 compiler, which is fixed in V3.4. The Fortran people tell >me that there were some optimizer problems in V3.3 that were related to >code similiar to your example. These problems were fixed in V3.4. > >Is there some reason you cannot use V3.4 or were you just curious? > >-- >-------------------------------------------------------------------------------- >Craig Neth ! neth@zk3.dec.com >Digital Equipment Corporation ! >110 Spit Brook Road ZKO3-3/Y25 ! >Nashua, NH 03062 ! Opinions expressed herein are my own. >================================================================================ I was really just curious. Fortunately, the "bug" was fixed just in time for us. We have just bought an Alpha to do a lot of scientific analysis with a fortran program. If this had been 6 months ago, we would have been wasting a lot of time and effort on a program that worked. As it turns out, we only wasted 2 weeks on this. I suppose that we are not the only ones who this happened to. Another curiousity that I have is wheather or not DEC knew about this "bug" or not. I resently had problems with the nroff program which DEC gave me the fix for. I just wish that they had put that fix on the internet, that way I would have known about it and fixed it before the man program crashed. ahhhhhhh... I'm glad I got that off my chest. BTW, these comments were not really directed toward you, craig. Thomas Wright t-mas@uhibpd.phys.uh.edu System Administrator for UHIBPD and UHHEP... COMBINED!! (can your beer do this) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Possible Alpha f77 Problem 1994-08-02 20:13 ` Thomas Wright Sysop. UHIBPD @ 1994-08-02 21:38 ` Craig Neth USG 0 siblings, 0 replies; 7+ messages in thread From: Craig Neth USG @ 1994-08-02 21:38 UTC (permalink / raw) In article <31m9dc$m46@masala.cc.uh.edu>, t-mas@uhibpd.phys.uh.edu (Thomas Wright Sysop. UHIBPD) writes: |> I was really just curious. Fortunately, the "bug" was fixed just in |>time for us. We have just bought an Alpha to do a lot of scientific analysis |>with a fortran program. If this had been 6 months ago, we would have been |>wasting a lot of time and effort on a program that worked. As it turns out, we |>only wasted 2 weeks on this. I suppose that we are not the only ones who this |>happened to. I'm glad it got to you in time, and sorry to hear you wasted so much time on it. The DEC Fortran people really do try very hard not to ship bugs like this, and when one slips out, they generally make update kits that the support people can make available to people who need them. |> Another curiousity that I have is wheather or not DEC knew about this |>"bug" or not. I resently had problems with the nroff program which DEC gave me |>the fix for. I just wish that they had put that fix on the internet, that way |>I would have known about it and fixed it before the man program crashed. If you have a support contract, the customer support people can tell you if it's a known problem and if any patches are available. Also, Digital has an internet patch service on the Web; check out http://www.service.digital.com/ Using the search engine I found a reference to a patch for nroff for OSF V2.0 (which I presume is the problem you mentioned above). |> ahhhhhhh... I'm glad I got that off my chest. |> BTW, these comments were not really directed toward you, craig. I know, no problem. -------------------------------------------------------------------------------- Craig Neth ! neth@zk3.dec.com Digital Equipment Corporation ! 110 Spit Brook Road ZKO3-3/Y25 ! Nashua, NH 03062 ! Opinions expressed herein are my own. ================================================================================ ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~1994-08-02 21:38 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 1994-07-31 19:11 Possible Alpha f77 Problem todd spindler 1994-08-01 15:43 ` Steve Lionel 1994-08-01 18:47 ` Jim Brown 1994-08-02 6:08 ` Thomas Wright Sysop. UHIBPD 1994-08-02 13:31 ` Craig Neth USG 1994-08-02 20:13 ` Thomas Wright Sysop. UHIBPD 1994-08-02 21:38 ` Craig Neth USG
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox