Greetings, Tiago!
I am trying to use the multiprocess module in Python to accelerate my
simulations. Specifically, I use the following code to parallelly calculate
k-shortest paths for a set of node pairs,
self.valid_paths[v] = pool.map(lambda x: gt.all_shortest_paths(self.g,source
= v_index, target = x),[self.g.vertex_index[c] for c in self.Cloudlet]),
where self.Cloudlet is a predefined node list.
However, python reports the pickling issues
self.valid_paths[v] = pool.map(lambda x:
gt.all_shortest_paths(self.g,source = v_index, target =
x),[self.g.vertex_index[c] for c in self.Cloudlet])
File
"/home/percy/anaconda2/lib/python2.7/site-packages/multiprocess/pool.py",
line 251, in map
return self.map_async(func, iterable, chunksize).get()
File
"/home/percy/anaconda2/lib/python2.7/site-packages/multiprocess/pool.py",
line 567, in get
raise self._value
RuntimeError: Pickling of "graph_tool.libgraph_tool_core.Vertex" instances
is not enabled (http://www.boost.org/libs/python/doc/v2/pickle.html)
Is there anything I am missing? My OS is 16.04, python 2.7.14, graph-tool is
from Ostrokach's Anaconda.
Thanks for your reply
Best,
Percy
--
Sent from:
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool