benducke / Network-reconstruction-tools-for-GRASS-GIS

Node-based network model generator for GRASS GIS 7.x (and QGIS 3.x)
GNU General Public License v3.0
4 stars 1 forks source link

CPU: Run r.cost and r.path in parallel #4

Open benducke opened 3 years ago

benducke commented 3 years ago

Function model_complete():

It should be straight-forward to run r.cost and r.path in parallel (note that the m:n link packages differ in size for each run through the loop, so the thread run times will decrease linearly):

benducke commented 3 years ago

Enable option "threads=" (default: 2) for specifying the number of concurrent operations.

benducke commented 1 year ago

Initial support implemented (so far tested only on Linux): v.net.models

benducke commented 1 month ago

Windows platform is missing a 'sleep' command for thread synchronisation. Win32 has "timeout": https://serverfault.com/questions/432322/how-to-sleep-in-a-batch-file

For the moment, multi-threading is disabled if $SLEEP is not set (see function 'check_setup').