Z P wrote:

we have two server, one is unix (1280M) and linux (2319872k), how can I set the max?

for the Linux one,

R --max-vsize=2319872k --max-nsize=2319872k

Then I use

mem.limits()

nsize vsize NA NA

It seems the limits are not set at all

I want to define an array

a<-array(0,rep(2,28))

Well, you need 4 * 2^28 = 1073741824 Byte to store the data for that array (if numeric). Internally, the data will probably be copied at least once from one object to another, so already consuming ~ 2Gb and you have reached the limit in this case. I am not surprised.


Uwe Ligges


Error: cannot allocate vector of size 2097152 Kb

next I type

a<-array(0,rep(2,27))


It is ok. then

a<-array(0,rep(2,28))

Error: vector memory exhausted (limit reached?)


Is there any way to help? In fact, I am now using some array(0,rep(2,21)), the program run some time then fail, I can not trace what happened since I run R in batchs under Linux. Does this happen probably due to the memory exhaust? (for some array(0,rep(2,10)), my codes work well).




From: Prof Brian Ripley <[EMAIL PROTECTED]>
To: Z P <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: [R] memory limit problem
Date: Mon, 5 Apr 2004 07:12:02 +0100 (BST)

On Linux, you can set memory limits in the shell you use to run R (via
command limit or ulimit, depending on the shell).

Yes, there can be a need to set memory limits on Linux too. However, the
problem was that (apparently, as we have not had a clear report), the
available memory was not all being used, and that is not seen on Linux (or
Solaris or ...).


On Mon, 5 Apr 2004, Z P wrote:

> Do you mean in Linux, there is no need to set memory limit? If needed, how
> to set it? Thanks.


> >From: "Roger D. Peng" <[EMAIL PROTECTED]>
> >
> >In general, this is not an R problem, it is a Windows problem. I find that
> >these types of memory problems do not appear on Linux, for example.


--
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to