Ticket #12905 (closed defect: fixed)

Opened 14 months ago

Last modified 8 months ago

Memory leaks with Cliquer

Reported by: ncohen Owned by: jason, ncohen, rlm
Priority: major Milestone: sage-5.5
Component: graph theory Keywords:
Cc: Work issues:
Report Upstream: N/A Reviewers: David Coudert
Authors: Nathann Cohen Merged in: sage-5.5.beta1
Dependencies: #13188 Stopgaps:

Description (last modified by ncohen) (diff)

Geoff reported on  http://ask.sagemath.org/question/1170/memory-blowup-with-milp memory leaks in Sage. Turns out there were two to solve, and one of them was fixed in #12903. The other one comes from Cliquer and is solved with this patch. Here's what it does :

  • Solves memory leaks reported by Geoff
  • Incidentally updates Cliquer to version 1.21
  • Incidentally removes Sage's code that was formerly directly inserted in the original Cliquer files. This code is now inserted during the SPKG installation from patches located in the SPKG's patches/ folder.

As a result, no one should be scared anymore of running the following lines :

for i in range(2000):
    print get_memory_usage()
    _ = graphs.RandomGNP(30,.2).cliques_maximum()
for i in range(2000):
    print get_memory_usage()
    _ = graphs.RandomGNP(30,.2).clique_number()
for i in range(2000):
    print get_memory_usage()
    _ = graphs.RandomGNP(30,.2).clique_maximum()

Apply:

Install the new version of Cliquer:

Attachments

trac_12905.patch Download (1.5 KB) - added by ncohen 8 months ago.

Change History

comment:1 Changed 14 months ago by ncohen

  • Status changed from new to needs_review
  • Description modified (diff)

comment:2 Changed 14 months ago by ncohen

  • Description modified (diff)

comment:3 Changed 11 months ago by jdemeyer

Please fill in your real name as Author.

comment:4 Changed 11 months ago by dcoudert

  • Reviewers set to David Coudert
  • Authors set to Nathann Cohen

I don't know how to install the new package. Using the ìnstall_package` method, I get either a re-install of cliquer-1.2.p11, or it answers there is no package name with cliquer-1.21.p11. I tried copying the package to the standard and the optimal package directories without success.

comment:5 Changed 11 months ago by dcoudert

  • Status changed from needs_review to positive_review

OK, the method for installing the package is

sage -i <package.spkg>

or when the package is already installed (as for cliquer):

sage -f <package.spkg>

The patch is working perfectly and the memory usage remains constant. Excellent! I give positive review.

comment:6 Changed 11 months ago by jdemeyer

  • Status changed from positive_review to needs_work

The spkg should be rebased on cliquer-1.2.p11.spkg (which is in sage-5.1 or later).

Also: normally, the version number of your spkg should be cliquer-1.21.p0.spkg (not p11).

comment:7 Changed 8 months ago by ncohen

  • Status changed from needs_work to needs_review
  • Description modified (diff)

New spkg :  http://www.steinertriples.fr/ncohen/cliquer-1.21.p0.spkg

Should be fine now :-)

God, I had almost forgotten this trac ticket ^^;

Nathann

comment:8 Changed 8 months ago by dcoudert

  • Status changed from needs_review to positive_review

The patch is still working perfectly.

I haven't changes the milestone but it should certainly be 5.5

comment:9 Changed 8 months ago by ncohen

WouhouuuuuuUUU !! Thanks :-)

Nathann

comment:10 Changed 8 months ago by jdemeyer

  • Milestone changed from sage-5.4 to sage-5.5

comment:11 Changed 8 months ago by jdemeyer

  • Status changed from positive_review to needs_work
  • Dependencies set to #13188

This should be rebased to #13188.

comment:12 Changed 8 months ago by ncohen

  • Status changed from needs_work to positive_review

Done !

Changed 8 months ago by ncohen

comment:13 Changed 8 months ago by jdemeyer

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-5.5.beta1
Note: See TracTickets for help on using tickets.