[FLASH-BUGS] loaddata failure with "Too many open files"
Mike Zingale
zingale at flash.uchicago.edu
Mon Apr 28 19:26:27 CDT 2003
Leonid, this has been seen before, but mainly on SGIs. I looked over once
to see if I could find any place where we were not closing files, but I
did not find any, so I am not sure what the problem is. On Linux boxes,
you can go much higher.
The only work around I can suggest at the moment is to use a non-unit
stride, or break you loop up over multiple sessions.
Mike
------------------------------------------------------------------------------
Michael Zingale
UCO/Lick Observatory
UCSC
Santa Cruz, CA 95064
phone: (831) 459-5246
fax: (831) 459-5265
e-mail: zingale at ucolick.org
web: http://www.ucolick.org/~zingale
``What an awful dream -- ones and zeros everywhere. I thought I saw a two''
-- Bender
On Mon, 28 Apr 2003, Leonid Malyshkin wrote:
>
> 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