Hi Steve,
> I'm not a heavy netcdf user (although I'm writing some netcdf code
> for reading LAPS output files) but I maintain the netcdf ebuild for
> Gentoo, as well as build rpms for RedHat/fedora/cAos, etc.
>
> The netcdf rpm I built recently on RHAS 2.1 (which still uses gcc
> 2.9.6) seemed to build fine, and I didn't notice any warnings like
> below, however, when updating the netcdf ebuild on Gentoo, I saw a
> slew of warnings druing the fortran test.
>
> My current Gentoo desktop has gcc 3.3.3 and g77 (no f90 compiler),
> with some of the output pasted below:
...
> ftest.F:187: warning:
> call ncagt (outcdf, NCBYTE, attnam, bytval, iret)
> 1
> ftest.F:196: (continued):
> call ncagt (outcdf, NCGLOBAL, attnam, shval, iret)
> 2
> Argument #4 of `ncagt' is one precision at (2) but is some other
> precision at (1) [info -f g77 M GLOBALS] ftest.F:187: warning:
> call ncagt (outcdf, NCBYTE, attnam, bytval, iret)
> 1
> ftest.F:198: (continued):
> call ncagt (outcdf, NCGLOBAL, attnam, lngval, iret)
> 2
> Argument #4 of `ncagt' is one precision at (2) but is some other
> precision at (1) [info -f g77 M GLOBALS]
...
> It seems like type/precision errors might cause a problem at some
> point, but what do I know? Maybe they're benign...
I think these are benign and unavoidable with the netCDF-2 interface
in Fortran77, which is what this is testing. The netCDF-2 interface
was the early Fortran interface that used the same parameter for data
of multiple types:
SUBROUTINE NCAGT (INTEGER NCID, INTEGER VARID,
+ CHARACTER*(*) ATTNAM, type VALUES,
+ INTEGER RCODE)
where
VALUES
Returned attribute values. All elements of the vector of attribute
values are returned, so you must provide enough space to hold
them. If you don't know how much space to reserve, call NCAINQ first
to find out the length of the attribute. Warning: neither the
compiler nor the netCDF software can detect if the wrong type of
data is used.
was a container for any numeric type of values (INTEGER, REAL,
DOUBLEPRECISION, ...), using knowledge that Fortran argument passing
is by address. The equivalent C argument would be a void*. The later
netCDF-3 interface employed type-safe interfaces for Fortran by using
lots more functions, but we still want to support the old netCDF-2
interfaces forever, and there is no way to test such interfaces
without violating picky compiler rules about types always matching on
different calls to the same function.
> PS. I'll test it with gcc 3.4 and see what happens, and the next
> version after 3.4 should have gfortran.
I suspect these potential errors will still be reported, since being
loose with types as in these tests is often a symptom of an error, but
not in this case ...
--Russ
_____________________________________________________________________
Russ Rew UCAR Unidata Program
russ@xxxxxxxxxxxxxxxx http://www.unidata.ucar.edu/staff/russ
>From owner-netcdfgroup@xxxxxxxxxxxxxxxx 14 2004 May -0600 13:03:30
Message-ID: <wrx1xlm4yrh.fsf@xxxxxxxxxxxxxxxxxxxxxxx>
Date: 14 May 2004 13:03:30 -0600
From: Ed Hartnett <ed@xxxxxxxxxxxxxxxx>
In-Reply-To: <200307221454.h6MEsbLd015314@xxxxxxxxxxxxxxxx>
To: netcdfgroup@xxxxxxxxxxxxxxxx
Subject: some questions for windows developers using netCDF...
Received: (from majordo@localhost)
by unidata.ucar.edu (UCAR/Unidata) id i4EJ3V71023738
for netcdfgroup-out; Fri, 14 May 2004 13:03:31 -0600 (MDT)
Organization: UCAR/Unidata
Keywords: 200405141903.i4EJ3UtK023715
Lines: 23
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: owner-netcdfgroup@xxxxxxxxxxxxxxxx
Precedence: bulk
Reply-To: Ed Hartnett <ed@xxxxxxxxxxxxxxxx>
Howdy All NetCDF Users!
As my helicopter was landing on the heliport atop UCAR Towers, I
wondered about netCDF users on Windows.
If you use netCDF in your windows development, could you drop me a
quick email answering some questions?
1 - What C development environment did you use to compile netCDF?
(VC++ 6.0? Some other version of VC++? Or some other C compiler?)
2 - What version of windows are you using? 2000? XP? 95/98?
3 - Do you use the fortran interface? If so, with what fortran
development environment? MS Fortran? Portland Group? Lahey? Compaq?
Any answers would be appreciated!
Thanks,
Ed Hartnett, Unidata