Hello,

I am trying to compute the number of connected components of a graph with only few edges (i.e. many vertices do not have edges). This works OK for a non-distributed graph. The simplest example of the issue I could come up with is the following:

typedef adjacency_list <vecS, vecS, undirectedS> SerialGraph;
typedef adjacency_list<vecS, distributedS<mpi_process_group, vecS>, undirectedS> Graph;
typedef iterator_property_map<std::vector<int>::iterator, property_map<Graph, vertex_index_t>::type> LocalMap;

#ifdef PARALLEL_GRAPH
    Graph G(nV+1);
    synchronize(G);
    std::vector<int> localComponent(nV+1);
    LocalMap components(localComponent.begin(),get(vertex_index, G));
    num = connected_components_ps(G, components);
#else
    SerialGraph G(nV+1);
    std::vector<int> globalComponent(nV+1);
    num = connected_components(G, &globalComponent[0]);
#endif

The distributed version causes a seg fault when calling connected_components_ps, while the non-distributed works fine and correctly finds nV+1 components. If I populate the graph connecting all vertices with edges, both do work fine. What am I doing wrong? Thank you in advance.

Regards,
Alessio