pycpx icon indicating copy to clipboard operation
pycpx copied to clipboard

Huge mem leak

Open sschuldenzucker opened this issue 9 years ago • 1 comments

I noticed a memory leak that occurs when you solve many independent LPs in a row.

Reproduce:

Simply run (say) the first example from the web site 10.000 times (and kill it before your ram isexhausted and your system becomes unresponsive):

import numpy as np
from pycpx import CPlexModel

for i in range(10000):
    A = np.array([[1,0,0], [1,1,0], [1,1,1]])
    b = np.array([1,2,3])

    m = CPlexModel()

    x = m.new(3)
    t = m.new()

    m.constrain( abs((A*x - b)) <= t)
    m.minimize(t)

I'm on pycpx 0.3 and cplex 12.6.1.

sschuldenzucker avatar Jul 08 '15 13:07 sschuldenzucker

Found the same issue. Hopefully this can be solved.

haotian-wu avatar May 10 '16 20:05 haotian-wu