Opened 9 years ago

Closed 9 years ago

#9347 closed Bugs (worksforme)

Boost Graph Library's prim_minimum_spanning_tree function has a problem in version 1.55.0

Reported by: Murodzhon Akhmedov <murodzhon@…> Owned by: Jeremiah Willcock
Milestone: To Be Determined Component: graph
Version: Boost 1.55.0 Severity: Problem
Keywords: prim_minimum_spanning_tree in version 1.55.0 Cc:

Description

The function "prim_minimum_spanning_tree" has a problem in Boost Graph Library in version 1.55.0. The prim_minimum_spanning_tree is giving an exception "e boost::negative_edge & 0x00007fff5fbfe1a0 0x00007fff5fbfe1a0", a negative edge cost exception even thought all edge cost are positive. I have a simple example with all positive edge costs and I attached the script for the demonstration purpose. Meanwhile, this function has no problems when it is called in version 1.53.0. For the attached example script, I called the function in both versions. I obtained a correct solution with version 1.53.0. However version 1.55.0 throws a negative edge cost exception.

Attachments (2)

main.cpp (1.3 KB ) - added by Murodzhon Akhmedov <murodzhon@…> 9 years ago.
main.2.cpp (1.3 KB ) - added by Murodzhon Akhmedov <murodzhon@…> 9 years ago.

Download all attachments as: .zip

Change History (9)

by Murodzhon Akhmedov <murodzhon@…>, 9 years ago

Attachment: main.cpp added

by Murodzhon Akhmedov <murodzhon@…>, 9 years ago

Attachment: main.2.cpp added

comment:1 by Jeremiah Willcock, 9 years ago

I do not get an exception from either of those programs (GCC 4.9 snapshot on Linux). Which compiler are you using? If it's VC++, try using:

boost::make_iterator_property_map(p.begin(), get(boost::vertex_index, g))

instead of &p[0] in your argument list to prim_minimum_spanning_tree.

comment:2 by Jeremiah Willcock, 9 years ago

Component: Nonegraph
Owner: set to Jeremiah Willcock

in reply to:  2 comment:3 by Murodzhon Akhmedov <murodzhon@…>, 9 years ago

Replying to jewillco:

I am using GCC, Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn).

I changed &p[0] to boost::make_iterator_property_map(p.begin(), get(boost::vertex_index, g)) and still get an exception.

comment:4 by Jeremiah Willcock, 9 years ago

I tried it with clang++ on Mac OS X Mavericks and it still worked correctly; I was using the Boost trunk but the release candidate should not differ in anything relevant to this problem.

comment:5 by Jeremiah Willcock, 9 years ago

Resolution: invalid
Status: newclosed

comment:6 by Jeremiah Willcock, 9 years ago

Resolution: invalid
Status: closedreopened

comment:7 by Jeremiah Willcock, 9 years ago

Resolution: worksforme
Status: reopenedclosed
Note: See TracTickets for help on using tickets.