public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32404]  New: Wrong-code with sbdart (valgrind errors, different output)
@ 2007-06-19 15:29 burnus at gcc dot gnu dot org
  2007-06-20  9:41 ` [Bug fortran/32404] " fxcoudert at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-19 15:29 UTC (permalink / raw)
  To: gcc-bugs

Spin off from PR 32236.

ftp://ftp.icess.ucsb.edu/pub/esrg/sbdart/sbdart_2.4.tar.gz (33181 lines of
code)

Unpack source and do:
- Delete in tauaero.f:1601 the line
      data wlbaer/0.,0./
- Insert around drt.f:951 the lines
  weq = 0.0_kr
  wfull = 0.0_kr

If one compiles (-O0) the program with g95, sunf95, ifort and gfortran (4.1.3,
4.2.0, 4.3) and compares the output, one finds (drf.f, subroutine stdout1):

- sunf95, ifort and g95 produce identical output except for the 7th column

- gfortran's output differs also in the 7th column, but starting from some row
it also differs in the 4th column; the results for the 4th column are different
depending on the gfortran version

A possible reason might be that some variable has not been initialized,
however, using ifort -check all I could only find the two problems above (weq,
wfull) and "g95" and "g95 -freal=nan -flogical=true -finteger=123456
-pointer=invalid" give the same result.

Some further debugging (in drf.f's stdout1) shows that topup - or more
precisely flup(ntop) - diverges at some point. flup is set via DISORT
(disort.f).

Both g95 and gfortran show quite a lot of uninitialized warnings in valgrind
(over 30), ifort only shows two, sunf95 four.


-- 
           Summary: Wrong-code with sbdart (valgrind errors, different
                    output)
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32404


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/32404] Wrong-code with sbdart (valgrind errors, different output)
  2007-06-19 15:29 [Bug fortran/32404] New: Wrong-code with sbdart (valgrind errors, different output) burnus at gcc dot gnu dot org
@ 2007-06-20  9:41 ` fxcoudert at gcc dot gnu dot org
  2007-06-20 17:04 ` burnus at gcc dot gnu dot org
  2007-06-20 20:00 ` burnus at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-06-20  9:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from fxcoudert at gcc dot gnu dot org  2007-06-20 09:41 -------
I can reproduce what you see, nor make any sense of the instructions comparing
the outputs: when I do what you indicate, all I see in the output is a
namelist-type of scalar values:

&INPUT
 IDATM=          4,
 AMIX= -1.00000000000000     ,
 ISAT=          0,
 WLINF= 0.550000011920929     ,
 WLSUP= 0.550000011920929     ,
 WLINC=  0.00000000000000     ,
 SZA=  0.00000000000000     ,
 CSZA= -1.00000000000000     ,
 SOLFAC=  1.00000000000000     ,
 NF=          2,
 IDAY=          0,
 TIME=  16.0000000000000     ,
 ALAT= -64.7669982910156     ,     
 ALON= -64.0670013427734     ,     
 ZPRES= -1.00000000000000     ,      
 PBAR= -1.00000000000000     ,    
 SCLH2O= -1.00000000000000     ,  
 UW= -1.00000000000000     ,
 UO3= -1.00000000000000     ,
 O3TRP= -1.00000000000000     ,
 ZTRP=  0.00000000000000     , 
 XRSC=  1.00000000000000     , 
 XN2= -1.00000000000000     ,
 XO2= -1.00000000000000     ,
 XCO2= -1.00000000000000     ,  
 XCH4= -1.00000000000000     ,
 XN2O= -1.00000000000000     ,
 XCO= -1.00000000000000     , 
 XNO2= -1.00000000000000     ,
 XSO2= -1.00000000000000     ,
 XNH3= -1.00000000000000     ,   
 XNO= -1.00000000000000     ,
 XHNO3= -1.00000000000000     ,
 XO4=  1.00000000000000     ,   
 ISALB=          0,
 ALBCON=  0.00000000000000     ,
 SC= 5*3.402823466385289E+038 ,
 ZCLOUD= 5*0.00000000000000       ,
 TCLOUD= 5*0.00000000000000       ,
 LWP= 5*0.00000000000000       ,
 NRE= 5*8.00000000000000       ,
 RHCLD= -1.00000000000000     ,
 KRHCLR=          0,
 JAER= 5*0          ,
 ZAER= 5*0.00000000000000       ,
 TAERST= 5*0.00000000000000       ,
 IAER=          0,
 VIS= -1.00000000000000     ,
 RHAER= -1.00000000000000     ,
 TBAER= -1.00000000000000     ,
 WLBAER= 150*-1.00000000000000      ,
 QBAER= 150*-1.00000000000000      ,
 ABAER=  0.00000000000000     ,
 WBAER= 150*-1.00000000000000      ,
 GBAER= 150*-1.00000000000000      ,
 PMAER= 44850*-1.00000000000000      ,
 ZBAER= 65*-1.00000000000000      ,
 DBAER= 65*-1.00000000000000      ,
 NOTHRM=         -1,
 NOSCT=          0,
 KDIST=          3,
 ZGRID1=  1.00000000000000     ,
 ZGRID2=  30.0000000000000     ,
 NGRID=          0,
 IDB= 20*0          ,
 ZOUT=  0.00000000000000     ,  100.000000000000     ,
 IOUT=         10,
 PRNT= 7*F,
 TEMIS=  0.00000000000000     ,
 NSTR=          0,
 NZEN=          0,
 UZEN= 40*-1.00000000000000      ,
 VZEN= 40*90.0000000000000       ,
 NPHI=          0,
 PHI= 40*-1.00000000000000      ,
 SAZA=  180.000000000000     ,
 IMOMC=          3,
 IMOMA=          3,
 TTEMP= -1.00000000000000     ,
 BTEMP= -1.00000000000000     ,
 CORINT=F,
 SPOWDER=F,  /

