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

970520: netcdf 3.3 with gcc



Kate,

> To: address@hidden
> From: Kate Hedstrom <address@hidden>
> Subject: netcdf 3.3 with gcc
> Organization: Rutgers University
> Keywords: 199705171514.JAA09636

In the above message, you wrote:

> You probably don't want to hear this, but I have been trying netcdf 3.3
> with gcc and Sun f77 1.x because that is the version of f77 that works
> with our favorite debugger, prism (from Thinking Machines).  I had to
> change a few things because memmove and RAND_MAX are not available

Ah, the problems of a non-standard environment.  :-)

It's not your fault.  SunOS 4 just isn't a standard environment -- even
when using gcc(1).

> so I have included my patch.

Nice patch.  Are you aware, however, that if you use SunOS 4's System V
environment/library that RAND_MAX should be 2^15-1 instead of 2^31-1 --
even when using gcc(1)?

> It passes "make test" except in the nf_test
> directory, but "make test" in nc_test is unbelievably slow.

How slow is "unbelievably" slow?

> I have
> tried to figure out why nf_test is dumping core, but have not
> succeeded.  I don't expect you to figure this out, but wanted you to
> know about the gcc changes.

I believe the reason it crashes has to do with the way the FORTRAN
runtime is (mis)handling the value conversion errors (e.g. converting an
out-of-range double into a signed byte).  I'll investigate.

Thank you for this feedback.  It will help improve netCDF 3.

[I'm including the rest of your message for the benefit of people
browsing our on-line support email archive.]

