<div dir="ltr"><div><div><div><div><div><div><div>Thanks all,<br><br></div>I ended up having a script that tiles my overall region (using v.mkgrid). I then loop through the tiles, and create a set of subregions on the fly (using the save= option available for g.region). So in the end I have tiles represeneted as a set of regions, named "region_[1-n]".<br><br></div>I then use the WIND_OVERRIDE env variable to process the tiles:<br><br></div>- On my personal machine, I can use GNU parallel: <br><br></div>g.list type=region pat=region_* | parallel WIND_OVERRIDE={} r.series in=`g.list rast pat=temp_* sep=","` out=tiled_{} method=quantile quantile=0.95 --o<br><br></div>- BUT: on the cluster, I can't use GNU parallel, so I generate one script per region, which essentially is a one liner: <br><br></div>WIND_OVERRIDE=region_n r.series in=`g.list rast pat=temp_* sep=","` out=tiled_region_n method=quantile quantile=0.95 --o<br><br></div><div>This script is launch silently using GRASS_BATCH_JOB.<br><br></div>My problem now is that I got errors because several GRASS scripts are hitting the GRASS database at the same time:<br><br><pre>Starting GRASS GIS...
ERROR: pierre.roudier is currently running GRASS in selected mapset (file <i class="gmail-moz-txt-slash"><span class="gmail-moz-txt-tag">/</span>projects/nesi00165/nobackup/modis/grassdata/modis_ts/PERMANENT/PERMANENT<span class="gmail-moz-txt-tag">/</span></i>.gislock found). Concurrent use not allowed.
You can force launching GRASS using -f flag (note that you need permission for this operation). Have another look in the processor manager just to be sure...
Exiting...</pre><div><div><div><div><div><div><div><div><div>My question: in this instance, is it safe to use the -f flag, given these different GRASS instances are not writing the same dataset to the DB?<br><br></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 21 April 2017 at 20:44, Blumentrath, Stefan <span dir="ltr"><<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Pierre,<br>
<br>
tiling should speed up significantly, if you process the tiles in parallel (and if you have multiple cores and if IO is not the bottleneck (e.g. slow network connection to the data)).<br>
Care has to be taken with the region settings, though.<br>
<br>
See e.g.:<br>
<a href="https://grasswiki.osgeo.org/wiki/Parallel_GRASS_jobs#Working_with_tiles" rel="noreferrer" target="_blank">https://grasswiki.osgeo.org/<wbr>wiki/Parallel_GRASS_jobs#<wbr>Working_with_tiles</a><br>
<br>
Cheers<br>
Stefan<br>
<br>
______________________________<wbr>__________<br>
Von: grass-user <<a href="mailto:grass-user-bounces@lists.osgeo.org">grass-user-bounces@lists.<wbr>osgeo.org</a>> im Auftrag von Pierre Roudier <<a href="mailto:pierre.roudier@gmail.com">pierre.roudier@gmail.com</a>><br>
Gesendet: Freitag, 21. April 2017 00:49<br>
An: grass-user<br>
Betreff: [GRASS-user] Aggregation of massive number of raster layers with       r.series<br>
<div class="HOEnZb"><div class="h5"><br>
Hi,<br>
<br>
I am trying to compute the 95th percentile of a massive grid (12+<br>
million pixels) for a massive number of layers (~2500 layers).<br>
<br>
I am doing the aggregation using r.series on our cluster running grass<br>
7.2, but of course it takes ages (21% there after 3 days).<br>
<br>
- I tried to tile the process, but it doesn't seem to help much.<br>
<br>
- Is there any benefit for me to switch to t.rast.aggregate? My<br>
understanding was that it was a wrapper around r.series.<br>
<br>
- Does anyone have a fancy trick to make the aggregation go faster<br>
(parallelisation)?<br>
<br>
Cheers,<br>
<br>
Pierre<br>
</div></div><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a><br>
</div></div></blockquote></div><br></div>