Re: Can't Create Child Processes

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Mon Sep 27 2010 - 17:03:18 MDT

Hi Bill,
There is no explicit close function corresponding to addfiles or
addfile. However, if you are using NetCDF data, by default, each file
stays open (and thus consumes a file descriptor) until you delete or
reassign the variable that refers to it. If using addfiles the same
applies to each file in the list of files. Deleting or reassigning the
list variable closes each file in the list. You can change this
behavior and make NCL open and close the file for each access by
setting the setfileoption "SuppressClose" to False. See
http://www.ncl.ucar.edu/Document/Functions/Built-in/setfileoption.shtml.
This usually has little performance impact when files are opened for
reading only.
  -dave

On Sep 27, 2010, at 2:32 PM, Capehart, William J wrote:

> Hi Daryl:
>
> My ulimit -n is 256.
>
> I AM working with netcdf data but using addfile to open them. But the
> system and systemfunc failures are happening with gzip and gunzip.
>
> How exactly do you "close" addfiles? And how will this help with the
> zipping and unzipping?
>
> Thanks Much
> Bill
>
>
>
> On 9/27/10 14:25 MDT, "Daryl Harzmann" <akrherz@iastate.edu> wrote:
>
>> On Mon, 27 Sep 2010, Capehart, William J wrote:
>>
>>> I’m doing a goodly amount of file management in one of my
>>> post-processing scripts where I am gunzipping and re-gzipping data
>>> before and behind me as I march through a lot of model output.
>>>
>>> Recently, I’ve been hitting these errors when I use the function
>>> “systemfunc”:
>>>
>>> fatal:systemfunc: cannot create child process:[errno=12]
>>>
>>> Ideas? Note that the system() subroutine yields no such error.
>>> BUT.
>>> Instead, it fails to execute the requested shell command and keeps
>>> going
>>> drunkenly onward until it tries to open a file that hasn’t been
>>> gunziped
>>> or similar crash.
>>
>> This sounds like you are running out of file descriptors. You are
>> probably
>> hitting 1024 open files (ulimit -n will display the limit). Are you
>> certain you are closing files and cleaning up after yourself as you
>> march
>> along? Is this NetCDF data?
>>
>> daryl
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Sep 27 17:03:24 2010

This archive was generated by hypermail 2.1.8 : Mon Oct 04 2010 - 08:55:54 MDT