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
|