#12903: Memory leaks with CPLEX
--------------------------------------+-------------------------------------
       Reporter:  ncohen              |         Owner:  ncohen      
           Type:  defect              |        Status:  needs_review
       Priority:  major               |     Milestone:  sage-5.1    
      Component:  linear programming  |    Resolution:              
       Keywords:                      |   Work issues:              
Report Upstream:  N/A                 |     Reviewers:              
        Authors:                      |     Merged in:              
   Dependencies:                      |      Stopgaps:              
--------------------------------------+-------------------------------------
Changes (by ncohen):

  * status:  needs_work => needs_review


Comment:

 Hellooooooo !!

 Well, it actually isn't related to try/catch (your LP computes a vertex
 cover --> it never fails) but there is a leak indeed `:-D`

 I reduced your code to that and the problem remains

 {{{
 for i in xrange(5000):
     p = MixedIntegerLinearProgram(solver = "CPLEX", maximization = False)
     b = p.new_variable(dim=1)
     for u,v in [(0, 1), (0, 4), (0, 5), (1, 2), (1, 6), (2, 3), (2, 7),
 (3, 4), (3, 8), (4, 9), (5, 7), (5, 8), (6, 8), (6, 9), (7, 9)]:
         p.add_constraint(b[u]+b[v] >= 1)
     print get_memory_usage()
 }}}

 That is fixed by some additional sage_free calls.... All the method had
 them except two, add_linear_constraint included. `-_-`

 By the way, I am a bit scared... Do the tests pass for you when having
 CPLEX installed as the default solver ? I see a broken docstring in
 generic_graph in the traveling_salesman_problem method. The bug is not
 realted to this ticket (it appears regardless of whether the current patch
 is applied) and I have no idea where it comes from `O_o`

 Nathann

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12903#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to