X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01 Aug 2007 12:57 AM by  anon
error IDL
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
01 Aug 2007 12:57 AM
    Hello, I use a procedure whith a loop. For each iteration i create a file of 10Ko. After having created 40,000 files i obtain this error message: error opening file unit:100 file too large execution halted at .... do you know what that 's means and why i obtain this message only after having created 40,000 files and not before? many thanks in advance Nathalie Vigneau

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Aug 2007 12:57 AM
    Is this really the precise message: "file too large"? If IDL or the operating system really threw an error with this exact message, it should truly be complaining about the number of bytes that you want to write to some location on your hard drive. Usually when there is an "error opening file unit" inside a "tight loop" in IDL, it is specifically about a problem with the file unit (or "logical unit" or "lun"). For users who throughout their looping are using just one file unit at any moment in time, one solution to that is to use just one constant for a file unit. That is, make sure that you are not looping with a call like this: for i = 0, 50000 do begin openw, lun, 'file' + strtrim(i, 2) + '.dat', /GET_LUN but rather: lun = 100 for i = 0, 50000 do begin openw, lun, 'file' + strtrim(i, 2) + '.dat' Of course, this may be completely irrelevant to your problem. At the point where the error is thrown, can you run the following code from the IDL command line? IDL> openw, 100, 'debugfile.dat' IDL> writeu, 100, findgen(2500) ; i.e. 10,000 bytes of data IDL> free_lun, 100 Send the critical lines that start the loop, open the files for writing, write out the 10k of data and close the file units, and I might have some other ideas. Right now, there is too little information. James Jones ITT Technical Support
    You are not authorized to post a reply.