Closed leogm99 closed 11 months ago
Using joblib it was possible to implement in a parallel way the algorithm all_pairs_shortest_path_length: commit here.
All-pairs shortest path length algorithm
Now the algorithm receives a parameter (false by default) that allows to execute the algorithm in its classic form or in its parallel form.
All networkx tests continued to succeed when run with the modified algorithm in its parallel version.
When using multiprocessing to parallelize, one of the tests (not directly related to shortest_path algorithms) failed with a serialization exception. Maybe related to https://github.com/networkx/networkx/pull/2265#issuecomment-249754905.
time taken (including cloning the networkx repository, mounting the virtual environment and trying without success install watson): 2 hours, 30 minutes.
Using Joblib was also possible to implement in a parallel way the algorithm betwennes_centrality: Commit
All networkx tests continued to succeed when run with the modified algorithm in its parallel version.
Time taken: 2 hours, 30 minutes
The main goal is to assess how difficult it is to adapt the existing library to support parallelization in some of the algorithms.
I would not mess around with anything more complicated than multiprocessing or joblib for the moment, nor try to encapsulate or hide the parallelization method.
Edit: