[GRASS-user] Simultaneous r.horizon processes

Daniel Lee lee at isi-solutions.org
Sun Apr 29 12:14:29 EDT 2012


Hey there,

I'm back with some more multithreading problems.

Following the previous discussion I've switched from trying to do
multithreading with r.horizon and have switched to doing my calculations
directly with r.sun. Of course, I want to use all my cores for r.sun,
though, so I've tried implementing versions of Collin's code using the
multithreading library. Just for testing, I implemented a spatial
partitioner that uses g.region to split the map iteratively into different
sections, calls r.sun for these smaller sections, and then waits for the
processes to finish before continuing. It behaves very strangely, though,
and at the end it produces empty maps. The values are all -nan. As I first
spatially partition the map and THEN run through the year, I don't think
that the partitioning is the problem, but perhaps something with the
multiprocessing library. My program uses objects and it seems the library
doesn't play nicely with objects and methods, etc. Does anyone have any
experience with doing this kind of procedure with objects? I'd hate to have
to reprogram everything and just use functional programming, especially
because of all the other disadvantages that that would bring for
maintenance stuff in the future.

Best,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20120429/2f95cbb0/attachment.html


More information about the grass-user mailing list