[GRASS-user] Problem with r.basin in grass7

Markus Metz markus.metz.giswork at gmail.com
Wed Nov 5 00:55:51 PST 2014


On Tue, Oct 28, 2014 at 5:13 PM, Markus Neteler <neteler at osgeo.org> wrote:
> Hi Andrea,
>
> On Fri, Oct 24, 2014 at 3:27 PM, Andrea Timmermann <timmermann at gmx.at> wrote:
>> Hi Markus,
>>
>> Thanks for your answer! I have now however another problem ...
>> When running:
>>
>> r.basin map=map at Elevation prefix=o coordinates=-71.10394196,43.9865230801
>> threshold=19005 dir=C:\\Users\\Andrea\\Basins
>>
>> I get:
>> " ....
>> v.to.rast complete.
>> All in RAM calculation...
>> Reading raster map <o_map_drainage_e>...
>> Calculating basins using vector point map...
>> Current region rows: 21612, cols: 21612
>> ERROR: G_calloc: unable to allocate 21612 * 4 bytes of memory at io.c:41
>
> So, starting with GRASS 7 revision r62444 (see startup screen or
> g.version -g) you will be told *which* module actually failed,

This is not exactly true. You will be told where in the source code
memory allocation failed. This can be somewhere in a library, then you
don't know which module actually failed. You need to check the return
code of the module, as of r62566 automatically done by
grass.run_command in trunk.

Markus M

> so the
> G_calloc error will be more useful. To get that, you will need to
> update your GRASS GIS 7 installation.
>
> However, a few thoughts before:
>
> Current region rows: 21612, cols: 21612
> i.e. 467078544 cells at 24 bytes/cell (AFAIK). That is:
>
>> 467078544 * 24 / 1024 / 1024/ 1024
> [1] 10.44002
>
> Leaving a bit for the operating system etc, you may exceed 12GB RAM if
> I got the numbers right.
>
> Are you sure that you want to use 467 million cells? If not, check
> "g.region -p", perhaps the computational region resolution is too
> high?
>
> best
> Markus
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list