[netcdfgroup] nf_put_var_int problems

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

---
Thomas Green   Unified Model System Analyst
Met Office   FitzRoy Road   Exeter   EX1 3PB   United Kingdom
E-mail: thomas.green@xxxxxxxxxxxxxxxx   http://www.metoffice.gov.uk



  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: