[GRASS-dev] r.univar, ERROR G_realloc:

Glynn Clements glynn at gclements.plus.com
Fri Dec 6 15:58:10 PST 2013


Pietro wrote:

> I tried to use r,univar in grass7 (r58395 on linux 64bit with 24Gb of
> ram and 8Gb of swap), before to run the command I did a distclean, and
> I configured with:
> 
> CFLAGS="-ggdb -Wall -Werror-implicit-function-declaration" ./configure ...
> 
> when I run:
> 
> r.univar map=Combabula_Nearmap.red zones=seg005_64_zones
> percentile=90. output=red.csv -e --o
> 
> The module termanate with:
> 
> D1/1: G_find_raster(): name=MASK mapset=pietro
> Current region rows: 28545, cols: 27645
> ERROR: G_realloc: unable to allocate 68000 bytes of memory at
>        r.univar_main.c:327

Don't use "r.univar -e", particularly for large maps. r.quantile and
r.statistics3 are far more efficient.

> Maybe is a stupid idea but since I had some problems also with
> v.build, do you think that could be possible that the problem is due
> not to the GRASS code, but to my physical memory that maybe is damaged
> in some sector?

That's unlikely. Is the OS recognising that you have 24 GiB of RAM? 
Are you allowed to use all (or most) of it for a single process (check
the output from "ulimit -a")?

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list