Re: Can't Create Child Processes

From: Capehart, William J <William.Capehart_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 10 2010 - 08:47:55 MST

Ok after a haitus on other things, came back to this problem and it's
still there.

I have added these lines up top after the begin...

setfileoption("nc","Format", "LargeFile")
setfileoption("nc","SuppressClose",False)



After I'm done with each file ("f" via addfile) I "delete" them

delete(f)

I even rebooted the rig on which it's running (ulimit-n = 1024)

And I am still getting the error.

Am I doing the suppress function wrong?

Bill




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 9/27/10 14:32 MDT, "Capehart, William J" <William.Capehart@sdsmt.edu>
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
Received on Wed Nov 10 08:49:46 2010

This archive was generated by hypermail 2.1.8 : Mon Nov 15 2010 - 08:55:22 MST