Re: [GRASS-dev] ParallelModuleQueue freezes...
On Thu, 27 May 2021 at 04:07, Anna Petrášová wrote: > > Could you provide an example that is failing? The doctests are running for > me. I spent some time fixing it a couple months ago. I use Python 3.6, I > wonder if newer Python would cause some issues. > https://github.com/OSGeo/grass-addons/pull/523/files line 544, the commented lines are not working for me.. If you want to try t.vi just comment line 543 and uncomment the following lines.. > Anna > -- ciao Luca www.lucadelu.org ___ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] ParallelModuleQueue freezes...
Could you provide an example that is failing? The doctests are running for me. I spent some time fixing it a couple months ago. I use Python 3.6, I wonder if newer Python would cause some issues. Anna On Tue, May 25, 2021 at 8:33 AM Stefan Blumentrath < stefan.blumentr...@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://grass.osgeo.org/grass79/manuals/libpython/pygrass.modules.interface.html?highlight=parallel%20module%20qu#pygrass.modules.interface.module.ParallelModuleQueue > > > > 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… > > > > Any ideas? > > > > Cheers, > > Stefan > ___ > grass-dev mailing list > grass-dev@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/grass-dev > ___ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] ParallelModuleQueue freezes...
On Wed, 26 May 2021 at 15:13, Stefan Blumentrath wrote: > > 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 > probably yes > 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? > it seems to me that MultiModule returns "None" when it finish otherwise return self.p (a Process instance) > Any help is much appreciated... > same for my side :-) > Cheers > Stefan > > 1: > https://grass.osgeo.org/grass79/manuals/libpython/_modules/pygrass/modules/interface/module.html#MultiModule > -- ciao Luca www.lucadelu.org ___ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] ParallelModuleQueue freezes...
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 Sent: tirsdag 25. mai 2021 20:17 To: Stefan Blumentrath Cc: GRASS developers list Subject: Re: [GRASS-dev] ParallelModuleQueue freezes... Hi Stefan, On Tue, May 25, 2021 at 2:33 PM Stefan Blumentrath 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.ParallelModuleQueuedata=04%7C01%7C%7C61c3f8df57d44d9 > 0905108d91fa9435d%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C6375756 > 34109191335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMz > IiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=PC64zLohfEqbxUcNfX4U > hHHNf5VIgRO7x0o%2FbiYHyU4%3Dreserved=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%3Dcodedata=04%7C01%7C%7C61c3f8df57d44d90905108d91fa9435d%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637575634109191335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=tbzIS%2FhRmi6hWOAuieoNxubEN73Q8MDmfqHK0wyy7eE%3Dreserved=0 Best, Markus ___ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev