Hi, thank you for your responce.
I am copying here my post on mailing list about how…
So, here are two versions of script, of parallel GRASS jobs with “split map into spatial chunks (possibly with overlap to gain smooth results)” approach.
First script ( script1.bash ) is splitting the region in specified number of smaller regions, do the calculation ( calculating NDVI for example ) in parallel way, overlay parts together and remove all small parts and regions.
Second script ( script2.bash ) is doing the same job until r.patch part. here r.patch is being done in a kind of cascade way. When suppose you have 8 parts that need to be patched r.patch is patching 1 with 2 , 3 with 4, 5 with 6 and 7 with 8 parallelly and creates 4 parts, after these 4 parts are being patched the same parallel way. The idea was interesting but actually it is taking longer then in first way and take more resources.
So I would like to ask people who are interested in this question to help me to understand, if there is another approach in this case to overlay chunks together, or may be export all chunks in one file. because my final goal is to import image, do the calculation and export the image. Finally it should work as underlying script for this GRASS - PyWPS web frontend http://93.187.165.125/gisservices/ .
Any help will be appreciated.
Regards,
Andranik
And you can see attached scripts.
There is no meaning which module I will use, r.mapcalc or others. I just need a real life calculation that is complex inougth for me to achive performance with running it in parallel. I will try modules you told me. Thank you
On Fri, Dec 14, 2012 at 1:31 AM, Markus Neteler <neteler@osgeo.org> wrote:
On Tue, Dec 11, 2012 at 2:59 PM, Andranik Hayrapetyan
<andranik.h89@gmail.com> wrote:
Good day,
I am trying implement paralisation for some grass task and understand in
what cases parallelisation is needed and where it is not.
Until now I was doing experiments with calculation of NDVI with r.mapcalc.
But as my experiments shows, calculation of NDVI is too simple task to
parallelise it.
How did you implement it?+
Can you point me to a real life calculation which is more complex than NDVI
? For example, if calculation of NDVI takes 10 minutes to complete on
specified raster, I want to know a real life calculation that takes, let’s
say, 30 minutes …
You mean with r.mapcalc? Otherwise cost surfaces or watershed calculation may
be interesting.
Markus
(attachments)
script1.bash (2.5 KB)
script2.bash (2.49 KB)