Hi Johannes,<br><br>One very simple trick would be to switch off using grass.run_command with grass.start_command. grass.start_command() spawns a child process that and continues on to the next line of code, so that you can have several processes going simultaneously. You just have to make sure that the processes play nice with each other and don't cause any problems. It's not the most elegant solution, but it's one that works for many things :)<br>

<br>Best,<br>Daniel<br clear="all">

<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"></span></p><p>--<br></p><p>B.Sc. Daniel Lee<br>

Geschäftsführung für Forschung und Entwicklung<br>ISIS - International Solar Information Solutions GbR<br>Vertreten durch: Daniel Lee, Nepomuk Reinhard und Nils Räder<br></p><p>Softwarecenter 3<br>35037 Marburg<br>Festnetz: <a value="+4964213796256" style="color:rgb(28,81,168)">+49 6421 379 6256</a><br>

Mobil: <a value="+4917661277269" style="color:rgb(28,81,168)">+49 176 6127 7269</a><br>E-Mail: <a href="mailto:Lee@isi-solutions.org" style="color:rgb(28,81,168)" target="_blank">Lee@isi-solutions.org</a><br>Web: <a href="http://www.isi-solutions.org/" style="color:rgb(28,81,168)" target="_blank">http://www.isi-solutions.org</a></p>

<p></p><br>
<br><br><div class="gmail_quote">2012/8/6 Johannes Radinger <span dir="ltr"><<a href="mailto:johannesradinger@gmail.com" target="_blank">johannesradinger@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Dear GRASS users,<br><br>I am running serveral task in GRASS in python scripts. Most of them involve for-loops, e.g. to<br>run various raster modules with different input. In the end all the result maps are mostly aggregated<br>


to one final map. Anyway the maps are generated during the loops in a serial process which takes quite some time.<br><br>Thus I thought one could pseudo-"parallelize" the python scripts. As I very unexperienced in this field I just<br>


read the wiki where it states that one could perform the single parts in own mapsets and then run the task in parallel.<br><br>I attached I short example python script which looks similar to ones I am using involving the r.cost module (one<br>


out of several others) which I run inside a for loop. I tried to understand the example in the wiki <br>(<a href="http://grass.osgeo.org/wiki/Parallelizing_Scripts#Python" target="_blank">http://grass.osgeo.org/wiki/Parallelizing_Scripts#Python</a>) but I can't transfer it to my task.<br>


<br>Maybe someone is more experienced than me and wants to help to improve the speed of such scripts if this<br>is generally possible (in GRASS 6). I think this can also be quite interesting to other users.<br><br>Best regards,<br>


<br>/Johannes<br>
<br>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
<br></blockquote></div><br>