On Fri, 21 Mar 2008, Georgios Marentakis wrote:
> Dear all,
> I am having a memory problem when analyzing a rather large data set with
> nested factors in R.
> The model is of the form X~A*B*(C/D/F) A,B,C,D,F being the independent
> variables some of which are nested.
> The problem occurs when using aov but also when using glm or lme.
> In particular I get the following response,
>
> Error: cannot allocate vector of size 1.6 Gb
> R(311,0xa000d000) malloc: *** vm_allocate(size=1733365760) failed (error
> code=3)
> R(311,0xa000d000) malloc: *** error: can't allocate region
> R(311,0xa000d000) malloc: *** set a breakpoint in szone_error to debug
> R(311,0xa000d000) malloc: *** vm_allocate(size=1733365760) failed (error
> code=3)
> R(311,0xa000d000) malloc: *** error: can't allocate region
> R(311,0xa000d000) malloc: *** set a breakpoint in szone_error to debug
>
> This is on an Intel Mac with 2 GBytes of RAM running MacOS X vs. 10.4.11
> The very same result appears on an 8 core Intel Mac with 6 Gbytes of RAM
and
> on a Linux Box with 2 GBytes of RAM.
> Is there a way to bypass this and let R allocate the necessary memory? Is
> this a system problem? Would it be resolved in a mainframe for example?
It is not R which is failing to allocate the memory, but the OS.
Most likely it is a 32-bit address space issue (1.6Gb is a large hole to
find in a (probably) 3Gb address space), so you need a 64-bit OS
(e.g. Mac OS 10.5) and a 64-bit version of R.
>
> thank you very much for your time,
> georgios
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
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