[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unidata Support: 970115: Problem report: netcdf-3.1a
- Subject: Re: Unidata Support: 970115: Problem report: netcdf-3.1a
- Date: Wed, 15 Jan 1997 09:25:45 -0700
> Date: Wed, 15 Jan 1997 07:50:36 -0700
> From: Unidata Support <address@hidden>
> To: address@hidden
> Subject: 970115: Problem report: netcdf-3.1a
>
> >To: address@hidden
> >From: Harvey DAVIES <address@hidden>
> >Subject: Problem report: netcdf-3.1a
> >Organization: .
> >Keywords: 199701150927.CAA17119
>
> I have struck a problem with netcdf-3.1a on a Sun system.
> uname -a
> gives
> SunOS trout 4.1.3 2 sun4c
>
> The problem does not occur on SGI system.
>
> Following demonstrates the problem.
> File t.cdl is:
>
> netcdf t {
> dimensions:
> a = UNLIMITED;
> variables:
> double d(a);
> }
>
> File try.c is:
>
> #include "netcdf.h"
> #include <assert.h>
>
> main(int argc, char *argv[])
> {
> int ncid;
> int varid=0;
> int status;
> size_t start[] = {0};
> size_t count[] = {1};
> double value = 3.0;
>
> status = nc_open( "t.nc", NC_WRITE, &ncid );
> assert( !status );
> status = nc_put_vara_double(ncid, varid, start, count, &value);
> assert( !status );
> status = nc_close(ncid);
> assert( !status );
> return 0;
> }
>
> Trying:
>
> gcc -g -I../../libsrc -I../../libsrc -target sun4 -c try.c
> gcc -g try.o ../../../lib/libnetcdf.a -o try
> ncgen -b t.cdl
> try
> putget.c:494: failed assertion `!(varp->ndims == 1 && ncp->recsize <=
varp->len)'
> *** Abort - core dumped
>
>
> Problem disappears if call to nc_put_vara_double is replaced by
> status = nc_put_var1_double(ncid, varid, start, &value);
>
>
> Harvey
>
> Harvey Davies, CSIRO Mathematical and Information Sciences,
> 723 Swanston Street, Carlton, Victoria 3053, Australia
> Email: address@hidden
> Phone: +61 3 9282 2623 or +61 3 9239 4556
> Fax: +61 3 9282 2600
I was working last week with address@hidden via telephone on this.
The logic in the assertion in NCedgeck() is wrong and may be be deleted.
The fix to putget.m4 has been checked in.
-glenn