[Cbc] Problem in CbcCompareUser/invalid heap

Gabrielle A. Grun grun at sfu.ca
Wed Nov 14 18:48:23 EST 2012


Hi All,

 

In Microsoft Visual Studio, the strict weak ordering of nodes in a heap  must be preserved i.e. if node x is deemed to be "less" the node y, then y cannot be evacuated to be "less" than x by a predicate or comparison function.



Thanks.

Gabrielle
  ----- Original Message ----- 
  From: Lou Hafer 
  To: cbc at list.coin-or.org 
  Sent: Wednesday, November 14, 2012 8:18 AM
  Subject: Re: [Cbc] Problem in CbcCompareUser/invalid heap


  Folks,

       If it's windows, this is a long-standing issue. Debug builds in 
  Visual Studio were unusable because the VS heap implementation checks 
  for violations of the heap conditions in debug builds. Cbc did not 
  properly rebuild the heap after changing the evaluation function. I 
  fixed this in r1506 because I needed to work with a windows debug build 
  but quite possibly it's broken again.

       The key point is that the heap must be rebuilt when the evaluation 
  function changes. Otherwise it's a bomb waiting to go off.

       John's observation about using drand as the return value is 
  interesting. Begs the question of whether the overhead of maintaining 
  the heap is really worth it.

                                                Lou



  On 14/11/12 12:43 AM, John Forrest wrote:
  > Haroldo,
  >
  > Using which compiler do you have problems with CbcCompareDefault - or is
  > it with CbcCompareUser?
  >
  > If it is gcc then I am totally mystified as I changed CbcCompareDefault
  > to do
  >
  >     return (drand48()<0.5);
  >
  > and my runs were fine (not even much slower!).
  > 1506
  > So is just with Windows or Intel?
  >
  > John Forrest

  _______________________________________________
  Cbc mailing list
  Cbc at list.coin-or.org
  http://list.coin-or.org/mailman/listinfo/cbc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20121114/0103f433/attachment.html>


More information about the Cbc mailing list