Boost logo

Boost Users :

Subject: [Boost-users] Boost Parallel Graph Library: remove_vertex gives unexpected results.
From: Alok Kumbhare (kumbhare_at_[hidden])
Date: 2014-04-06 19:19:13

Hi All,
i need some help with parallel boost graph library.

In particular, i am trying to modify the structure of the graph
(distributed adjacency list) after it is loaded. The code snippet is at

The problem is that clear_vertex(v,g) and remove_vertex(v,g) does not seem
to operate on the same vertex in the graph.

Here is a sample graph in metis format: (I use
the default distribution for this example)

The graph_viz output is available here for different scenarios:!20818&authkey=!AJqEFl3B71RMcaM&v=3&ithint=photo%2c.png>

As you can see in the above figure:

The first image is the original graph split into two partitions (mpirun -np
2 ./test)

The second image is after clear_vertex is called for one of the vertices.
Notice vertex "0". All the edges are removed as expected.

The third image is after remove_vertex is called (which is called after
clear_vertex, as mentioned in the documentation here:
Notice here that the vertex "2" is removed instead of vertex "0" even when
using the same vertex descriptor for both calls.

I tried putting synchronize(g) after each call, or at the end of both
calls. but both gives the same results.

Is this a bug or am i doing something wrong.

Your help will be greatly appreciated.

Alok Kumbhare

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at