[GRASS-user] issues with r.horizon incombination with multiprocessing

Tinsley Wolfs twolfs15 at student.aau.dk
Tue May 2 07:09:26 PDT 2017


Hi list,

Based on a discussion in the list archive, I copied and edited a script that parallelizes the r.horizon module across multiple cores (link)<http://osgeo-org.1560.x6.nabble.com/Simultaneous-r-horizon-processes-tp4676325p4892854.html>. I have updated this script to work with the current module parameter naming schemes where required. Additionally I added a for loop to the main() function, as I want it to do the r.horizon module for several areas sequentially (setting g.region, etc...).

I have several issues:

1. Each time it creates the workers for the last r.horizon angles for a list item, it also creates the workers for the first angles of the next item in the list. But it should finish the first workers, copy the raster from the temporary mapsets to the current mapset and delete the temporary mapsets before creating new workers and starting the process again.
2. It doesn't calculate the last angles of the last area part of the list that it loops over. Though I think this is because of the first issue which is that the order of execution is off.

Why doesn't it follow the correct order as per the script but move on to the next step before finishing the last? I run the script from the simple python editor in Grass 7.2.0.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170502/fd8e8e41/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: horizonmp.py
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170502/fd8e8e41/attachment-0001.ksh>


More information about the grass-user mailing list