[BGL] negative_edge thrown inside dijsktra for boost' file dependency example.
Hello, The problem I'm having is that I get an exception thrown when I run the example related to File precedency on parallel compilation, using dijkstra algorithm. I mean, there's no code of mine at all, so that reduces the probabilities of it being me to a 75%... ;) thanks...
Hi Dan, Dan Dimerman wrote:
The problem I'm having is that I get an exception thrown when I run the example related to File precedency on parallel compilation, using dijkstra algorithm.
I mean, there's no code of mine at all, so that reduces the probabilities of it being me to a 75%... ;)
It does not reproduce for me using g++ 3.3 and Boost CVS. What compiler/OS/Boost version are you using? What are compiler switches? - Volodya
Hi Dan,
Dan Dimerman wrote:
The problem I'm having is that I get an exception thrown when I run the example related to File precedency on parallel compilation, using dijkstra algorithm.
I mean, there's no code of mine at all, so that reduces the
Hello Vladimir,
Boost = 1.29.0 & 1.30.0 (same effect on both)
OS = Xp Pro, Microsoft Visual C++ .NET 55510-640-3992291-18154
As for switches, I am _NOT_ using managed extensions, just pure C++ (as pure
as it can be in an MS environment), multi-thread debug , no precompiled
headers, exceptions enabled, no RTTI (am I forgetting some flag?)
Many thanks.
"Vladimir Prus"
of it being me to a 75%... ;)
It does not reproduce for me using g++ 3.3 and Boost CVS. What compiler/OS/Boost version are you using? What are compiler switches?
- Volodya
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Hello Dan,
Hello Vladimir,
Boost = 1.29.0 & 1.30.0 (same effect on both) OS = Xp Pro, Microsoft Visual C++ .NET 55510-640-3992291-18154 As for switches, I am _NOT_ using managed extensions, just pure C++ (as pure as it can be in an MS environment), multi-thread debug , no precompiled headers, exceptions enabled, no RTTI (am I forgetting some flag?)
I'm at loss... nothing suspicious so far. And without VC7, I can't debug this. Let's try to narrow the problem down. 1. You compile examples/file_dependency.cpp, right? 2. It throws exception inside dijskta_shortets_path_no_init, right? 3. Exception is thrown from 'examine_edge' and the exception is 'negative_edge', right? 4. Could you tell what's the value of 'm_zero' and what's the value of 'e' --- I mean what's the source and target vertex? What's result of 'get' invocation? - Volodya
Hello Vladimir,
"Vladimir Prus"
Hello Dan,
Hello Vladimir,
Boost = 1.29.0 & 1.30.0 (same effect on both) OS = Xp Pro, Microsoft Visual C++ .NET 55510-640-3992291-18154 As for switches, I am _NOT_ using managed extensions, just pure C++ (as pure as it can be in an MS environment), multi-thread debug , no precompiled headers, exceptions enabled, no RTTI (am I forgetting some flag?)
I'm at loss... nothing suspicious so far. And without VC7, I can't debug this. Let's try to narrow the problem down. 1. You compile examples/file_dependency.cpp, right? 2. It throws exception inside dijskta_shortets_path_no_init, right? 3. Exception is thrown from 'examine_edge' and the exception is 'negative_edge', right? 4. Could you tell what's the value of 'm_zero' and what's the value of 'e' --- I mean what's the source and target vertex? What's result of 'get' invocation?
- Volodya
1. yes. 2. yes. 3. yes. 4. m_zero = 0x00000000, get( m_weight, e) = 0x00000001. e.m_source = 0x00000000, e.m_target = 0x00000004 when I changed the compare object from std::greater<int> to std::less<int> or std::less_equal<int>, I got no exceptions, but the results were all the files on time slot 0. Needless to say, it's somewhat confusing. Any insight ? thanks for your time.
Hi Dan,
I'm at loss... nothing suspicious so far. And without VC7, I can't debug this. Let's try to narrow the problem down. 1. You compile examples/file_dependency.cpp, right? 2. It throws exception inside dijskta_shortets_path_no_init, right? 3. Exception is thrown from 'examine_edge' and the exception is 'negative_edge', right? 4. Could you tell what's the value of 'm_zero' and what's the value of 'e' --- I mean what's the source and target vertex? What's result of 'get' invocation?
1. yes. 2. yes. 3. yes. 4. m_zero = 0x00000000, get( m_weight, e) = 0x00000001. e.m_source = 0x00000000, e.m_target = 0x00000004
when I changed the compare object from std::greater<int> to std::less<int> or std::less_equal<int>, I got no exceptions, but the results were all the files on time slot 0.
Needless to say, it's somewhat confusing. Any insight ?
That's *confusing*. Also, there's very stange comment in file_dependency.cpp: compare, combine, 0, // Since we are using > instead of >, we std::numeric_limits<int>::max(), // flip 0 and inf. "Using >" instead of ">" :-) Well, anyway, in my case m_zero is 2147483647, which makes me suspect std::numeric_limits<int>::max() is buggy on your compiler/system. Could you try chaning it by literal 2147483647, and report your results? - Volodya
Hi Dan,
I'm at loss... nothing suspicious so far. And without VC7, I can't debug this. Let's try to narrow the problem down. 1. You compile examples/file_dependency.cpp, right? 2. It throws exception inside dijskta_shortets_path_no_init, right? 3. Exception is thrown from 'examine_edge' and the exception is 'negative_edge', right? 4. Could you tell what's the value of 'm_zero' and what's the value of 'e' --- I mean what's the source and target vertex? What's result of 'get' invocation?
1. yes. 2. yes. 3. yes. 4. m_zero = 0x00000000, get( m_weight, e) = 0x00000001. e.m_source = 0x00000000, e.m_target = 0x00000004
when I changed the compare object from std::greater<int> to std::less<int> or std::less_equal<int>, I got no exceptions, but the results were all
Hello Vladimir,
You've hit the exact spot. I noted as well the "confusing" comment there.
The problem was in the configuration of my development environment, i.e., I
read files from boost 1.30.0, but the compiler used files from 1.29.0, hence
the problem with the m_zero.
It works now.
Many thanks for your time and patience.
"Vladimir Prus"
files on time slot 0.
Needless to say, it's somewhat confusing. Any insight ?
That's *confusing*. Also, there's very stange comment in file_dependency.cpp:
compare, combine, 0, // Since we are using > instead of >, we std::numeric_limits<int>::max(), // flip 0 and inf.
"Using >" instead of ">" :-) Well, anyway, in my case m_zero is 2147483647, which makes me suspect std::numeric_limits<int>::max() is buggy on your compiler/system. Could you try chaning it by literal 2147483647, and report your results?
- Volodya
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Hi Dan,
You've hit the exact spot. I noted as well the "confusing" comment there. The problem was in the configuration of my development environment, i.e., I read files from boost 1.30.0, but the compiler used files from 1.29.0, hence the problem with the m_zero.
Ah.. such problems are always very hard to track down.
It works now.
Many thanks for your time and patience.
You're welcome. - Volodya
participants (2)
-
Dan Dimerman
-
Vladimir Prus