Hey there,<br><br>I&#39;m back with some more multithreading problems.<br><br>Following the previous discussion I&#39;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&#39;ve tried implementing versions of Collin&#39;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&#39;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&#39;t play nicely with objects and methods, etc. Does anyone have any experience with doing this kind of procedure with objects? I&#39;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.<br>

<br>Best,<br>Daniel<br>