- 
                Notifications
    
You must be signed in to change notification settings  - Fork 175
 
r.connectivity.distance: implement walking distance and parallel processing #1108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: grass8
Are you sure you want to change the base?
Conversation
| 
           @ninsbl I tested it using the example from the manual page, resulting in the following error:  | 
    
| 
           Hm... The eror you see is likely related to the number of processes (nprocs). Could you try with   | 
    
          
 Unfortunately, for me it doesn't work with 2 or 4 cores either. One core does work.  | 
    
| 
           Is one of you using a platform other than Linux by any chance? If so, maybe the use of multiprocessing.Pool is using the start method other than fork, like spawn, that requires that what is ran to be Pickle-able. Sometimes the file needs to be reorganized, or even the part that is ran by multiple processes be specially designed and extracted in another file to be executed correctly. The traceback shown doesn't properly mention the real error for me. Alternatively, is there any chance that the Python version is 3.12 running on Linux, and using a multiprocessing function using the fork startup method also calls a sub process, such as it raises a DepreciationWarning (it can cause deadlocks and the default startup method will change to spawn in 3.14), and that this depreciationwarning is saved to a results file, making it invalid?  | 
    
| 
           Using multiprocessing correctly, especially in a cross platform manner, is a little bit trickier than one can imagine  | 
    
          
 I am running version 3.10.12, the default on Ubuntu 22.04  | 
    
| 
           Hi @ninsbl @echoix I am not sure how to propose changes to code in a pull request, so doing it this way. To avoid a deprecation warning from NumPy, I suggest to replace the code from line 634 - 639 with  | 
    
          Running with nprocs=1When running the example from the manual page with nproc=1, I am getting the warning: I guess it is when writing values to output vector maps, perhaps in line 590 and 597? This warning pops up irrespective of the number of nprocs. Running with nprocs=4When running with nprocs=4, I am getting an output, but with the following warning And the temporary layers  Running with nprocs=2I get the following error when running with nprocs=2 With nprocs=8 | 
    
Include also #1091