get_lun & free_lun [message #89332] |
Tue, 19 August 2014 05:02  |
markb77
Messages: 217 Registered: July 2006
|
Senior Member |
|
|
I just noticed that get_lun and free_lun are limited to unit numbers 100-128. That means an IDL application could have access to (at maximum) 29 files simultaneously.
Is there any way around this, other than hard-coding logical unit numbers into your code?
thanks
Mark
|
|
|
Re: get_lun & free_lun [message #89334 is a reply to message #89332] |
Tue, 19 August 2014 08:32   |
Russell Ryan
Messages: 122 Registered: May 2012
|
Senior Member |
|
|
Not that I am aware of. Also, the problem is more sinister... You *ONLY* have access to 29 files, period. You can't open any LUN larger than 128, try it:
openw,150,'tmp.tmp'
At least, that gives me an error...
Russell
IDL> help,!version
** Structure !VERSION, 8 tags, length=104, data length=100:
ARCH STRING 'x86_64'
OS STRING 'darwin'
OS_FAMILY STRING 'unix'
OS_NAME STRING 'Mac OS X'
RELEASE STRING '8.2.3'
BUILD_DATE STRING 'May 2 2013'
MEMORY_BITS INT 64
FILE_OFFSET_BITS
INT 64
I
|
|
|
|
Re: get_lun & free_lun [message #89337 is a reply to message #89335] |
Tue, 19 August 2014 10:24  |
markb77
Messages: 217 Registered: July 2006
|
Senior Member |
|
|
On Tuesday, August 19, 2014 6:13:17 PM UTC+2, Yngvar Larsen wrote:
> On Tuesday, 19 August 2014 14:02:05 UTC+2, superchromix wrote:
>
>> I just noticed that get_lun and free_lun are limited to unit numbers 100-128. That means an IDL application could have access to (at maximum) 29 files simultaneously.
>
>>
>
>>
>
>>
>
>> Is there any way around this, other than hard-coding logical unit numbers into your code?
>
>
>
>
>
> 1) Use idl_idlbridge. The new idl "child processes" get their own separate set of LUNs (but possibly limited by your OS: see eg "ulimit -n" and "sysctl -n kernel.maxfiles" on a linux system)
>
>
>
> or
>
>
>
> 2) Close your files as soon as possible after you finish reading/writing what you need. (In what scenario do you need to keep more than 29 files open at the same time?)
>
>
>
> --
>
> Yngvar
Thanks for the tip about the IDL_IDLBridge - I'm glad that's the case. I was thinking of a scenario where 5 instances of an application are running simultaneously.. it wouldn't be unreasonable for each of those applications to have 5 files open...
Mark
|
|
|