<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello Vladimir,<br>
    <br>
    sorry for your troubles. I was also surprised that I could reproduce
    the behavior so easily. <br>
    <br>
    The answer to your question is simple: SCIP uses one memory
    statistic for the memory saving mode, <br>
    but a different number for the display column (12G) and the memory
    limit.<br>
    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<br>
    keeps free memory blocks ready for possible future allocations.<br>
    <br>
    Thank you for spotting this wrong behavior.<br>
    <br>
    A fix for this is a one-liner: Please edit the file src/scip/stat.c
    as follows:<br>
    <br>
    <pre>@@ -602,7 +602,7 @@ void SCIPstatUpdateMemsaveMode(                                                                                                                                                                                   </pre>
    <pre>    {                                                                                                                                                                                                                                 </pre>
    <pre>       SCIP_Longint memused;                                                                                                                                                                                                          </pre>
    <pre>                                                                                                                                                                                                                                      </pre>
    <pre>-      memused = SCIPmemGetUsed(mem);                                                                                                                                                                                                 </pre>
    <pre>+      memused = SCIPmemGetTotal(mem);                                                                                                                                                                                                </pre>
    <pre>       if( !stat->memsavemode && memused >= set->mem_savefac * set->limit_memory * 1024.0 * 1024.0 )                                                                                                                                  </pre>
    <pre>       {</pre>
    <br>
    This fix will be included in the next release of SCIP, of course.<br>
    <br>
    Cheers,<br>
    Gregor<br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 17.04.2018 um 23:36 schrieb Vladimir
      V. Voloshinov:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAH87KptNo390X4LwDLHCcA9ZvT-Q6gbYuYbzYomq3K=U9u=hWw@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>Hello,<br>
          </div>
          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.<br>
        </div>
        For example, in stdout we see:<br>
        ....<br>
        non-default parameter settings:<br>
        display/freq = 1000<br>
        limits/memory = 12000<br>
        limits/gap = 1e-06<br>
        .... <br>
        2499s|  2999k|  1150k| 50245k|  16.8 |  12G|  63 |   0 |  27 | 
        83 |  27 | 368 |  26M|   0 |   0 | 3.099571e-01 | 4.095979e-01
        |  32.15%<br>
        2500s|  3000k|  1150k| 50258k|  16.8 |  12G|  63 |   - |  27 | 
        83 |  27 | 321 |  26M|   0 |   0 | 3.099597e-01 | 4.095979e-01
        |  32.15%<br>
        <br>
        SCIP Status        : solving was interrupted [memory limit
        reached]<br>
        Solving Time (sec) : 2500.20<br>
        Solving Nodes      : 3000348<br>
        Primal Bound       : +4.09597917564847e-01 (3 solutions)<br>
        Dual Bound         : +3.09963699587617e-01<br>
        Gap                : 32.14 %<br clear="all">
        <div>
          <div>
            <div><br>
            </div>
            <div>Why memory limit did not cause switching to memory
              saving mode?<br>
            </div>
            <div><br>
              When solving the other variant of NL-file I see in the log
              proper warning:<br>
              6276s|330000 |327947 |218407k| 661.8 |  12G|  50 |   0 | 
              80 |  99 |  80 |1696 |  67M|   0 |   0 | 1.099673e+01 |
              1.493850e+01 |  35.84%<br>
              (node 330388) switching to memory saving mode (mem:
              9600.0M/12000.0M)<br>
               6288s|331000 |328347 |218788k| 661.0 |  12G|  67 |   0 | 
              80 |  99 |  80 |2543 |  67M|   0 |   0 | 1.099750e+01 |
              1.493850e+01 |  35.84%-- <br>
              <div class="gmail_signature">
                <div dir="ltr">
                  <div><br>
                    Vladimir V. Voloshinov,<br>
                    Ph.D, head of lab. C-3 "Distributed computing
                    algorithms", <a
                      href="http://www.iitp.ru/ru/researchlabs/1040.htm"
                      target="_blank" moz-do-not-send="true">http://www.iitp.ru/ru/researchlabs/1040.htm</a>,<br>
                    Center of Distributed Computing, <a
                      href="http://distcomp.ru" target="_blank"
                      moz-do-not-send="true">http://distcomp.ru</a>,
                    Institute for Information Transmission Problems RAS,
                    <a href="http://www.iitp.ru" target="_blank"
                      moz-do-not-send="true">http://www.iitp.ru</a><br>
                    web: <a
                      href="http://distcomp.ru/drupal/ru/staff/vladimirv"
                      target="_blank" moz-do-not-send="true">http://distcomp.ru/drupal/ru/staff/vladimirv</a></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Scip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Scip@zib.de">Scip@zib.de</a>
<a class="moz-txt-link-freetext" href="https://listserv.zib.de/mailman/listinfo/scip">https://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>