Thomas Green <thomas.green@xxxxxxxxxxxxxxxx> writes:
> NetCDF users,
>
> I am developing a program to evaluate most of the new features in
> netcdf4 and also the netcdf3 format with our current file format. I
> have now implemented packing but I am currently getting a segmentation
> fault when packing to a 32bit int (worked for a 16bit int).
>
> Using gdb I can see that it was due to nf_put_var_int (through the f90
> interface nf90_put_var). I then used the nf_put_var_int directly for
> the packing the 32 bit integers and I found the fault was caused due to
> the elemental function int within the call to nf_put_var_int.
>
> e.g.
>
> Call netcdf_check(nf_put_var_int(ncid, i, int(int_packed_data(:,:,:,:))))
>
> replaced with
>
> Call netcdf_check(nf_put_var_int(ncid, i, int_packed_data(:,:,:,:)))
>
> fixes the problem.
>
> I am using this on Linux with the intel compiler (ifort (IFORT) 10.0
> 20070426 and ifort (IFORT) 9.1 20060927).
>
> Since I have gotten it to work it isnt a major problem but obviously
> would like to understand what is going on and whether there is something
> I am doing or whether there might be a bug.
>
> Any help appreciated,
>
> Tom
>
Howdy Tom!
I will check this out. Thanks for reporting this.
I am forwarding this to netcdf-support@unidata to make sure it gets
into our support issue database, so that we don't forget about it...
Thanks,
Ed
--
Ed Hartnett -- ed@xxxxxxxxxxxxxxxx