[STATSGRASS] memory issues.

Edzer J. Pebesma e.pebesma at geo.uu.nl
Thu Apr 6 06:10:49 EDT 2006


Daniel, it seems you have a setup that anticipated large arrays.
What happens if you I give in R:

 > object.size(as.numeric(1:1e9))

I get:

Error: cannot allocate vector of size 3906250 Kb
In addition: Warning messages:
1: Reached total allocation of 1023Mb: see help(memory.size)
2: Reached total allocation of 1023Mb: see help(memory.size)

but if your R is really 64 bits, this should work.
--
Edzer

Daniel McInerney wrote:

>Hello list,
>
>I've been using R/GRASS for satellite
>image classification and I've been content
>with it's capabilities. I recently changed
>study area and increased the number
>of image bands being used for classification
>and began to encounter a series of memory
>related issues during R sessions.
>
>GRASS rasters are read in using
>'readCELL6sp' and then stored as a data.frame
>i.e.
>  
>
>>tmpimg <- data.frame(readCELL6sp("rasterlayer")[,1])
>>    
>>
>
>The current study region is composed of approximately
>3989808 pixels and up to 15 bands. The .RData file
>is in excess of 700Mb.
>
>Various error messages have been returned during the
>process.
> 
>The following when reading in the grass rasters
>$>"cannot open file '/tmp/RtmpRAYfK2/file74b0dc51', reason
>        'No such file or directory"  
>
>There is no shortage of space available in the partition
>within which /tmp resides.
>
>The following during image classification. It occurs
>during the  second iteration after modification of
>parameters and the first classification has been
>written to GRASS with 'writeRast6':
>
>$>Error: cannot allocate vector of size 187022 Kb
>
>When trying to edit functions after above errors
>occurred.
>$>Error in edit(name, file, title, editor) :
>        problem with running editor vi
>
>
>I've included gc() in my functions as well as removing
>temporary objects during runtime. I recompiled R to
>enable linux-lfs and 64bit libs. I've also started R with
>various combinations of --max/min-vsize and --max/min-nsize
>However, none of these have greatly improved the situation.
>
>I'm writing to know whether anyone has encountered
>something similar and whether a work around exists? Am
>I asking too much of R or am I overlooking something?
>
>Any advice or suggestions would be greatly appreciated.
>
>Thanks in advance,
>
>Regards,
>Daniel.
>
>
>
>System
>-------
>
>Debian 2.6.8-11-amd64
>R 2.2.1
>sp 0.8-9
>spgrass6 0.1.3
>spGDAL 0.1.1
>spproj 0.3-2
>GRASS 6.1 cvs 25.02.06
>
>
>_______________________________________________
>statsgrass mailing list
>statsgrass at grass.itc.it
>http://grass.itc.it/mailman/listinfo/statsgrass
>  
>




More information about the grass-stats mailing list