What do you call columns in this output?


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
           Keywords|wrong-code                  |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32404


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/32404] Wrong-code with sbdart (valgrind errors, different output)
  2007-06-19 15:29 [Bug fortran/32404] New: Wrong-code with sbdart (valgrind errors, different output) burnus at gcc dot gnu dot org
  2007-06-20  9:41 ` [Bug fortran/32404] " fxcoudert at gcc dot gnu dot org
@ 2007-06-20 17:04 ` burnus at gcc dot gnu dot org
  2007-06-20 20:00 ` burnus at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-20 17:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2007-06-20 17:03 -------
> I can reproduce what you see, nor make any sense of the instructions comparing
"cannot" I presume
> the outputs: when I do what you indicate, all I see in the output is a
> namelist-type

I knew I would forget something. I did run "bash test_runs" before, which
creates the "INPUT" files. The last "INPUT" file (which I therefore used) was

 &INPUT
  tcloud = 15
  zcloud = 1
  wlinf  = .72
  wlsup  = .72
  idatm  = 1
  isalb  = 4
  sza    = 60
  iout   = 23
  nstr   = 20
  uzen=  5,15,25,35,45,55,65,75,85,95,105,115,125,135,145,155,165,175
  phi=0,15,30,45,60,75,90,105,120,135,150,165,180 /


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-06-20 17:03:56
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32404


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/32404] Wrong-code with sbdart (valgrind errors, different output)
  2007-06-19 15:29 [Bug fortran/32404] New: Wrong-code with sbdart (valgrind errors, different output) burnus at gcc dot gnu dot org
  2007-06-20  9:41 ` [Bug fortran/32404] " fxcoudert at gcc dot gnu dot org
  2007-06-20 17:04 ` burnus at gcc dot gnu dot org
@ 2007-06-20 20:00 ` burnus at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-20 20:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from burnus at gcc dot gnu dot org  2007-06-20 20:00 -------
Close as INVALID.

Paul had the tip to try  "-fno-automatic"; with this option ifort and gfortran
produce identical output.

-fno-automatic
Treat each program unit as if the "SAVE" statement was specified for every
local variable and array referenced in it. Does not affect common blocks. (Some
Fortran compilers provide this option under the name -static.)


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32404


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-20 20:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-19 15:29 [Bug fortran/32404] New: Wrong-code with sbdart (valgrind errors, different output) burnus at gcc dot gnu dot org
2007-06-20  9:41 ` [Bug fortran/32404] " fxcoudert at gcc dot gnu dot org
2007-06-20 17:04 ` burnus at gcc dot gnu dot org
2007-06-20 20:00 ` burnus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).