Thanks, Markus.
Seems that the ParallelModuleQueue itself works if it is fed with Module objects, but not if MultiModule objects are put into the queue...
So, I believe I am struggling with the same issue as Luca:
https://github.com/OSGeo/grass-addons/pull/523#issue-629160914
Can it be that returns of the MuliModule should be different? If I understand the source code [1] correctly, Module returns "self" (a Module object) while MultiModule returns "None". Can that be the root cause?
Any help is much appreciated...
Cheers
Stefan
1: https://grass.osgeo.org/grass79/manuals/libpython/_modules/pygrass/modules/interface/module.html#MultiModule
-----Original Message-----
From: Markus Neteler <neteler@osgeo.org>
Sent: tirsdag 25. mai 2021 20:17
To: Stefan Blumentrath <Stefan.Blumentrath@nina.no>
Cc: GRASS developers list <grass-dev@lists.osgeo.org>
Subject: Re: [GRASS-dev] ParallelModuleQueue freezes...
Hi Stefan,
On Tue, May 25, 2021 at 2:33 PM Stefan Blumentrath <Stefan.Blumentrath@nina.no> wrote:
Dear devs,
Currently, I am trying to run a combination of ParallelModuleQueue and MultiModule as described here in GRASS 7.8:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgras
s.osgeo.org%2Fgrass79%2Fmanuals%2Flibpython%2Fpygrass.modules.interfac
e.html%3Fhighlight%3Dparallel%2520module%2520qu%23pygrass.modules.inte
rface.module.ParallelModuleQueue&data=04%7C01%7C%7C61c3f8df57d44d9
0905108d91fa9435d%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C6375756
34109191335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMz
IiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PC64zLohfEqbxUcNfX4U
hHHNf5VIgRO7x0o%2FbiYHyU4%3D&reserved=0
It seems - in contrast to the documentation - also the finish_= parameter needs to be set to True for the modules to run.
However, after finishing the queue, the script stalls and does not seem to get over queue.wait().
Just to be clear, also the code from the doc does not seem to work for
me...
While I have no direct recommendation you may want to check the working code here, in the addons:
- t.rast.mosaic
- t.sentinel.import
- t.sentinel.mask
- t.rast.resample
See: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsearch%3Fq%3Dorg%253Amundialis%2BParallelModuleQueue%26type%3Dcode&data=04|01||61c3f8df57d44d90905108d91fa9435d|6cef373021314901831055b3abf02c73|0|0|637575634109191335|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=tbzIS%2FhRmi6hWOAuieoNxubEN73Q8MDmfqHK0wyy7eE%3D&reserved=0
Best,
Markus