Opened 18 years ago

Closed 16 years ago

#86 closed defect (fixed)

Error reported by NAG Linux compiler in ropp_1dvar_pge.f90

Reported by: Dave Offiler Owned by: Dave Offiler
Priority: normal Milestone: 1.2
Component: ropp_1dvar Version: 0.8
Keywords: NAG Linux 1DVAR PGE Cc: dave.offiler@…, michael.rennie@…

Description (last modified by marq)

f95 -I../build  -O3 -dusty -I/data/nwp1/grassaf/ropp/nag//include -c -o ropp_1dvar_pge.o `test -f '../qc/ropp_1dvar_pge.f90' || echo './'`../qc/ropp_1dvar_pge.f90
../qc/ropp_1dvar_pge.f90: In function `ropp_1dvar_pge_1dbangle_':
../qc/ropp_1dvar_pge.f90:111: error: request for member `weights_' in something not a structure or union
../qc/ropp_1dvar_pge.f90: In function `ropp_1dvar_pge_1drefrac_':
../qc/ropp_1dvar_pge.f90:162: error: request for member `weights_' in something not a structure or union
make[1]: *** [ropp_1dvar_pge.o] Error 1

Change history (6)

comment:1 by Dave Offiler, 18 years ago

Status: newassigned

In ropp_1dvar_pge.f90 subroutine ropp_1dvar_pge_1dbangle (similar code exists in ropp_1dvar_pge_1drefrac):

! 2.4 Set PGE weights
! -------------------

  if (config % pge_apply) then
     where (obs % weights > 0)
        obs % weights = diag % pge_weights        <=== line 111/162
     end where
  endif

Error is generated for NAG under RHEL4 (V5.0) and RH9 (v4.2). Optimisaiton level has no effect. NAG HP-UX also complains:

$ f95 -I ../build -I/data/nwp1/grassaf/ropp/hpnag/include -c ropp_1dvar_pge.f90
cc: "ropp_1dvar_pge.f90", line 111: error 1529: Cannot select field of non-structure.
cc: "ropp_1dvar_pge.f90", line 162: error 1529: Cannot select field of non-structure.

(it actually generates 3 identical messages per line; deleted here for clarity)

Changing the key lines to:

        obs % weights(:) = diag % pge_weights(:)

allows compilation without the error messages. However, this might not allow correct masking from the WHERE test, so probably isn't a solution.

Also,

        obs % weights = 0

also makes the error messages go away. So the apparant error may not be directly related to 'obs' but to 'diag'? Something related to the fact that obs%weights is a pointer? Is this NAG being overly picky, an out-and-out compiler bug or a piece of code that looks correct but is in fact is a bit dodgy to the F95 standard? [This source file compiles with no problems with ifort (v9), pgf90 & g95; gfc has an internal bug before getting this far...]

comment:2 by marq, 18 years ago

Cc: dave.offiler@… added
Description: modified (diff)

In [1006], I have added a proper initialisation to the pointers in the VarDiag struct, but I don't believe that this will make any difference. How old are the compilers that throw the error messages? Unfortunately, I don't have access to either NAG nor HP UX.

comment:3 by Dave Offiler, 18 years ago

Linux NAG:

$ f95 -V
NAGWare Fortran 95 compiler Release 5.0(361)
Copyright 1990-2004 The Numerical Algorithms Group Ltd., Oxford, U.K

This compiler was updated to the latest stable (though maybe not cutting-edge latest) version with RHEL4 new deskop. The old Linux NAG was the same as the HP one (which will not be updated as the R&D HP-UX boxes will be gone in a matter of months.

HP NAG:

$ f95 -V
NAGWare Fortran 95 compiler Release 4.2(505)
Copyright 1990-2002 The Numerical Algorithms Group Ltd., Oxford, U.K.

The error with Linux NAG (v5.0) remains:

f95 -I../build  -O3 -dusty -I/data/nwp1/grassaf/ropp/nag/include -c -o ropp_qc_pge.o `test -f '../qc/ropp_qc_pge.f90' || echo './'`../qc/ropp_qc_pge.f90
../qc/ropp_qc_pge.f90: In function `ropp_qc_pge_1dbangle_':
../qc/ropp_qc_pge.f90:111: error: request for member `weights_' in something not a structure or union
../qc/ropp_qc_pge.f90: In function `ropp_qc_pge_1drefrac_':
../qc/ropp_qc_pge.f90:162: error: request for member `weights_' in something not a structure or union
make[1]: *** [ropp_qc_pge.o] Error 1

comment:4 by Dave Offiler, 18 years ago

Version: 0.8

comment:5 by Huw Lewis, 17 years ago

Milestone: 1.11.2

Testing with NAG linux compiler for v1.1 passed all tests successfully on linux. No testing on HP was attempted - will leave ticket as open for HP testing with v1.2.

comment:6 by Huw Lewis, 16 years ago

Resolution: fixed
Status: assignedclosed

Testing with NAG linux compiler (v5.1) passed all tests successfully on linux for both v1.1 and v1.2. HP-UX is no longer supported. Further investigation of HP NAG therefore not possible. Ticket closed.

Note: See TracTickets for help on using tickets.