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

970528: netcdf 3.3 with gcc



Kate,

>Date: Wed, 28 May 1997 13:30:38 -0400 (EDT) 
>From: Kate Hedstrom <address@hidden>
>Organization: Rutgers University
>To: address@hidden
>Subject: Re: 970528: netcdf 3.3 with gcc 
>Keywords: 199705171514.JAA09636

In the above message, you wrote:

...
> gecko% make test
> cc -o nc_test -O -g  nc_test.o error.o test_get.o test_put.o
> test_read.o test_write.o util.o -L../libsrc -lnetcdf -lm 
> ./nc_test -c
> ./nc_test
> *** Testing nc_strerror ... ok
> *** Testing nc_open ... ok
> *** Testing nc_close ... ok
> *** Testing nc_inq ... ok
> *** Testing nc_inq_dimid ... ok
> *** Testing nc_inq_dim ... ok
> *** Testing nc_inq_dimlen ... ok
> *** Testing nc_inq_dimname ... ok
> *** Testing nc_inq_varid ... ok
> *** Testing nc_inq_var ... ok
> *** Testing nc_inq_natts ... ok
> *** Testing nc_inq_ndims ... ok
> *** Testing nc_inq_nvars ... ok
> *** Testing nc_inq_unlimdim ... ok
> *** Testing nc_inq_vardimid ... ok
> *** Testing nc_inq_varname ... ok
> *** Testing nc_inq_varnatts ... ok
> *** Testing nc_inq_varndims ... ok
> *** Testing nc_inq_vartype ... ok
> *** Testing nc_get_var_text ...  179 good comparisons. ok
> *** Testing nc_get_var_uchar ... 
>         FAILURE at line 793 of test_get.c: value read not that expected

Would you please do me the following favor:

    1.  Go into the nc_test/ subdirectory.

    2.  Execute the command "make test.nc".

    3.  Execute the debugger on the file nc_test.

    4.  Set a breakpoint in the function "error".

    5.  Run the executable in the debugger.

    6.  When execution stops in function "error", go up to function
        "test_nc_get_var_uchar".

    7.  Print out the values of the following variables:

            i,var_name[i],var_type[i],j,expect[j],value[j]

>  263 good comparisons. 
>         ### 1 FAILURES TESTING nc_get_var_uchar! ###
> *** Testing nc_get_var_schar ...  269 good comparisons. ok
> *** Testing nc_get_var_short ...  682 good comparisons. ok
> *** Testing nc_get_var_int ... 
>         FAILURE at line 1063 of test_get.c: value read not that
> expected
>         FAILURE at line 1063 of test_get.c: value read not that
> expected
>         FAILURE at line 1063 of test_get.c: value read not that
> expected
>  1186 good comparisons. 
>         ### 3 FAILURES TESTING nc_get_var_int! ###
> *** Testing nc_get_var_long ...  1189 good comparisons. ok
> *** Testing nc_get_var_float ...  1194 good comparisons. ok
> *** Testing nc_get_var_double ...  1207 good comparisons. ok
> *** Testing nc_get_var1_text ...  179 good comparisons. ok
> *** Testing nc_get_var1_uchar ... 
>         FAILURE at line 141 of test_get.c: expected: 128, got: 128
>         FAILURE at line 141 of test_get.c: expected: 128, got: 128
>  262 good comparisons. 
>         ### 2 FAILURES TESTING nc_get_var1_uchar! ###
> *** Testing nc_get_var1_schar ...  269 good comparisons. ok
> *** Testing nc_get_var1_short ...  682 good comparisons. ok
> *** Testing nc_get_var1_int ... 
>         FAILURE at line 375 of test_get.c: expected: -128, got: -128
>         FAILURE at line 375 of test_get.c: expected: -128, got: -128
>         FAILURE at line 375 of test_get.c: expected: -128, got: -128
>  1186 good comparisons. 
>         ### 3 FAILURES TESTING nc_get_var1_int! ###
> *** Testing nc_get_var1_long ...  1189 good comparisons. ok
> *** Testing nc_get_var1_float ...  1194 good comparisons. ok
> *** Testing nc_get_var1_double ...  1207 good comparisons. ok
> *** Testing nc_get_var1 ...  1386 good comparisons. ok
> 
> 
> And so on.  It keeps going, but very slowly.
> 
> In gdb:
> 
> 
> *** Testing nc_inq_varname ... ok
> *** Testing nc_inq_varnatts ... ok
> *** Testing nc_inq_varndims ... ok
> *** Testing nc_inq_vartype ... ok
> *** Testing nc_get_var_text ...  179 good comparisons. ok
> 
> Breakpoint 1, main (argc=1, argv=0xefbfd848) at nc_test.c:168
> 168         NC_TEST(nc_get_var_uchar);
> (gdb) s
> print (fmt=0x1abf "*** Testing nc_get_var_uchar ... ") at error.c:36
> 36          va_start(args, fmt) ;
> (gdb) l
> 31      void
> 32      print(const char *fmt, ...)
> 33      {
> 34          va_list args ;
> 35
> 36          va_start(args, fmt) ;
> 37          (void) vfprintf(stderr,fmt,args) ;
> 38          va_end(args) ;
> 39      }
> 40
> (gdb) n
> 37          (void) vfprintf(stderr,fmt,args) ;
> (gdb) 
> 0x650ac in _DYNAMIC ()
> (gdb) 
> Single stepping until exit from function _DYNAMIC, 
> which has no line number information.
> *** Testing nc_get_var_uchar ... print (fmt=0x1abf "*** Testing 
> nc_get_var_uchar ... ") at error.c:39
> 39      }
> (gdb) 
> 
> Program received signal SIGFPE, Arithmetic exception.
> 0x4a299 in ncx_get_float_uchar (xp=0x6a7f0, ip=0xefbfd7bc "") at
> ncx.c:1129
> 1129            *ip = (uchar) xx;
> (gdb) p xx
> $1 = -3.40282347e+38
> (gdb) 
> 
> I don't have time to get deeper into this at the moment.  I don't know
> if this helps at all.  The system:
> 
> gecko% uname -a
> FreeBSD gecko.rutgers.edu 2.1.6-RELEASE FreeBSD 2.1.6-RELEASE #0: Wed
> Jan  1 17:31:05 EST 1997
> address@hidden:/usr/src/sys/compile/GECKO  i386
> gecko% gcc -v
> Reading specs from
> /usr/local/lib/gcc-lib/i386-unknown-freebsd2.1.6/2.7.2.2/specs gcc version 
> 2.7.2.2
> 
> This is actually gcc+g77.
> 
> Kate

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