|
Boost Users : |
Subject: [Boost-users] distributed breadth first search doesn't work properly?
From: Mattia Lambertini (mat.lambertini_at_[hidden])
Date: 2010-12-08 04:49:54
Hi, i am new to boost and i'm using the PBGL to write a software that compute
some graph analysis. I've installed boost 1.44.0 and openmpi 1.5
I tried to run the breadth first search example located in
$BOOST_ROOT/libs/graph_parallel/example
with the graph $BOOST_ROOT/libs/graph/test/weighted_graph.gr
All went well since i figure out that the result is different if i run the
algorithm with a different number of processors.
Only with one processor the values are corrected.
here's what happens:
mpirun -np 1 ./breadth_first_search.out
graph g {
subgraph cluster_0 {
label="p0";
n0[label=0];
n1[label=2];
n2[label=1];
n3[label=2];
n4[label=1];
}
n0 -- n2;
n1 -- n1;
n1 -- n3;
n1 -- n4;
n2 -- n1;
n2 -- n3;
n3 -- n4;
n4 -- n0;
n4 -- n1;
}
---------------------
mpirun -np 2 ./breadth_first_search.out
graph g {
subgraph cluster_0 {
label="p0";
n0[label=0];
n1[label=1];
n2[label=1];
}
n0 -- n2;
n1 -- n1;
n1 -- n3;
n1 -- n4;
n2 -- n1;
n2 -- n3;
subgraph cluster_1 {
label="p1";
n3[label=1];
n4[label=0];
}
n3 -- n4;
n4 -- n0;
n4 -- n1;
}
Is that correct?
From the doc i can't figure out why..
-- Cordiali saluti, Mattia Lambertini
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net