Re: [Boost-users] Buggy Prim's minimum spanning tree example
Hello,
I have a problem with the example for Prim's minimum spanning tree that can be found here: http://www.boost.org/libs/graph/example/prim-example.cpp
The problem is that when compiled in 32 bits but run on a 64 bits computer, and modified with different edges and weights, it does not work anymore. The modified version that exhibits this behaviour is here: http://www.iro.umontreal.ca/~delallea/tmp/prim-example-fail.cpp It is a simplified version (I removed some compiler-specific code for MSVC) where I replaced the edges and weights by a real-life example I have to solve.
Unfortunately, I am unable to duplicate the problem here. On our 64-bit Opteron machines (running Linux), I get the same results for 64- and 32-bit binaries.
Which version of Boost are you using? What operating system? What version of GCC?
Thanks for the reply. I hope this message will get into the proper thread on the boost mailing-list (had forgotten to turn on my boost digest email...). Here are more detailed information: OS = Fedora Core 4: 'uname -a' -> Linux xxx.yyy 2.6.15-1.1831_FC4 #1 SMP Tue Feb 7 13:37:59 EST 2006 x86_64 x86_64 x86_64 GNU/Linux g++ --version -> g++ (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8) Boost version is 1.33.0. CPU is AMD Athlon(tm) 64 Processor 3500+ Thank again, Olivier PS: just in case, my original post with full details and program output: http://lists.boost.org/boost-users/2006/02/17314.php
On Feb 27, 2006, at 11:44 AM, Olivier Delalleau wrote:
OS = Fedora Core 4: 'uname -a' -> Linux xxx.yyy 2.6.15-1.1831_FC4 #1 SMP Tue Feb 7 13:37:59 EST 2006 x86_64 x86_64 x86_64 GNU/Linux
g++ --version -> g++ (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)
Boost version is 1.33.0.
I think this is the problem. We ran into a bug in the relaxed heap code (used by Prim's algorithm) on x86 Linux in 1.33.0. The bug exhibited similar problems to what you're seeing. The fix is in Boost 1.33.1; I recommend you try upgrading Boost. Doug
OS = Fedora Core 4: 'uname -a' -> Linux xxx.yyy 2.6.15-1.1831_FC4 #1 SMP Tue Feb 7 13:37:59 EST 2006 x86_64 x86_64 x86_64 GNU/Linux
g++ --version -> g++ (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)
Boost version is 1.33.0.
I think this is the problem. We ran into a bug in the relaxed heap code (used by Prim's algorithm) on x86 Linux in 1.33.0. The bug exhibited similar problems to what you're seeing. The fix is in Boost 1.33.1; I recommend you try upgrading Boost.
Thank you very much, it indeed solved the problem. I had quickly browsed through the change list in 1.33.1 before posting, but obviously I went too fast since I hadn't noticed the Graph library in the list (note: an alphabetical ordering may help). Thanks again! -- Olivier
participants (2)
-
Doug Gregor
-
Olivier Delalleau