[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20011206: installing netCDf 3.5 on NEC-SX5: netcdf.f90 errors



Stefan,

>Date: Thu, 06 Dec 2001 15:16:30 +0100
>From: Stefan Melber <address@hidden>
>Organization: DLR Braunschweig
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20011204: using NetCDF 3.4 on NEC-SX5: "not a NetCDF-file"
>Keywords: 200111300742.fAU7gvN29708

The above message contained the following:

> i send to you the man-pages of SX5 cc, f90 and cpp. You will find them
in the attached zip file.
>
> The -Xa and -h2 options are the "standart ANSI-C" and an "optimize"
> switch ... please have a look in the attached man-pages ...
>
> I increased the memory and now the Fortran-Part runs - o.k. there is a
> problem in the "netcdf.f90" ... dont know, what happens...

The "configure.log" file contained the following:

    checking for Fortran "byte"... no
    checking for Fortran "integer*1"... no
    checking for Fortran "integer(kind(1))"... yes
    checking for Fortran "integer*2"... yes
    checking if Fortran "integer(kind(1))" is C "signed char"... no
    checking if Fortran "integer(kind(1))" is C "short"... no
    checking if Fortran "integer(kind(1))" is C "int"... yes
    checking if Fortran "integer(kind(1))" is C "long"... no
    checking if Fortran "integer*2" is C "short"... no
    checking if Fortran "integer*2" is C "int"... yes
    checking if Fortran "integer*2" is C "long"... no
    checking if Fortran "integer" is C "int"... yes
    checking if Fortran "real" is C "float"... yes
    checking if Fortran "doubleprecision" is C "double"... yes
    ...
    checking size of short... 2
    checking size of int... 4
    checking size of long... 8
    checking size of float... 4
    checking size of double... 8

The above indicates that the Fortran-90 types "integer(kind(1))",
"integer*2", and "integer" are all 4-byte integers. This means that the
Fortran-90 comiler will be unable to distinquish between the various
concrete implementations of generic I/O routines that differ only in
the type of an integral "value" argument. We see this later in the
"make.log" file:

    f90: error(746): netcdf.f90, line 53: Specific procedure 
                                          "nf90_get_var_fourbyteint" and 
                                          "nf90_get_var_onebyteint" in same 
generic 
                                          interface can not be distinguished.

I have only two suggestions:

    1.  Don't build the Fortran-90 interface. This is done by setting
        the environment variable F90 to the empty string and performing
        steps 2 through 9 near the end of the file INSTALL.html.

or

    2.  Edit the Fortran-90 interface source-files, removing all
        references to 1- and 2-byte integers.  This might be as simple as
        removing those routines in file "f90/netcdf.f90" that reference
        such integers.  I'm willing to work with you on this.

Please let me know which option you want.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>