[GRASS-user] "Parallelization" of Python Script

Daniel Lee lee at isi-solutions.org
Tue Aug 7 07:56:26 PDT 2012


@Hamish - I posted the code on the wiki, thanks for the tip.

2012/8/7 Johannes Radinger <johannesradinger at gmail.com>

> Hi Daniel,
>
> In your loop what do you mean with "job" respectivle the number of jobs.
> Is that e.g. 3 task x 200 maps = 600 jobs?
>
>
That was my thought, yes - depending on how you want to implement it of
course. In that context 600 jobs would probably be fine, or even mroe -
good thing the computer doesn't get bored ;) The variable running_jobs was
meant to keep track of what jobs are currently being formed.


> Attached there is a little python script which applies a focal filter on a
> raster map but based on a user supplied r.cost
> distance from each cell instead of a moving window. Thus the script loops
> over each single raster cell (transfered to a
> temporary point vector) and calculates r. cost, mapcalc and r.univar which
> takes quite a lot of time. The script is working
> so far and uses g.parser to generate the gui interface etc.
>
> I think I can upload this skript to the addons/wiki but before I'd like to
> make it faster (e.g. parallize the code).
>
> Thank you for your help so far...
>
> /Johannes
>
>
I think as far as posting things on the wiki is concerned, the more
examples the merrier, we just have to make sure that it stays nice and
readable and that everything works.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20120807/aa37ae88/attachment.html>


More information about the grass-user mailing list