SPAWN error question [message #88714] |
Mon, 09 June 2014 12:34  |
Chip Helms
Messages: 24 Registered: November 2012
|
Junior Member |
|
|
Hi all,
So I recently had SPAWN throw an error that I haven't had before, namely:
IDL> spawn, 'wgrib2 -s '+filename+' | awk -F: ''{print $4 $5}''', inv
% SPAWN: Error opening file. File: /usr/tmp/idl_tmp_ZPEOzs
Too many open files
% SPAWN: Error managing child process.
As best I can determine, the error appears to have been caused by me exceeding my disk quota (hence not being allowed to write to files). Clearing up some space and restarting the IDL session seems to have solved the issue (for whatever reason IDL didn't seem to recognize that I could once again write files until I restarted it).
My question is, why does spawn need to write a file? One thought I had was that maybe it was creating a named pipe, but I'm leaning towards that not being the case based on some testing I did. Here's a list of what I've tried and the resulting error messages:
IDL> spawn, 'ls'
% SPAWN: Error managing child process.
Too many open files
IDL> spawn, ['ls'], /noshell
% SPAWN: Error managing child process.
Too many open files
IDL> spawn, 'ls', tmp
% SPAWN: Error opening file. File: /usr/tmp/idl_tmp_SDxSTx
Too many open files
% SPAWN: Error managing child process.
IDL> spawn, ['ls'], tmp, /noshell
% SPAWN: Error opening file. File: /usr/tmp/idl_tmp_mY5lwC
Too many open files
% SPAWN: Error managing child process.
IDL> spawn, 'ls', unit=unit
% SPAWN: Unable to make pipe.
Too many open files
IDL> spawn, ['ls'], /noshell, unit=unit
% SPAWN: Unable to make pipe.
Too many open files
The fact that the error specifically mentions being unable to create a pipe when I tell it to use a bidirectional pipe is why I doubt my initial suspicion that the original error was pipe related. Any insight would be greatly appreciated.
Cheers,
Chip
(P.S., for those finding themselves using spawn often, the /noshell option significantly decreases the execution time at the expense of not automatically parsing the command line. Thus 'ls -lht' must be written as ['ls','-lht']. I've had improvements of an order of magnitude in execution time.)
|
|
|
Re: SPAWN error question [message #88747 is a reply to message #88714] |
Thu, 12 June 2014 09:39   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Monday, June 9, 2014 3:34:15 PM UTC-4, Chip Helms wrote:
> Hi all,
>
>
>
> So I recently had SPAWN throw an error that I haven't had before, namely:
>
> IDL> spawn, 'wgrib2 -s '+filename+' | awk -F: ''{print $4 $5}''', inv
>
> % SPAWN: Error opening file. File: /usr/tmp/idl_tmp_ZPEOzs
> Too many open files
> % SPAWN: Error managing child process.
Here is my experience on IDL 7 and IDL 8, both Mac and Linux. For me, IDL doesn't create any temporary files when I run SPAWN. I would say you've got something very interesting going on in your system! Is it possible you have a setting in your .cshrc and/or .login that is saving shell output?
Craig
|
|
|
|
Re: SPAWN error question [message #89683 is a reply to message #89682] |
Thu, 13 November 2014 10:51   |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
On Thursday, November 13, 2014 1:34:35 PM UTC-5, Edward Hyer wrote:
> On Thursday, June 12, 2014 9:39:17 AM UTC-7, Craig Markwardt wrote:
>> On Monday, June 9, 2014 3:34:15 PM UTC-4, Chip Helms wrote:
>>> % SPAWN: Error opening file. File: /usr/tmp/idl_tmp_ZPEOzs
>>> Too many open files
>>> % SPAWN: Error managing child process.
>
> I just wanted to echo I have hit this error-- anyone else seen this?
> IDL> print,!version
> { x86_64 linux unix linux 8.2.1 Aug 20 2012 64 64}
I have long experienced a similar error when I have too many file units open (i.e. I forget to include a free_lun in my code and the open units pile up).
|
|
|
Re: SPAWN error question [message #90610 is a reply to message #88714] |
Mon, 16 March 2015 08:21  |
gergopokol
Messages: 1 Registered: March 2015
|
Junior Member |
|
|
On Monday, June 9, 2014 at 9:34:15 PM UTC+2, Chip Helms wrote:
> IDL> spawn, 'wgrib2 -s '+filename+' | awk -F: ''{print $4 $5}''', inv
> % SPAWN: Error opening file. File: /usr/tmp/idl_tmp_ZPEOzs
> Too many open files
> % SPAWN: Error managing child process.
>
This became deterministic in my computer. In my case it was caused by non-existing temp directory. Directory created, problem solved.
|
|
|