[R] Memory error in Mac OS X Aqua GUI v1.01 with cluster package functions

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Feb 23 09:18:20 CET 2005


The problem is probably that your 32-bit application has become fragmented 
in its address space.  (I have been told that 64-bit builds of R on MacOS 
X will need 10.4, and the binary on CRAN is definitely 32-bit.)

The distance matrix for your object alone takes 800Mb, so you will 
struggle on any 32-bit OS, let alone on a machine with `only' 1Gb RAM.
However, using R's dist() rather than cluster's daisy() will need less 
memory for this task.

This is R-help not the Bioconductor list, and outside bioinformatics the 
prevailing opinion is that clustering 10,000 cases is not sensible.  But 
there are methods of clustering that do not use the distance matrix, e.g. 
clara() in the (unmentioned) package cluster than provides daisy().


On Tue, 22 Feb 2005, Betty Gilbert wrote:

> I'm sorry if the answer to my problem is buried in the archives. I have 
> limited experience with R  and I couldn't find a solution to my particular 
> problem. I am running  Mac OS X Aqua GUI v1.01 on a new G5 running os 10.3.8 
> with a 1.8Ghz processor and 1GB of sdram. I just downloaded bioconducter a 
> week ago and I'm trying to cluster a matrix I created with a simulation with 
> dimensions
> dim(nca35)
> [1] 10481    12
>
> with size
>>  object.size(nca352)
> [1] 1426204
>
> I checked my ulimits variable on the unix terminal and it says it's unlimited 
> as does

But your machine and OS impose limits that ulimits is not telling you.

>>  mem.limits()
> nsize vsize
>   NA    NA
> But I'm still getting errors like the following with funtions in the cluster 
> package
>>  daisy(nca352, metric= "euclidean", stand=FALSE)->dnca35
> Error: cannot allocate vector of size 858213 Kb
> *** malloc: vm_allocate(size=878813184) failed (error code=3)
> *** malloc[599]: error: Can't allocate region
> if it helps i also checked
>>  gc()
>         used (Mb) gc trigger   (Mb)
> Ncells 448662 12.0     741108   19.8
> Vcells 847630  6.5  135357901 1032.7
>
> I tried the suggested unix command in the memory help doc but that doesn't 
> work in the Aqua GUI. Can someone tell me how to change the Vcells? Although 
> to the best of my understanding (which is limited) I shouldn't have to do 
> that. Any suggestions would be greatly appreciated.
> thanks,
> betty
> -- 
> Betty Gilbert
> lgilbert at berkeley.edu
> Taylor Lab
> Plant and Microbial Biology
> 321 Koshland Hall
> U.C. Berkeley
> Berkeley, Ca 94720

-- 
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




More information about the R-help mailing list