Hello: I am trying to work with a couple of microarray data sets, using platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 8.1 year 2003 month 11 day 21 language R In the shortcut for invoking R I have set --max-mem-size=1024M, so that I get> memory.limit()[1] 1073741824 Below is an example of what keeps happening as I am working. Any suggestions as to how I can stop running out of mermory?> memory.size()[1] 502904736> log2.harvAD <- log2.harvAD[log2.harvAD$Probesets %in%harvard.genes$probeset,] Error: cannot allocate vector of size 49 Kb> log2.harvAD <- log2.harvAD[,c(1,1+order(names(log2.harvAD)[-1]))]Error: cannot allocate vector of size 49 Kb> log2.harvAD.annot <- unlist(lapply(strsplit(names(log2.harvAD),split=":"),+ function(L) L[1]))[-1]> log2.harvAD$probeset <- as.character(log2.harvAD$probeset)Error: cannot allocate vector of size 49 Kb> memory.size()[1] 502912536> gc()used (Mb) gc trigger (Mb) Ncells 2586025 69.1 6812252 182.0 Vcells 20108076 153.5 41205530 314.4> memory.size()[1] 330645720> memory.limit()/memory.size()[1] 3.247408> ## Try again: > log2.harvAD <- log2.harvAD[log2.harvAD$Probesets %in%harvard.genes$probeset,] Error: cannot allocate vector of size 49 Kb [[alternative HTML version deleted]]
Not really much hope here, but 1) If you have fast discs, try increasing --max-mem-size to more than your RAM, and 2) Try compiling up R-devel (see the FAQ for where to get it) as it has a potentially better memory allocator. I supect though that your problem is too big for R on 32-bit Windows. BDR On Mon, 22 Dec 2003, Richards, Thomas wrote:> Hello: > > I am trying to work with a couple of microarray data sets, using > > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major 1 > minor 8.1 > year 2003 > month 11 > day 21 > language R > > > In the shortcut for invoking R I have set --max-mem-size=1024M, so that I > get > > > memory.limit() > [1] 1073741824 > > Below is an example of what keeps happening as I am working. Any suggestions > as to how I can stop running out of mermory? > > > memory.size() > [1] 502904736 > > log2.harvAD <- log2.harvAD[log2.harvAD$Probesets %in% > harvard.genes$probeset,] > Error: cannot allocate vector of size 49 Kb > > log2.harvAD <- log2.harvAD[,c(1,1+order(names(log2.harvAD)[-1]))] > Error: cannot allocate vector of size 49 Kb > > log2.harvAD.annot <- unlist(lapply(strsplit(names(log2.harvAD),split=":"), > + function(L) L[1]))[-1] > > log2.harvAD$probeset <- as.character(log2.harvAD$probeset) > Error: cannot allocate vector of size 49 Kb > > memory.size() > [1] 502912536 > > gc() > used (Mb) gc trigger (Mb) > Ncells 2586025 69.1 6812252 182.0 > Vcells 20108076 153.5 41205530 314.4 > > memory.size() > [1] 330645720 > > memory.limit()/memory.size() > [1] 3.247408 > > ## Try again: > > log2.harvAD <- log2.harvAD[log2.harvAD$Probesets %in% > harvard.genes$probeset,] > Error: cannot allocate vector of size 49 Kb > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > >-- 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
Go download R version 1.8.1 (or later if available). They fixed something with memory management from 1.8.0 to 1.8.1 which helped me out of the exact same problem. I think it has to do with memory fragmentation; R cannot find any chunk big enough for even a small vector after some time. Kind regards, Jesper Frickmann Statistician, Quality Control Novozymes North America Inc. Tel. +1 919 494 3266 Fax +1 919 494 3460 -----Original Message----- From: Richards, Thomas [mailto:RichardsTJ2 at UPMC.EDU] Sent: Monday, December 22, 2003 3:11 PM To: 'r-help at stat.math.ethz.ch' Subject: [R] Memory allocation Hello: I am trying to work with a couple of microarray data sets, using platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 8.1 year 2003 month 11 day 21 language R In the shortcut for invoking R I have set --max-mem-size=1024M, so that I get> memory.limit()[1] 1073741824 Below is an example of what keeps happening as I am working. Any suggestions as to how I can stop running out of mermory?> memory.size()[1] 502904736> log2.harvAD <- log2.harvAD[log2.harvAD$Probesets %in%harvard.genes$probeset,] Error: cannot allocate vector of size 49 Kb> log2.harvAD <- log2.harvAD[,c(1,1+order(names(log2.harvAD)[-1]))]Error: cannot allocate vector of size 49 Kb> log2.harvAD.annot <- > unlist(lapply(strsplit(names(log2.harvAD),split=":"),+ function(L) L[1]))[-1]> log2.harvAD$probeset <- as.character(log2.harvAD$probeset)Error: cannot allocate vector of size 49 Kb> memory.size()[1] 502912536> gc()used (Mb) gc trigger (Mb) Ncells 2586025 69.1 6812252 182.0 Vcells 20108076 153.5 41205530 314.4> memory.size()[1] 330645720> memory.limit()/memory.size()[1] 3.247408> ## Try again: > log2.harvAD <- log2.harvAD[log2.harvAD$Probesets %in%harvard.genes$probeset,] Error: cannot allocate vector of size 49 Kb [[alternative HTML version deleted]] ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help