nc_test

Jianwei Li jianwei at pop.ece.nwu.edu
Fri Mar 7 15:05:30 CST 2003


>On Fri, Feb 28, 2003 at 04:00:15PM -0600, Robert Latham wrote:
>> hi guys.
>> 
>> the test/nc_test is a test from the serial netcdf distribution.  I've
>> gotten it to build under parallel-netcdf, but it doesn't get very far.
>
>Thanks to jianwei's help i've gotten a little further:  i get a
>segfault when trying to write data.  
>
>At some point, 'nc_test -c' calls ncmpi_put_vara_text_all, which
>eventually calls NC_set_vara_file_view.  The problem is the NC_var
>passed into NC_set_vara_file_view has some null arrays:
>
>(gdb) p *varp
>$8 = {xsz = 1, shape = 0x0, dsizes = 0x0, name = 0x81096c0, ndims = 0,
>  dimids = 0x0, attrs = {nalloc = 0, nelems = 0, value = 0x0}, type = NC_CHAR,
>  len = 4, begin = 6076}
>
>
>Is it an error for the client to have null 'shape' and 'dsizes'
>members, or should ncmpi_put_vara_all treat that condition as 'no work
>to do' and return NC_NOERR ?

	If a variable defined in netCDF has null 'shape' and 'dsizes',
	it should be a scalar variable, i.e. ndims == 0.
	For 0-dimensional variables, how do you specify 'start[], count[],
	and/or stride[]' in order to call ncmpi_put_vara_all() or 
	ncmpi_put_vars_all() ? They should be passed as 'null', right?

	I think there's a bug in 'put_vara' and maybe in other 'put/get_var'
	functions when they are dealing with 0-dimensional variables. 
	Let me look into the code and see what I can do to fix it.
	
	
	--
	Jianwei




More information about the parallel-netcdf mailing list