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

Home » Public Forums » archive » "OPENW: Error opening file. Unit: (...) Too many links" - What does this mean? (Possible I/O problem)
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: "OPENW: Error opening file. Unit: (...) Too many links" - What does this mean? (Possible I/O problem) [message #85118 is a reply to message #85113] Sun, 07 July 2013 04:33 Go to previous messageGo to previous message
skymaxwell@gmail.com is currently offline  skymaxwell@gmail.com
Messages: 127
Registered: January 2007
Senior Member
пятница, 5 июля 2013 г., 21:00:48 UTC+4 пользователь Jas написал:
> Hey all,
>
>
>
> I'm writing a program that reads and writes several thousand ASCII files in several loops. This code has traditionally worked when the total number of files was about 90,000. However, I've recently increased the loops involved so that I create many more (~ 500,000 in all). When I do this, the program starts off fine, until up to a certain point (at about the 175,000th file), when I suddenly get this message:
>
>
>
> % OPENW: Error opening file. Unit: (...)
>
> File: (...)
>
> Too many links
>
> % Execution halted at: $MAIN$ (...)
>
>
>
> I have not seen this error before. At first I thought that the file unit was being reused too much, so I tried to make every OPENW statement have a corresponding FREE_LUN statement when I was finished writing to a different file (I'm still using the same variable, "lun" for all these units, because I thought that FREE_LUN would mean I could reuse it again for another file), but I still get the same message at the same point in time. What else could be the problem here? I've not managed to find a similar instance of this problem occurring anywhere else and the IDL documentation isn't helping much.
>
>
>
> Thanks,
>
>
>
> Jas.

Hi, from IDL help on GET_LUN procedure

"The file unit number obtained is in the range 100 to 128"

I think you need check lun numbers and check that all files are closed correct.
Also i can guess that if you have a loops, check type of counter variables there.

for example if you have
FOR I=0,10000000 DO BEGIN

change to
FOR I=0,10000000LL DO BEGIN
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Calling vectors in readcol from a string array?
Next Topic: Peak detection

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

Current Time: Fri Oct 10 15:49:58 PDT 2025

Total time taken to generate the page: 4.08274 seconds