[FLASH-BUGS] loaddata failure with "Too many open files"

Leonid Malyshkin leonmal at flash.uchicago.edu
Mon Apr 28 19:23:24 CDT 2003


Hello,

I may do something wrong, but it looks like loaddata fails when one opens 
a lot of files in a loop. I run the simple following IDL code:

;----------------------------------------------
FOR file_number=0,500,1 DO BEGIN
   ; set file name
   file_name='/scratch3/leonmal/FLASH/RUN_FLASH/' $
     +'levels=9_points=4_landquist=1678_tdif=100eta/' $
     +'rosetta_hdf5_plt_crn_' $
     +STRMID(STRCOMPRESS(STRING(10000+file_number),/REMOVE_ALL), 1)
   ; read data
   Bx_data=LOADDATA(file_name,'magx', DOUBLE=1, $
                    XRANGE=[0.0d,0.1d], YRANGE=[0.0d,0.1d])
   By_data=LOADDATA(file_name,'magy', DOUBLE=1, $
                    XRANGE=[0.0d,0.1d], YRANGE=[0.0d,0.1d])
ENDFOR
END
;----------------------------------------------------------

It fails at the 195th file:

% Case statement found no matches.
% Execution halted at: LOADDATA           51
  /scratch3/leonmal/FLASH/FLASH2.3/tools/fidlr2/loaddata.pro
%                      $MAIN$             11
  /scratch3/leonmal/FLASH/RUN_FLASH/test.pro

Then I try to get help and see the following:

IDL> ?
% ONLINE_HELP: Error opening file.
               File: 
/opt/pkgs/idl_5.6/idl_5.6/help/idl_acrobat_plugin.config
  Too many open files
IDL> 

Apparently the problem is that loaddata does not close open data files, 
or I do not do this (because do not know how).

Could you please help?

With best wishes,
Leonid




More information about the flash-bugs mailing list