<div>I want to use the parallel version of dijkstra_shortest_paths, here is my code, it works very well with the sequential version of BGL, but can not be compiled with parallel BGL.</div><div><br></div><div>typedef boost::adjacency_list &lt; boost::vecS, boost::vecS, boost::undirectedS,</div>

<div><span class="Apple-tab-span" style="white-space:pre">	</span>boost::no_property, boost::property &lt; boost::edge_weight_t, double &gt; &gt; graph_t;</div><div>typedef boost::graph_traits &lt; graph_t &gt;::vertex_descriptor vertex_descriptor;</div>

<div>typedef boost::graph_traits &lt; graph_t &gt;::edge_descriptor edge_descriptor;</div><div>typedef std::pair&lt;int, int&gt; Edge;</div><div>template &lt;class Vertex&gt;</div><div>struct target_visitor : public default_dijkstra_visitor</div>

<div>{</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>target_visitor(vector&lt;bool&gt;* vec,int total) : vec_(vec),num_(0),total_(total),examined_(0) { }</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>template &lt;class Graph&gt;</div>

<div><span class="Apple-tab-span" style="white-space:pre">	</span>void examine_vertex(Vertex v, Graph&amp; g)</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>{</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>examined_++;</div>

<div><span class="Apple-tab-span" style="white-space:pre">		</span>if ((*vec_)[v])</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>{</div><div><span class="Apple-tab-span" style="white-space:pre">			</span>//visited, set false to prevent multi visit</div>

<div><span class="Apple-tab-span" style="white-space:pre">			</span>(*vec_)[v]=false;</div><div><span class="Apple-tab-span" style="white-space:pre">			</span>num_++;</div><div><span class="Apple-tab-span" style="white-space:pre">			</span>//cout&lt;&lt;&quot;v:&quot;&lt;&lt;v&lt;&lt;&quot;,total:&quot;&lt;&lt;total_&lt;&lt;&quot;,num:&quot;&lt;&lt;num_&lt;&lt;&quot;,examined_:&quot;&lt;&lt;examined_&lt;&lt;endl;</div>

<div><span class="Apple-tab-span" style="white-space:pre">		</span>}</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>if (total_==num_)</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>{</div>

<div><span class="Apple-tab-span" style="white-space:pre">			</span>//cout&lt;&lt;&quot;OK. break, Total point size is:&quot;&lt;&lt;vec_-&gt;size()&lt;&lt;&quot;,examined_ point size is:&quot;&lt;&lt;examined_&lt;&lt;endl;</div>

<div><span class="Apple-tab-span" style="white-space:pre">			</span>//all vertex in v have been found</div><div><span class="Apple-tab-span" style="white-space:pre">			</span>throw std::exception();</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>}</div>

<div><span class="Apple-tab-span" style="white-space:pre">	</span>}</div><div>private:</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>vector&lt;bool&gt;* vec_;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>int num_;</div>

<div><span class="Apple-tab-span" style="white-space:pre">	</span>int total_;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>int examined_;</div><div>};</div><div>template &lt;class Vertex&gt;</div>

<div>target_visitor&lt;Vertex&gt;</div><div>target_visit(vector&lt;bool&gt;* u,int total) {</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>return target_visitor&lt;Vertex&gt;(u,total);</div><div>}</div>

<div>void BaseFilter::getShortestPathInNRing(int source,int num,std::vector&lt;bool&gt;&amp; tar,std::vector&lt;vertex_descriptor&gt;&amp; p,std::vector&lt;double&gt;&amp; d){</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>vertex_descriptor sou = vertex(source, g_);</div>

<div><span class="Apple-tab-span" style="white-space:pre">	</span>assert(num_vertices(g_)==mesh_-&gt;m_vecVertex.size());</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>property_map&lt;graph_t, edge_weight_t&gt;::type weightmap = get(edge_weight, g_);</div>

<div><span class="Apple-tab-span" style="white-space:pre">	</span>property_map&lt;graph_t, vertex_index_t&gt;::type indexmap = get(vertex_index, g_);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>try</div>

<div><span class="Apple-tab-span" style="white-space:pre">	</span>{</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>dijkstra_shortest_paths(g_, sou, &amp;p[0], &amp;d[0], weightmap, indexmap,�</div>

<div><span class="Apple-tab-span" style="white-space:pre">			</span>std::less&lt;double&gt;(), closed_plus&lt;double&gt;(),�</div><div><span class="Apple-tab-span" style="white-space:pre">			</span>(std::numeric_limits&lt;double&gt;::max)(), 0,</div>

<div><span class="Apple-tab-span" style="white-space:pre">			</span>target_visitor&lt;vertex_descriptor&gt;(&amp;tar,num));</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>//dijkstra_shortest_paths(g_, sou, predecessor_map(&amp;p[0]).distance_map(&amp;d[0]));</div>

<div><span class="Apple-tab-span" style="white-space:pre">	</span>}</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>catch (std::exception e)</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>{</div>

<div><span class="Apple-tab-span" style="white-space:pre">	</span>}</div><div>}</div><div><br></div><div>The compile errors are:</div><div>Error<span class="Apple-tab-span" style="white-space:pre">	</span>11<span class="Apple-tab-span" style="white-space:pre">	</span>error C2664: &#39;boost::put&#39; : cannot convert parameter 2 from &#39;boost::detail::parallel::global_descriptor&lt;LocalDescriptor&gt;&#39; to &#39;ptrdiff_t&#39;<span class="Apple-tab-span" style="white-space:pre">	</span>C:\boost_1_49_0\boost_1_49_0\boost\graph\distributed\crauser_et_al_shortest_paths.hpp<span class="Apple-tab-span" style="white-space:pre">	</span>584</div>

<div>Error<span class="Apple-tab-span" style="white-space:pre">	</span>12<span class="Apple-tab-span" style="white-space:pre">	</span>error C2664: &#39;boost::put&#39; : cannot convert parameter 2 from &#39;boost::detail::parallel::global_descriptor&lt;LocalDescriptor&gt;&#39; to &#39;ptrdiff_t&#39;<span class="Apple-tab-span" style="white-space:pre">	</span>C:\boost_1_49_0\boost_1_49_0\boost\graph\distributed\crauser_et_al_shortest_paths.hpp<span class="Apple-tab-span" style="white-space:pre">	</span>585</div>

<div>Error<span class="Apple-tab-span" style="white-space:pre">	</span>13<span class="Apple-tab-span" style="white-space:pre">	</span>error C2664: &#39;boost::put&#39; : cannot convert parameter 2 from &#39;boost::detail::parallel::global_descriptor&lt;LocalDescriptor&gt;&#39; to &#39;ptrdiff_t&#39;<span class="Apple-tab-span" style="white-space:pre">	</span>C:\boost_1_49_0\boost_1_49_0\boost\graph\distributed\crauser_et_al_shortest_paths.hpp<span class="Apple-tab-span" style="white-space:pre">	</span>587</div>

<div><br></div>-- <br>Best Regards<br>Areslp<br><br>