I am having a somewhat similar problem. When I write large (500MB to 4GB)
netCDF files in IDL, every once in a while an error returned on the
ncdf_varput() call. When I close the file and compare it to one written
without the error they are slightly different. One or two rows in a very large
3D array are garbage. Doing the identical operation again it does not fail.
This only happens on 64-bit Linux, not on 32 or 64-bit Windows. It happens
both with 3.6.2 and 4.0.1.
ITT has been unable to reproduce it, so it may be something about my Linux
version or hardware.
If you get a seqmentation fault then you should be able to enable core dumps
("limit core 100000: for csh or "ulimit -c 100000" for bash).
Once you get a core dump you can run gdb on it to see the stack trace when the
program crashed.
Mark
________________________________
From: netcdfgroup-bounces@xxxxxxxxxxxxxxxx on behalf of Marston Sheldon Johnston
Sent: Sun 3/14/2010 5:22 AM
To: netcdfgroup@xxxxxxxxxxxxxxxx
Subject: [netcdfgroup] segmentation fault when nc_close
Hi,
I'm using the netcdf C interface and CDI to read and write very large netcdf
files.
My script is not very complicated, the netcdf interface gives me greater access
to the data in the netcdf file than CDI but cdi gives me better access to the
time steps in the file.
After accessing the data, I calculate the monthly averages and then write them
to a new netcdf file for each month.
Over 1 year this is done 8 times each month. The program works for the most
part well but when the final month's data is written and I close the newly
created netcdf file, I get a segmentation fault.
The file seems to be closed and the data looks good but I cannot trace the
problem. I placed a simple print statement after the nc_close command and error
handling function but this statement is never reached.
I would like to know if there is anyone who have encountered something similar
and can give some tips as to where to look and what may be the problem. I used
the example given in the example map in the netcdf installation.
I can send the script if anyone is so kind as to assist me with this debugging
:-)
Sincerely,
Marston
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Marston S. Johnston e-mail:
marston@xxxxxxxxxxx ~
~ Doctoral Student Radio and Space Science
~
~ Chalmers Technical University http://www.chalmers.se
<http://www.chalmers.se/> ~
~ Gothenburg Tel. (46) 31
772 2235 ~
~ Sweden Skype ID
marston.johnston ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/