> 
> Kate
> 
> 1. uname -a
> SunOS nemo.rutg 4.1.3 3 sun4m
> 
> 2. VERSION
> 3.3
> 
> 3. config.out
> loading cache ./config.cache
> checking for m4... m4
> checking user-defined C compiler "gcc"
> checking C compiler... works
> checking for how to make dependencies... cc -M
> checking for g++... g++
> checking C++ compiler "g++"... works
> checking user-defined FORTRAN compiler "oldf77"... works
> checking for math library
> checking for -lc... no
> checking for -lm... yes
> checking FORTRAN-type equivalent to netCDF "byte"... byte
> checking FORTRAN-type equivalent to C "signed char"... byte
> checking FORTRAN fill-value for netCDF version 2 byte... -127
> checking FORTRAN-type equivalent to netCDF "short"... integer*2
> checking FORTRAN-type equivalent to C "short"... integer*2
> checking FORTRAN-type equivalent to netCDF "long"... integer*4
> checking FORTRAN-type equivalent to C "int"... integer
> checking FORTRAN-type equivalent to netCDF "float"... real*4
> checking FORTRAN-type equivalent to C "float"... real*4
> checking FORTRAN-type equivalent to netCDF "double"... real*8
> checking FORTRAN-type equivalent to C "double"... real*8
> checking for ar... ar
> checking for ranlib... ranlib
> checking how to run the C preprocessor... gcc -E
> checking for stdlib.h... yes
> checking for sys/types.h... yes
> checking for strerror... yes
> checking for ftruncate... yes
> checking for st_blksize in struct stat... yes
> checking whether cross-compiling... no
> checking for IEEE floating point format... yes
> checking for ANSI C header files... no
> checking for size_t... yes
> checking for off_t... yes
> checking for ssize_t... no
> checking for ptrdiff_t... yes
> checking for uchar... no
> checking whether char is unsigned... no
> checking whether byte ordering is bigendian... yes
> checking size of short... 2
> checking size of int... 4
> checking size of long... 4
> checking size of float... 4
> checking size of double... 8
> checking size of off_t... 4
> checking size of size_t... 4
> checking for command to create manual-page index... catman -w -M $(MANDIR)
> checking binary distribution directory... /home/ftp/pub/binary/dummy_system
> updating cache ./config.cache
> creating ./config.status
> creating macros.make
> creating libsrc/ncconfig.h
> creating fortran/netcdf-cpp.inc
> 
> 4. config.log
> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.
> 
> configure:989: gcc -c -g -DNDEBUG conftest.c 1>&5
> configure:1117: g++ -c  -DNDEBUG conftest.C 1>&5
> configure:1224: oldf77 -c -g -Nl40 -w conftest.f
> conftest.f:
>  MAIN:
> configure:1313: oldf77 -c -g -Nl40 -w conftest.F
> /tmp/cpp.15634.0.f:
>       foo:
> configure:1345: gcc -o conftest -g -DNDEBUG  conftest.c -lc   1>&5
> collect2: ld returned 2 exit status
> ld: Undefined symbol 
>    _tanh 
> configure:1379: gcc -o conftest -g -DNDEBUG  conftest.c -lm   1>&5
> configure:1421: oldf77 -c -g -Nl40 -w conftest.f
> conftest.f:
>  MAIN:
> configure:1448: oldf77 -c -g -Nl40 -w conftest.f
> conftest.f:
>       sub:
> configure:1465: gcc -o conftest -DNDEBUG -g  conftest.c conftestf.o 
> conftest.c: In function `main':
> conftest.c:4: warning: return type of `main' is not `int'
> configure:1475: ./conftest
> configure:1512: oldf77 -c -g -Nl40 -w conftest.f
> conftest.f:
>  MAIN:
> configure:1539: oldf77 -c -g -Nl40 -w conftest.f
> conftest.f:
>       sub:
> configure:1556: gcc -o conftest -DNDEBUG -g  conftest.c conftestf.o 
> conftest.c: In function `main':
> conftest.c:4: warning: return type of `main' is not `int'
> configure:1566: ./conftest
> configure:1591: oldf77 -c -g -Nl40 -w conftest.f
> conftest.f:
>  MAIN:
> configure:1618: oldf77 -c -g -Nl40 -w conftest.f
> conftest.f:
>       sub:
> configure:1635: gcc -o conftest -DNDEBUG -g  conftest.c conftestf.o 
> conftest.c: In function `main':
> conftest.c:4: warning: return type of `main' is not `int'
> configure:1645: ./conftest
> configure:1670: oldf77 -c -g -Nl40 -w conftest.f
> conftest.f:
>  MAIN:
> configure:1697: oldf77 -c -g -Nl40 -w conftest.f
> conftest.f:
>       sub:
> configure:1714: gcc -o conftest -DNDEBUG -g  conftest.c conftestf.o 
> conftest.c: In function `main':
> conftest.c:4: warning: return type of `main' is not `int'
> configure:1724: ./conftest
> configure:1749: oldf77 -c -g -Nl40 -w conftest.f
> conftest.f:
>  MAIN:
> configure:1776: oldf77 -c -g -Nl40 -w conftest.f
> conftest.f:
>       sub:
> configure:1793: gcc -o conftest -DNDEBUG -g  conftest.c conftestf.o 
> conftest.c: In function `main':
> conftest.c:4: warning: return type of `main' is not `int'
> configure:1803: ./conftest
> configure:1898: gcc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:1944: gcc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:1978: gcc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:2028: gcc -o conftest -g -DNDEBUG  conftest.c  1>&5
> configure:2076: gcc -o conftest -g -DNDEBUG  conftest.c  1>&5
> configure:2110: gcc -c -g -DNDEBUG conftest.c 1>&5
> configure:2142: gcc -o conftest -g -DNDEBUG  conftest.c  1>&5
> configure:2194: gcc -o conftest -g -DNDEBUG  conftest.c  1>&5
> configure:2223: gcc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:2544: gcc -c -g -DNDEBUG conftest.c 1>&5
> configure: In function `t':
> configure:2539: `bogus' undeclared (first use this function)
> configure:2539: (Each undeclared identifier is reported only once
> configure:2539: for each function it appears in.)
> configure:2539: parse error before `endian'
> configure:2590: gcc -o conftest -g -DNDEBUG  conftest.c  1>&5
> configure:2628: gcc -o conftest -g -DNDEBUG  conftest.c  1>&5
> configure:2662: gcc -o conftest -g -DNDEBUG  conftest.c  1>&5
> configure:2696: gcc -o conftest -g -DNDEBUG  conftest.c  1>&5
> configure:2730: gcc -o conftest -g -DNDEBUG  conftest.c  1>&5
> configure:2764: gcc -o conftest -g -DNDEBUG  conftest.c  1>&5
> configure:2802: gcc -o conftest -g -DNDEBUG  conftest.c  1>&5
> configure:2840: gcc -o conftest -g -DNDEBUG  conftest.c  1>&5
> 
> 5. make.out
> make[1]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src'
> 
> Making `all' in directory /d0/kate/netcdf/netcdf-3.3/src/libsrc
> 
> make[2]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src/libsrc'
> gcc -c -g -I.  -DNDEBUG attr.c
> gcc -c -g -I.  -DNDEBUG dim.c
> gcc -c -g -I.  -DNDEBUG error.c
> gcc -c -g -I.  -DNDEBUG -DVERSION=`cat ../VERSION` libvers.c
> gcc -c -g -I.  -DNDEBUG nc.c
> gcc -c -g -I.  -DNDEBUG ncio.c
> gcc -c -g -I.  -DNDEBUG ncx.c
> gcc -c -g -I.  -DNDEBUG putget.c
> gcc -c -g -I.  -DNDEBUG string.c
> gcc -c -g -I.  -DNDEBUG v1hpg.c
> gcc -c -g -I.  -DNDEBUG v2i.c
> gcc -c -g -I.  -DNDEBUG var.c
> ar cru         libnetcdf.a attr.o dim.o error.o libvers.o nc.o ncio.o ncx.o 
> putget.o string.o v1hpg.o v2i.o var.o
> ranlib libnetcdf.a
> m4 -B7168 -DAPI=C ../man/netcdf.m4 >netcdf.3  || rm netcdf.3
> m4:../man/netcdf.m4:374: warning: too few arguments to built-in `include'
> m4:../man/netcdf.m4:386: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:396: warning: too few arguments to built-in `include'
> m4:../man/netcdf.m4:411: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:419: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:421: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:447: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:448: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:467: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:499: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:504: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:516: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:520: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:528: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:531: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:543: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:550: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:587: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:611: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:620: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:631: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:643: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:673: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:676: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:683: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:686: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:698: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:699: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:733: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:739: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:746: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:770: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:783: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:788: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:795: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:812: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:888: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:935: warning: too few arguments to built-in `index'
> make[2]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src/libsrc'
> 
> Returning to directory /d0/kate/netcdf/netcdf-3.3/src
> 
> make[1]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src'
> make[1]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src'
> 
> Making `all' in directory /d0/kate/netcdf/netcdf-3.3/src/nc_test
> 
> make[2]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src/nc_test'
> gcc -c -g -I../libsrc  -DNDEBUG nc_test.c
> gcc -c -g -I../libsrc  -DNDEBUG error.c
> gcc -c -g -I../libsrc  -DNDEBUG test_get.c
> gcc -c -g -I../libsrc  -DNDEBUG test_put.c
> gcc -c -g -I../libsrc  -DNDEBUG test_read.c
> gcc -c -g -I../libsrc  -DNDEBUG test_write.c
> gcc -c -g -I../libsrc  -DNDEBUG util.c
> gcc -o nc_test -g  nc_test.o error.o test_get.o test_put.o test_read.o 
> test_write.o util.o -L../libsrc -lnetcdf -lm 
> make[2]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src/nc_test'
> 
> Returning to directory /d0/kate/netcdf/netcdf-3.3/src
> 
> make[1]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src'
> make[1]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src'
> 
> Making `all' in directory /d0/kate/netcdf/netcdf-3.3/src/fortran
> 
> make[2]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src/fortran'
> sed 's/@FILBYTE@/-127/g'      \
>     netcdf.in >netcdf.inc
> gcc -c -g -I../libsrc  -DNDEBUG fort-attio.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-control.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-dim.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-genatt.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-geninq.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-genvar.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-lib.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-misc.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-v2compat.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-vario.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-var1io.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-varaio.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-varmio.c
> gcc -c -g -I../libsrc  -DNDEBUG fort-varsio.c
> ar cru         ../libsrc/libnetcdf.a fort-attio.o fort-control.o fort-dim.o 
> fort-genatt.o fort-geninq.o fort-genvar.o fort-lib.o fort-misc.o 
> fort-v2compat.o fort-vario.o fort-var1io.o fort-varaio.o fort-varmio.o 
> fort-varsio.o
> ranlib ../libsrc/libnetcdf.a
> m4 -B7168 -DAPI=FORTRAN ../man/netcdf.m4 >netcdf.3f || rm netcdf.3f
> m4:../man/netcdf.m4:374: warning: too few arguments to built-in `include'
> m4:../man/netcdf.m4:386: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:396: warning: too few arguments to built-in `include'
> m4:../man/netcdf.m4:411: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:419: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:421: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:447: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:448: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:467: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:499: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:504: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:516: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:520: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:531: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:543: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:550: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:587: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:607: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:611: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:616: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:620: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:631: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:643: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:673: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:676: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:683: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:686: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:688: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:698: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:699: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:733: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:739: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:746: warning: too few arguments to built-in `len'
> m4:../man/netcdf.m4:770: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:783: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:788: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:795: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:812: warning: too few arguments to built-in `define'
> m4:../man/netcdf.m4:888: warning: too few arguments to built-in `index'
> m4:../man/netcdf.m4:935: warning: too few arguments to built-in `index'
> make[2]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src/fortran'
> 
> Returning to directory /d0/kate/netcdf/netcdf-3.3/src
> 
> make[1]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src'
> make[1]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src'
> 
> Making `all' in directory /d0/kate/netcdf/netcdf-3.3/src/nf_test
> 
> make[2]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src/nf_test'
> + oldf77 -c -g -Nl40 -w -DNDEBUG test_get.F 
> /tmp/cpp.16530.0.f:
>       test_nf_get_var1_text:
>       test_nf_get_var1_int1:
>       test_nf_get_var1_int2:
>       test_nf_get_var1_int:
>       test_nf_get_var1_real:
>       test_nf_get_var1_double:
>       test_nf_get_var_text:
>       test_nf_get_var_int1:
>       test_nf_get_var_int2:
>       test_nf_get_var_int:
>       test_nf_get_var_real:
>       test_nf_get_var_double:
>       test_nf_get_vara_text:
>       test_nf_get_vara_int1:
>       test_nf_get_vara_int2:
>       test_nf_get_vara_int:
>       test_nf_get_vara_real:
>       test_nf_get_vara_double:
>       test_nf_get_vars_text:
>       test_nf_get_vars_int1:
>       test_nf_get_vars_int2:
>       test_nf_get_vars_int:
>       test_nf_get_vars_real:
>       test_nf_get_vars_double:
>       test_nf_get_varm_text:
>       test_nf_get_varm_int1:
>       test_nf_get_varm_int2:
>       test_nf_get_varm_int:
>       test_nf_get_varm_real:
>       test_nf_get_varm_double:
>       test_nf_get_att_text:
>       test_nf_get_att_int1:
>       test_nf_get_att_int2:
>       test_nf_get_att_int:
>       test_nf_get_att_real:
>       test_nf_get_att_double:
> + oldf77 -c -g -Nl40 -w -DNDEBUG test_put.F 
> /tmp/cpp.16536.0.f:
>       hash_text:
>       hash_int1:
>       hash_int2:
>       hash_int:
>       hash_real:
>       hash_double:
>       check_vars_text:
>       check_vars_int1:
>       check_vars_int2:
>       check_vars_int:
>       check_vars_real:
>       check_vars_double:
>       check_atts_text:
>       check_atts_int1:
>       check_atts_int2:
>       check_atts_int:
>       check_atts_real:
>       check_atts_double:
>       test_nf_put_var1_text:
>       test_nf_put_var1_int1:
>       test_nf_put_var1_int2:
>       test_nf_put_var1_int:
>       test_nf_put_var1_real:
>       test_nf_put_var1_double:
>       test_nf_put_var_text:
>       test_nf_put_var_int1:
>       test_nf_put_var_int2:
>       test_nf_put_var_int:
>       test_nf_put_var_real:
>       test_nf_put_var_double:
>       test_nf_put_vara_text:
>       test_nf_put_vara_int1:
>       test_nf_put_vara_int2:
>       test_nf_put_vara_int:
>       test_nf_put_vara_real:
>       test_nf_put_vara_double:
>       test_nf_put_vars_text:
>       test_nf_put_vars_int1:
>       test_nf_put_vars_int2:
>       test_nf_put_vars_int:
>       test_nf_put_vars_real:
>       test_nf_put_vars_double:
>       test_nf_put_varm_text:
>       test_nf_put_varm_int1:
>       test_nf_put_varm_int2:
>       test_nf_put_varm_int:
>       test_nf_put_varm_real:
>       test_nf_put_varm_double:
>       test_nf_put_att_text:
>       test_nf_put_att_int1:
>       test_nf_put_att_int2:
>       test_nf_put_att_int:
>       test_nf_put_att_real:
>       test_nf_put_att_double:
> + oldf77 -c -g -Nl40 -w -DNDEBUG error.F 
> /tmp/cpp.16542.0.f:
>       error:
>       errori:
>       errord:
>       errorc:
>       errore:
> + oldf77 -c -g -Nl40 -w -DNDEBUG nf_test.F 
> /tmp/cpp.16548.0.f:
>  BLOCK DATA:
>       usage:
>       test:
>  MAIN nf_test:
> + oldf77 -c -g -Nl40 -w -DNDEBUG test_read.F 
> /tmp/cpp.16554.0.f:
>       test_nf_strerror:
>       test_nf_open:
>       test_nf_close:
>       test_nf_inq:
>       test_nf_inq_natts:
>       test_nf_inq_ndims:
>       test_nf_inq_nvars:
>       test_nf_inq_unlimdim:
>       test_nf_inq_dimid:
>       test_nf_inq_dim:
>       test_nf_inq_dimlen:
>       test_nf_inq_dimname:
>       test_nf_inq_varid:
>       test_nf_inq_var:
>       test_nf_inq_vardimid:
>       test_nf_inq_varname:
>       test_nf_inq_varnatts:
>       test_nf_inq_varndims:
>       test_nf_inq_vartype:
>       test_nf_inq_att:
>       test_nf_inq_attlen:
>       test_nf_inq_atttype:
>       test_nf_inq_attname:
>       test_nf_inq_attid:
> + oldf77 -c -g -Nl40 -w -DNDEBUG test_write.F 
> /tmp/cpp.16560.0.f:
>       test_nf_create:
>       test_nf_redef:
>       test_nf_enddef:
>       test_nf_sync:
>       test_nf_abort:
>       test_nf_def_dim:
>       test_nf_rename_dim:
>       test_nf_def_var:
>       test_nf_rename_var:
>       test_nf_copy_att:
>       test_nf_rename_att:
>       test_nf_del_att:
>       test_nf_set_fill:
> + oldf77 -c -g -Nl40 -w -DNDEBUG util.F 
> /tmp/cpp.16566.0.f:
>       print_nok:
>       inrange:
>       inrange_uchar:
>       inrange_float:
>       inrange3:
>       equal:
>       int_vec_eq:
>       roll:
>       index2ncindexes:
>       index2indexes:
>       indexes2index:
>       hash:
>       hash4:
>       char2type:
>       init_dims:
>       init_gatts:
>       prod:
>       init_gvars:
>       def_dims:
>       def_vars:
>       put_atts:
>       put_vars:
>       write_file:
>       check_dims:
>       check_vars:
>       check_atts:
>       check_file:
>       varid:
>       natts:
>       att_name:
>       att_type:
>       att_len:
>       internal_min:
>       internal_max:
>       external_min:
>       external_max:
>       in_internal_range:
>       len_trim:
> gcc -c -g   -DNDEBUG fortlib.c
> oldf77 -o nf_test -g -Nl40 -w  test_get.o test_put.o error.o nf_test.o 
> test_read.o test_write.o util.o fortlib.o -L../libsrc -lnetcdf  -lm 
> make[2]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src/nf_test'
> 
> Returning to directory /d0/kate/netcdf/netcdf-3.3/src
> 
> make[1]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src'
> make[1]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src'
> 
> Making `all' in directory /d0/kate/netcdf/netcdf-3.3/src/ncdump
> 
> make[2]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src/ncdump'
> gcc -c -g -I../libsrc  -DNDEBUG ncdump.c
> gcc -c -g -I../libsrc  -DNDEBUG vardata.c
> gcc -c -g -I../libsrc  -DNDEBUG dumplib.c
> gcc -o ncdump -g  ncdump.o vardata.o dumplib.o -L../libsrc -lnetcdf  
> make[2]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src/ncdump'
> 
> Returning to directory /d0/kate/netcdf/netcdf-3.3/src
> 
> make[1]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src'
> make[1]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src'
> 
> Making `all' in directory /d0/kate/netcdf/netcdf-3.3/src/ncgen
> 
> make[2]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src/ncgen'
> gcc -c -g -I../libsrc -I.  -DNDEBUG main.c
> gcc -c -g -I../libsrc -I.  -DNDEBUG load.c
> gcc -c -g -I../libsrc -I.  -DNDEBUG ncgentab.c
> gcc -c -g -I../libsrc -I.  -DNDEBUG escapes.c
> gcc -c -g -I../libsrc -I.  -DNDEBUG getfill.c
> gcc -c -g -I../libsrc -I.  -DNDEBUG init.c
> gcc -c -g -I../libsrc -I.  -DNDEBUG genlib.c
> gcc -o ncgen -g  main.o load.o ncgentab.o escapes.o getfill.o init.o genlib.o 
> -L../libsrc -lnetcdf  
> make[2]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src/ncgen'
> 
> Returning to directory /d0/kate/netcdf/netcdf-3.3/src
> 
> make[1]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src'
> make[1]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src'
> 
> Making `all' in directory /d0/kate/netcdf/netcdf-3.3/src/cxx
> 
> make[2]: Entering directory `/d0/kate/netcdf/netcdf-3.3/src/cxx'
> g++ -c -g  -I../libsrc  -DNDEBUG netcdf.cc
> g++ -c -g  -I../libsrc  -DNDEBUG ncvalues.cc
> ncvalues.cc: In method `char * NcValues_ncbyte::as_string(long int) const':
> ncvalues.cc:165: warning: implicit declaration of function `int strncpy(...)'
> ar cru         libnetcdf_c++.a netcdf.o ncvalues.o
> ranlib libnetcdf_c++.a
> g++ -c -g  -I../libsrc  -DNDEBUG nctst.cc
> nctst.cc: In function `char * cdl_name(const char *)':
> nctst.cc:99: warning: implicit declaration of function `int strncpy(...)'
> g++ -o nctst -I../libsrc  -DNDEBUG -g   nctst.o libnetcdf_c++.a -L../libsrc 
> -lnetcdf 
> make[2]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src/cxx'
> 
> Returning to directory /d0/kate/netcdf/netcdf-3.3/src
> 
> make[1]: Leaving directory `/d0/kate/netcdf/netcdf-3.3/src'
> 
> 6. patch
> *** libsrc/ncio.h     1997/05/16 18:30:04     1.1
> - - --- libsrc/ncio.h 1997/05/16 18:26:59
> ***************
> *** 11,16 ****
> - - --- 11,20 ----
>   #include <sys/types.h>      /* off_t */
>   #include "netcdf.h"
>   
> + #ifdef __GNUC__
> + #define memmove(a, b, c)   bcopy((b), (a), (c))
> + #endif
> + 
>   typedef struct ncio ncio;   /* forward reference */
>   
>   /*
> *** nc_test/test_get.c        1997/05/16 21:11:21     1.1
> - - --- nc_test/test_get.c    1997/05/16 21:12:43
> ***************
> *** 6,11 ****
> - - --- 6,12 ----
>    *********************************************************************/
>   
>   
> + #include <sys/types.h>
>   #include "tests.h"
>   
>   
> *** nc_test/util.c    1997/05/16 18:26:30     1.1
> - - --- nc_test/util.c        1997/05/17 12:13:10
> ***************
> *** 7,12 ****
> - - --- 7,16 ----
>   #include <math.h>
>   #include "tests.h"
>   
> + #ifdef __GNUC__
> + #define RAND_MAX        2147483647
> + #endif
> + 
>   void
>   print_nok(int nok)
>   {
> *** nf_test/fortlib.c 1997/05/16 18:53:29     1.1
> - - --- nf_test/fortlib.c     1997/05/16 18:49:24
> ***************
> *** 10,15 ****
> - - --- 10,19 ----
>   #include <stdlib.h>
>   
>   #include "../fortran/cfortran.h"
> + 
> + #ifdef __GNUC__
> + #define RAND_MAX 2147483647
> + #endif
>   
>   FCALLSCSUB1(exit, UDEXIT, udexit, INT)
>   
> 
> 7. nf_test.trace
> Note: Line numbers for system and library calls may be incorrect 
> Begin traceback...
> Called from [func: _etext],line 1484 at 0xef6b2c4c, args=0xa 0x2 0xef795a7c 
> 0xef805e78
> Called from [func: ncio_px_get:f(0,1)],line 287 at 0x690d8, args=0xeffff06c 
> 0xe89f4 0xeffff014 0x101308
> Called from [func: getNCvx_schar_double:f(0,1)],line 2694 at 0x774b4, 
> args=0xeffff090 0x1 0xe89f4 0x0
> Called from [func: getNCv_double:f(0,1)],line 4001 at 0x7af68, args=0x100a90 
> 0x1030a8 0xeffff398 0x1
> Called from [func: nc_get_vara_double:F(0,1)],line 6409 at 0x81758, 
> args=0x100a90 0x1030a8 0xeffff398 0x1
> Called from [func: nf_get_vara_double_:F(0,1)],line 86 at 0x5d694, args=0x4 
> 0x1 0xeffff398 0xeffff208
> Called from [func: test_nf_get_vara_double:F14],line 2138 at 0xe760, 
> args=0xe87dc 0xe87b4 0xe8c00 0xe8c0c
> Called from [func: test:F14],line 62 at 0x43d38, args=0xe3800 0xd41e6 0x0 
> 0xef7a0db4
> Called from [func: _MAIN_],line 353 at 0x44790, args=0xd41d4 0xd930 0x12 0x4
> Called from [func: _etext],line 1484 at 0xef740c38, args=0x0 0x1 0x1 
> 0x2e000000
> Called from [func: start],line 0 at 0x2064, args=0x0 0x10 0xeffff894 0xc2000
> End traceback...
> 
> 8. nf_test.out
> ./nf_test
> *** Bus Error = signal 10 code 2 
>  Note: the following IEEE floating-point arithmetic exceptions 
>  occurred and were never cleared; see ieee_flags(3M): 
>  Inexact;  Invalid Operand; 
>  Sun's implementation of IEEE arithmetic is discussed in 
>  the Numerical Computation Guide.
> Traceback has been recorded in file:
>        /d0/kate/netcdf/netcdf-3.3/src/nf_test/./nf_test.trace 
> Note: Line numbers for system and library calls may be incorrect 
> *** Testing nf_strerror ... 
> *** Testing nf_open ... 
> *** Testing nf_close ... 
> *** Testing nf_inq ... 
> *** Testing nf_inq_dimid ... 
> *** Testing nf_inq_dim ... 
> *** Testing nf_inq_dimlen ... 
> *** Testing nf_inq_dimname ... 
> *** Testing nf_inq_varid ... 
> *** Testing nf_inq_var ... 
> *** Testing nf_inq_natts ... 
> *** Testing nf_inq_ndims ... 
> *** Testing nf_inq_nvars ... 
> *** Testing nf_inq_unlimdim ... 
> *** Testing nf_inq_vardimid ... 
> *** Testing nf_inq_varname ... 
> *** Testing nf_inq_varnatts ... 
> *** Testing nf_inq_varndims ... 
> *** Testing nf_inq_vartype ... 
> *** Testing nf_get_var1_text ... 
> *** Testing nf_get_var1_int1 ... 
> *** Testing nf_get_var1_int2 ... 
> *** Testing nf_get_var1_int ... 
> *** Testing nf_get_var1_real ... 
> *** Testing nf_get_var1_double ... 
> *** Testing nf_get_var_text ... 
> *** Testing nf_get_var_int1 ... 
> *** Testing nf_get_var_int2 ... 
> *** Testing nf_get_var_int ... 
> *** Testing nf_get_var_real ... 
> *** Testing nf_get_var_double ... 
> *** Testing nf_get_vara_text ... 
> *** Testing nf_get_vara_int1 ... 
> *** Testing nf_get_vara_int2 ... 
> *** Testing nf_get_vara_int ... 
> *** Testing nf_get_vara_real ... 
> *** Testing nf_get_vara_double ... 
> make: *** [test] Abort (core dumped)

--------
Steve Emmerson   <address@hidden>