[R] File opening error after 1020 files opened

Henrik Bengtsson hb at maths.lth.se
Fri Feb 28 09:03:03 CET 2003


When running my WinXP Pro testing I used pixmap 0.3-1:

pixmap          Bitmap Images (``Pixel Maps'')

Description:

Package: pixmap
Version: 0.3-1
Title: Bitmap Images (``Pixel Maps'')
Depends: R (>= 1.6.0)
Author: Friedrich Leisch and Roger Bivand
Maintainer: Friedrich Leisch <Friedrich.Leisch at ci.tuwien.ac.at>
Description: Functions for import, export, plotting and other
        manipulations of bitmapped images.
License: GPL version 2.
Built: R 1.6.2; Win32; Wed Feb 19 08:24:37 GMTST 2003

/Henrik

> -----Original Message-----
> From: r-help-admin at stat.math.ethz.ch 
> [mailto:r-help-admin at stat.math.ethz.ch] On Behalf Of Roger Bivand
> Sent: den 28 februari 2003 18:50
> To: Dirk Eddelbuettel
> Cc: jonathan_li at agilent.com; hb at maths.lth.se; r-help at stat.math.ethz.ch
> Subject: Re: [R] File opening error after 1020 files opened
> 
> 
> On Thu, 27 Feb 2003, Dirk Eddelbuettel wrote:
> 
> > On Thu, Feb 27, 2003 at 08:08:48PM -0800, jonathan_li at agilent.com 
> > wrote:
> > > The file open failed at when i=1021. So the difference in 
> when file 
> > > openning fails is due to the difference in system, not to 
> the fact 
> > > that I am openning different files each time.
> > 
> > It's a question for the operating system / kernel. See e.g. what I 
> > just found via Google at
> > 
> >   http://www.jguru.com/faq/view.jsp?EID=239607
> > 	
> > and which answers the question "How can I increase the number of 
> > sockets and files that I can simultaneously have open under 
> Linux?" as 
> > follows:
> > 
> >   Linux 2.2.x kernels allow control of the maximum number 
> of open files
> >   through the /proc/sys/fs/file-max pseudo-file. Read that 
> file to see the
> >   current limits; write a new value to it to change the limit. For 
> > example:
> > 
> >   cat /proc/sys/fs/file-max
> >   echo 16384 >/proc/sys/fs/file-max
> >     
> >   You may also find it useful to manipulate the kernel 
> inode limit. This
> >   is controlled, using the same techniques, through the 
> >   /proc/sys/fs/inode-max pseudo-file.
> > 
> > On my Debian systems this would appear to be set to 4096, 
> both under 
> > 2.2 and 2.4 kernels.
> > 
> > Still, what seems odd is that the pixmap library doesn't close the 
> > filehandle after reading.  It seems to me that you should 
> be able to 
> > loop endlessly over the ops open; do something; close; 
> repeat as that 
> > would only consume one file handle at a time.
> 
> Since I wrote that bit of pixmap, could I ask that people 
> report which version they are using (help(package=pixmap))? 
> If you are using 0.3-1, you will see that function read.pnm() 
> makes a connection to a file, opens it, reads it, and closes 
> the connection. I don't have a copy of 0.3-0 to hand, but 
> believe it did the same. Could you please confirm that we are 
> all looking at 0.3-1?
> 
> Roger
> 
> > 
> > Dirk
> > 
> > 
> 
> -- 
> Roger Bivand
> Economic Geography Section, Department of Economics, 
> Norwegian School of Economics and Business Administration, 
> Breiviksveien 40, N-5045 Bergen, Norway. voice: +47 55 95 93 
> 55; fax +47 55 95 93 93
> e-mail: Roger.Bivand at nhh.no
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list 
> http://www.stat.math.ethz.ch/mailman/listinfo/> r-help
> 
>




More information about the R-help mailing list