|
Boost : |
Subject: [boost] [Graph] floyd_warshall crashes using optimzation
From: Tim Keitt (tkeitt_at_[hidden])
Date: 2013-09-06 16:15:47
I'm getting seg faults when I use optimization with
floyd_warshall_shortest_paths. Without optimization it works fine.
d here is defined as
struct dmat_t
{
typedef std::vector<edge_weight_t> storage_t;
dmat_t(vertex_t n) : ncol(n), storage(n * n) {}
storage_t::iterator operator[](vertex_t row)
{
assert(row < ncol);
storage.begin() + row * ncol;
}
vertex_t ncol;
storage_t storage;
};
Is this from 'inf' getting optimized out or how I defined dmat_t?
Program received signal SIGSEGV, Segmentation fault.
0x000000000040162a in
floyd_warshall_all_pairs_shortest_paths<boost::adjacency_list<boost::vecS,
boost::vecS, boost::undirectedS, boost::no_property,
boost::property<boost::edge_weight_t, double> >,
edge_thinning_diameter_t::dmat_t,
boost::adj_list_edge_property_map<boost::undirected_tag, double, double
const&, unsigned long, boost::property<boost::edge_weight_t, double> const,
boost::edge_weight_t>, std::less<double>, boost::closed_plus<double>,
double, double> (
zero=<optimized out>, inf=<optimized out>, combine=..., compare=...,
d=<synthetic pointer>, g=..., w=...)
at /usr/include/boost/graph/floyd_warshall_shortest.hpp:115
115 d[*firstv][*firstv2] = inf;
Also, it does not seem that floyd_warshall_shortest_paths is compatible
with bundled properties.
THK
-- Timothy H. Keitt http://www.keittlab.org/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk