comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » The good way to use cdfid's
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: The good way to use cdfid's [message #76647 is a reply to message #76410] Mon, 20 June 2011 06:42 Go to previous message
Jos de Laat is currently offline  Jos de Laat
Messages: 1
Registered: June 2011
Junior Member
Dear Fabzou,

I think I ran into a similar problem some time ago. I had a piece of
IDL that subsequently opens and reads data from many - albeit
different - NCDF files in IDL. This always worked well, but after the
operating system of my workstation changed to Fedora 13 my IDL program
started to "stall", it simply stopped running and could only be
stopped by killing idl ("ctrl C" did not work; happens in both IDL v70
and v80). This occurs a bit randomly, but it always happens. After
some fiddling around it turned out that opening and closing any NCDF
files for many times leads to this error. This was also the case for
HDF and HDF5 files. Interestingly, the problem did not occur for IDL
running under windows (IDL v64, I think).

I contacted ITTVIS about it and they gave me the following code
example "that caused a crash on several linux flavours:" (their
words):


pro create_hand_sample, file
compile_opt idl2, logical_predicate
print, file
sample_var = dindgen( 4, 3 )
ncid = ncdf_create(file, /CLOBBER)
dimidx = ncdf_dimdef( ncid, 'x', 4 )
dimidy = ncdf_dimdef( ncid, 'y', 3 )
varid = ncdf_vardef( ncid, 'variable', /double )
ncdf_control, ncid, /ENDEF
ncdf_varput, ncid, varid, sample_var
ncdf_close, ncid

end

pro crash_ncdf
compile_opt idl2, logical_predicate

catch, theError
print, 'theError = ',theError
if theError ne 0 then begin
Catch, /cancel
print, "i = ", i
print, "ncdf_fid = ", ncdf_fid
message, !ERROR_STATE.msg
endif

file = '/tmp/sample_hand.nc'
create_hand_sample, file

long_iteration = 19000000L

for i = 0l, long_iteration do begin
ncdf_fid = ncdf_open( file, write = 0 )
ncdf_close, ncdf_fid
endfor

print, 'Successfully completed first iterations'
window, /free
wdelete

for i = 0l, long_iteration do begin
ncdf_fid = ncdf_open( file, write = 0 )
ncdf_close, ncdf_fid
endfor

print, 'Successfully completed second iterations'

end


>>> output >>>

theError = -1091
ncdf_fid = 65536
% CRASH_NCDF: NCDF_OPEN: Unable to open the file "/tmp/
sample_hand.nc". (NC_ERROR=-31)
% Execution halted at: CRASH_NCDF 24 /usr/people/laatdej/
Documents/tmp/ITT_sample_code.pro
% CREATE_HAND_SAMPLE 3 /usr/people/laatdej/
Documents/tmp/ITT_sample_code.pro
% $MAIN$



...

They promised to look into this but I haven't heard since (so mailed
them again today). I'll keep you posted if a solution is found.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: point inside/outside of 3D object.
Next Topic: Re: Venn Diagram in IDL?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 03:42:48 PDT 2025

Total time taken to generate the page: 0.64007 seconds