Hi,<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
for an example of grass.start_command() for parallelizing a bunch<br>
of r.cost runs, see v.surf.icw(.py) in grass7 addons:<br>
<br>
<a href="https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.surf.icw/v.surf.icw.py" target="_blank">https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.surf.icw/v.surf.icw.py</a><br>
<br></blockquote>thank you for that example. I think it explains it very well how it works to assign<br>multiple r.cost runs to single processes with grass.start_command.<br>I am just wondering how it is done when there are multiple consecutive processes<br>
in the for loop. In your example (<a href="http://v.surf.icw.py">v.surf.icw.py</a>) for each step (e.g. r.cost (line 271), r.mapcalc (298))<br>an separate for loop is started...Is there a way to combine the steps etc. in a function (e.g. combination<br>
of r.cost and mapcalc) and launch that function in a way like grass.start_command in a single loop?<br>If possible that would probably save code lines and might be a little more clear (at least to me). <br>I am just asking because one of my skripts which is still in "serial mode" involves lots of steps inside the for loop.<br>
This would create in parallel at least a dozen for loops which might appear very unclear.<br><br>Anyway I think the parallelization can really save computation time of my skripts... :)<br><br>/Johannes<br></div>