[GRASS-user] "Parallelization" of Python Script

Johannes Radinger johannesradinger at gmail.com
Mon Aug 6 08:38:39 PDT 2012


Dear GRASS users,

I am running serveral task in GRASS in python scripts. Most of them involve
for-loops, e.g. to
run various raster modules with different input. In the end all the result
maps are mostly aggregated
to one final map. Anyway the maps are generated during the loops in a
serial process which takes quite some time.

Thus I thought one could pseudo-"parallelize" the python scripts. As I very
unexperienced in this field I just
read the wiki where it states that one could perform the single parts in
own mapsets and then run the task in parallel.

I attached I short example python script which looks similar to ones I am
using involving the r.cost module (one
out of several others) which I run inside a for loop. I tried to understand
the example in the wiki
(http://grass.osgeo.org/wiki/Parallelizing_Scripts#Python) but I can't
transfer it to my task.

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

Best regards,

/Johannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20120806/271980f6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GRASS_Parallel_skript.py
Type: application/octet-stream
Size: 798 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20120806/271980f6/attachment.obj>


More information about the grass-user mailing list