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

Home » Public Forums » archive » Re: Problem with too many open files
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: Problem with too many open files [message #14508 is a reply to message #14503] Sat, 27 February 1999 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Phil Fischer (philf@astro.lsa.umich.edu) writes:

> I have a loop that has, among other things, the following commands:
>
> openw,1,command_file
> .
> close,1
>
> This loop will run for quite a large number of iterations and then will give me
> the following error message:
>
> % OPENW: Error opening file: /sdss3/usrdevel/philf/bin/commands.txt.
> Too many open files
>
> I have tried using free_lun but it doesn't seem to help.

This sounds like a bug, and I seem to remember something like
this in an earlier version of IDL. Which version are you using?

> Any suggestions?

Well, hard-coding the logical unit number in a program like
you are doing is...how should I put it...suspect programming
practice at best. :-)

Does something like this work any better?

OpenW, lun, command_file, /Get_Lun
...
Free_Lun, lun

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155

[Note: This follow-up was e-mailed to the cited author.]
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: read_tiff - simple question
Next Topic: Re: CMYK TIFF in IDL?

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

Current Time: Sat Oct 11 21:38:03 PDT 2025

Total time taken to generate the page: 3.84145 seconds