[Scip] Memory leaks when reading from zimpl-file
Gregor Hendel
hendel at zib.de
Thu Mar 19 12:16:31 CET 2015
Dear Matthias,
this is a strange issue. I was able to reproduce it with the example you
provided as well as with current and past SCIP versions. As you
mentioned, reading in the lp-file generated by zimpl works without leaks.
Since this is reproduceable also within ZIMPL without SCIP, I will now
pass this on to Thorsten.
Thank you very much for reporting on this issue,
Ambros and Gregor
Am 16.03.2015 um 11:29 schrieb Matthias Walter:
> Dear list,
>
> I realized the following (annoyingly unimportant) memory leaks that
> appear only if I read a zimpl file:
>
> 8 bytes in 1 blocks are still reachable in loss record 1 of 2
> at 0x4C2B6CD: malloc (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> by 0x5293948: __gmp_default_allocate (in
> /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.2)
> by 0x52A3907: __gmpz_init (in
> /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.2)
> by 0x580A1B: allocInt (cons_countsols.c:138)
> by 0x580DB3: conshdlrdataCreate (cons_countsols.c:307)
> by 0x587719: includeConshdlrCountsols (cons_countsols.c:2489)
> by 0x587EB1: SCIPincludeConshdlrCountsols (cons_countsols.c:2564)
> by 0x47E40D: SCIPincludeDefaultPlugins (scipdefplugins.c:41)
> by 0x40647B: main (in /home/xammy/quick/scip_test)
>
>
> 128 bytes in 1 blocks are still reachable in loss record 2 of 2
> at 0x4C2B7B2: realloc (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> by 0xBDF0C0: mem_realloc (mshell.c:290)
> by 0xBF35A6: yyrealloc (mmlscan.c:2947)
> by 0xBF3126: yyensure_buffer_stack (mmlscan.c:2623)
> by 0xBF2AA9: yy_switch_to_buffer (mmlscan.c:2353)
> by 0xBF3274: yy_scan_buffer (mmlscan.c:2667)
> by 0xBF335C: yy_scan_bytes (mmlscan.c:2715)
> by 0xBF32BD: yy_scan_string (mmlscan.c:2685)
> by 0xBF374A: parse_stmt (mmlscan.l:365)
> by 0xBF6C35: stmt_parse (stmt.c:191)
> by 0xBF3C07: prog_execute (prog.c:166)
> by 0xBE253E: zpl_read (zimpllib.c:256)
>
>
> The first allocation seems also to get duplicated on a SCIPcopyPlugins call.
>
> My code is essentially this:
>
> SCIP* scip = NULL;
> SCIPcreate(&scip);
> SCIPincludeDefaultPlugins(scip);
> SCIPreadProb(scip, "zimpl.zpl", NULL);
> SCIPtransformProb(scip);
> SCIPfree(&scip);
>
> The Zimpl-File is even simpler:
>
> set E := { 1 };
> var x[E] binary;
> minimize costs: x[1];
>
> Best,
>
> Matthias Walter
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
More information about the Scip
mailing list