[SCIP] Sometimes memory/savefac is ignored when memory limit is set
Gregor Hendel
hendel at zib.de
Wed Apr 18 12:34:23 CEST 2018
Hello Vladimir,
sorry for your troubles. I was also surprised that I could reproduce the
behavior so easily.
The answer to your question is simple: SCIP uses one memory statistic
for the memory saving mode,
but a different number for the display column (12G) and the memory limit.
The first one is the number of currently used memory, while the second
is the total number of allocated memory. The second number is higher
because the internal memory management of SCIP
keeps free memory blocks ready for possible future allocations.
Thank you for spotting this wrong behavior.
A fix for this is a one-liner: Please edit the file src/scip/stat.c as
follows:
@@ -602,7 +602,7 @@ void SCIPstatUpdateMemsaveMode(
{
SCIP_Longint memused;
- memused = SCIPmemGetUsed(mem);
+ memused = SCIPmemGetTotal(mem);
if( !stat->memsavemode && memused >= set->mem_savefac * set->limit_memory * 1024.0 * 1024.0 )
{
This fix will be included in the next release of SCIP, of course.
Cheers,
Gregor
Am 17.04.2018 um 23:36 schrieb Vladimir V. Voloshinov:
> Hello,
> I see, that sometimes (because of unexplained reason and without any
> warnings) SCIPAMPL (SCIP 5.0.1) doesn't switch to "memory saving mode"
> when "limits/memory" parameter is set.
> For example, in stdout we see:
> ....
> non-default parameter settings:
> display/freq = 1000
> limits/memory = 12000
> limits/gap = 1e-06
> ....
> 2499s| 2999k| 1150k| 50245k| 16.8 | 12G| 63 | 0 | 27 | 83 |
> 27 | 368 | 26M| 0 | 0 | 3.099571e-01 | 4.095979e-01 | 32.15%
> 2500s| 3000k| 1150k| 50258k| 16.8 | 12G| 63 | - | 27 | 83 |
> 27 | 321 | 26M| 0 | 0 | 3.099597e-01 | 4.095979e-01 | 32.15%
>
> SCIP Status : solving was interrupted [memory limit reached]
> Solving Time (sec) : 2500.20
> Solving Nodes : 3000348
> Primal Bound : +4.09597917564847e-01 (3 solutions)
> Dual Bound : +3.09963699587617e-01
> Gap : 32.14 %
>
> Why memory limit did not cause switching to memory saving mode?
>
> When solving the other variant of NL-file I see in the log proper warning:
> 6276s|330000 |327947 |218407k| 661.8 | 12G| 50 | 0 | 80 | 99 |
> 80 |1696 | 67M| 0 | 0 | 1.099673e+01 | 1.493850e+01 | 35.84%
> (node 330388) switching to memory saving mode (mem: 9600.0M/12000.0M)
> 6288s|331000 |328347 |218788k| 661.0 | 12G| 67 | 0 | 80 | 99 |
> 80 |2543 | 67M| 0 | 0 | 1.099750e+01 | 1.493850e+01 | 35.84%--
>
> Vladimir V. Voloshinov,
> Ph.D, head of lab. C-3 "Distributed computing algorithms",
> http://www.iitp.ru/ru/researchlabs/1040.htm,
> Center of Distributed Computing, http://distcomp.ru, Institute for
> Information Transmission Problems RAS, http://www.iitp.ru
> web: http://distcomp.ru/drupal/ru/staff/vladimirv
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20180418/5ce2f9a8/attachment.html>
More information about the Scip
mailing list