Hi, thank you for your responce.<div><br></div><div>I am copying here my post on mailing list about how...</div><div><br></div><div><i><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">So, here are two versions of script, of parallel GRASS jobs with "</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">split map into spatial chunks (possibly with overlap to gain smooth results)</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">" approach.</span></i><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<i><br></i></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><i>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.</i></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><i><br></i></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<i>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.</i></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><i><br></i></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<i>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 <a href="http://93.187.165.125/gisservices/" target="_blank" style="color:rgb(17,85,204)">http://93.187.165.125/gisservices/</a> .</i></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><i><br></i></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<i>Any help will be appreciated.</i></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><i><br></i></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<i>Regards,</i></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><i>Andranik </i></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<i><br></i></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">And you can see attached scripts.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">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</div>
<br><div class="gmail_quote">On Fri, Dec 14, 2012 at 1:31 AM, Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, Dec 11, 2012 at 2:59 PM, Andranik Hayrapetyan<br>
<<a href="mailto:andranik.h89@gmail.com">andranik.h89@gmail.com</a>> wrote:<br>
> Good day,<br>
><br>
> I am trying implement paralisation for some grass task and understand in<br>
> what cases parallelisation is needed and where it is not.<br>
> Until now I was doing experiments with calculation of NDVI with r.mapcalc.<br>
> But as my experiments shows, calculation of NDVI is too simple task to<br>
> parallelise it.<br>
<br>
</div>How did you implement it?+<br>
<div class="im"><br>
> Can you point me to a real life calculation which is more complex than NDVI<br>
> ?  For example, if calculation of NDVI takes 10 minutes to complete on<br>
> specified raster, I want to know a real life calculation that takes, let's<br>
> say, 30 minutes ...<br>
<br>
</div>You mean with r.mapcalc? Otherwise cost surfaces or watershed calculation may<br>
be interesting.<br>
<span class="HOEnZb"><font color="#888888"><br>
Markus<br>
</font></span></blockquote></div><br></div>