I am currently using graph_tool.topology.all_paths
to find all paths between two vertices of a specific length, but the documentation doesn't explicitly say what algorithm is used. I assume it is either the breadth-first search (BFS) or Dijkstra’s algorithm like shortest_path
or all_shortest_paths
?
My graph is unweighted and directed, so therefore is there a way to make my searches using all_paths
parallel, and use more cores? I know I have OpenMP turned on using openmp_enabled()
and that it is set to use all 8 cores that I have.
I have seen that some algorithms such as the DFS cannot be made parallel, but I don't understand why searching through my graph to find all paths up to a certain length is not being done using multiple cores, especially when the Graph-tool performance comparison page has benchmarks for shortest path using multiple cores.
Running graph_tool.topology.all_paths(g, source, target, cutoff=4)
using a basic function:
def find_paths_of_length(graph, path_length, start_vertex, end_vertex):
savedpath=[]
for path in graph_tool.topology.all_paths(graph, start_vertex, end_vertex, cutoff=path_length):
savedpath.append(path)
only uses 1 core. Is there any way that this can be done in parallel? My network contains on the order of 50 million vertices and 200 million edges, and the algorithm is O(V+E) according to the documentation.
Thanks in advance