[GRASS-user] v.rast.stats error: "Unable to seek"

Luí­s Moreira de Sousa luis.de.sousa at protonmail.ch
Fri Feb 5 07:14:38 PST 2021


Hi Markus,

I started by setting up the memory limit setting with g.gisenv, but v.to.rast fails with the same error.

I then tried valgrind. It is not really saying much, I fiddled a bit with it but can't more outputs that what you see below.

> valgrind --tool=memcheck --leak-check=yes --show-reachable=yes $CMD
==60598== Memcheck, a memory error detector
==60598== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==60598== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==60598== Command: v.to.rast input=PSU output=test use=cat memory=10000
==60598==
==60598== Warning: set address range perms: large range [0x154c9d040, 0x170a47950) (undefined)
Killed


I think I can create a workflow to replicate this error, I will work on that next week.

Cheers.


--
Luís Moreira de Sousa
Pastoor Bruggemanlaan 21
6861 GR Oosterbeek
The Netherlands
Phone: +31 628 544 755
Email: luis.de.sousa at protonmail.ch
Mastodon: @luis_de_sousa at mastodon.social
URL: https://ldesousa.codeberg.page

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, February 3, 2021 6:57 PM, Markus Neteler <neteler at osgeo.org> wrote:

> Hi Luí­s,
>
> On Wed, Feb 3, 2021 at 5:51 PM Luí­s Moreira de Sousa via grass-user
> grass-user at lists.osgeo.org wrote:
>
> > Hi Stefan, thank you for the reply.
> > The outputs you request are below. v.rast.stats takes about 8 GB of RAM before failing, only 1/4 of what is available in the workstation. I also tried increasing the memory parameter but it never goes above 8 GB and fails all the same.
>
> If I am not mistaken, the memory= parameter isn't used at all in
> v.rast.stats, hence not passed to v.to.rast:
> https://github.com/OSGeo/grass/blob/e5afa5a8a0f8e39376f4ddfbda1a62abdef99a21/scripts/v.rast.stats/v.rast.stats.py#L167
>
> For a test, you could use g.gisenv and set the "cache" memory to a
> higher value (v.to.rast will respect it then):
> https://grass.osgeo.org/grass78/manuals/variables.html#list-of-selected-internal-grass-environment-variables
> --> MEMORYMB
>
> Eg.
>
> set to 12 GB (default: 300 MB)
>
> ===============================
>
> g.gisenv set="MEMORYMB=12000"
>
> Not sure if that would help anyway.
>
> However:
>
> > Let me know if there is something else I can check. Thank you.
>
> yes, you may try with "valgrind":
> https://grasswiki.osgeo.org/wiki/GRASS_Debugging#Using_Valgrind
>
> CMD="v.to.rast input=PSU output=test use=cat memory=10000"
> valgrind --tool=memcheck --leak-check=yes --show-reachable=yes $CMD --o
>
> The output may give some hints (it will be long).
>
> Best
> Markus




More information about the grass-user mailing list