<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="en-TR" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="TR" style="font-size:11.0pt">Many thanks for the detailed response!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="TR" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="TR" style="font-size:11.0pt">I have linked SCIP into an executable so the memory leaks in the log should not be a problem for me. As for the slightly different solution paths I think it is unavoidable at the moment and not due
to a bug in my program.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="TR" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="TR" style="font-size:11.0pt">Best,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="TR" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="TR" style="font-size:11.0pt">Selin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<b><span style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">From:
</span></b><span style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">Stefan Vigerske <svigerske@gams.com><br>
<b>Date: </b>Thursday, 1 February 2024 at 00:22<br>
<b>To: </b>Bayramoglu, Selin <sbayramoglu3@gatech.edu>, scip@zib.de <scip@zib.de><br>
<b>Subject: </b>Re: [SCIP] Valgrind log showing slightly different solution path in MINLP<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<span style="font-size:11.0pt">Hi,<br>
<br>
SCIP is deterministic, but the deterministic calculations that it is <br>
doing under valgrind can be different from the one without valgrind.<br>
We have seen this before, in particular when nonlinear constraints are <br>
present, and the current assumption is that this is due to valgrind <br>
being imperfect for some operations that are done in non-default <br>
rounding mode (which happens for bound tightening of nonlinear constraints).<br>
See also the point "Valgrind has the following limitations in its <br>
implementation of x86/AMD64 floating point relative to IEEE754." in <br>
<a href="https://valgrind.org/docs/manual/manual-core.html#manual-core.limits">https://valgrind.org/docs/manual/manual-core.html#manual-core.limits</a><br>
That part about 64bit vs 80bit floating point precision could also play <br>
a role.<br>
<br>
Regarding the memory leaks, these are not so trivial to fix. On the <br>
positive side, these are allocations that happen only once. If you have <br>
linked SCIP into an executable, then "once" would mean one time the <br>
program runs. This memory will be freed up again anyway when the <br>
executable finishes. If you load and unload SCIP as a shared library <br>
dynamically (dlopen()), then this allocation by <br>
CppAD::thread_alloc::thread_info() happens every time the library is <br>
loaded, so there is a more serious memory leak. It would be nice to free <br>
the memory when the library unloads, but there is no portable way to do <br>
this (On Unix-like systems you have either __attribute__(destructor) <br>
(GCC/clang) or the .fini section to define global destructors at <br>
arbitrary places, but with MSVC you can have only one DllMain() per <br>
library). Having an API function that a user could call when <br>
unloading/exit would probably be the way to go.<br>
The memory from GOMP's initialize_env() is similar. GOMP allocates some <br>
global memory once and does not free it. I'm not sure what will happen <br>
there in a setting where the GOMP lib is repeatedly loaded and unloaded. <br>
A call to omp_pause_resource_all(omp_pause_hard) may free this memory.<br>
<br>
Best,<br>
Stefan<br>
<br>
On 01/02/2024 03:58, Bayramoglu, Selin wrote:<br>
> Hello everyone,<br>
> <br>
> I am solving an MINLP with SCIP 8.0.0 with default options and a node limit of 1 and running it with Valgrind (options: --leak-check=full --show-leak-kinds=all --num-callers=50). My program only executes SCIP with no additions. It seems like the solution
path of the runs with and without Valgrind are slightly different. The first line after presolve shows that the number of LP iterations are different. To my knowledge SCIP is deterministic in the absence of a time limit so I expect it to have the same solution
path in both runs.<br>
> <br>
> In addition, the valgrind log shows no errors but only memory leaks of type “still reachable”. It seems like it is safe to execute the program given these leaks but I wanted to get your opinion on it.<br>
> <br>
> Please find attached the problem file and the logs. Many thanks for your help in advance.<br>
> <br>
> Best regards,<br>
> <br>
> Selin<br>
> <br>
> <br>
> _______________________________________________<br>
> Scip mailing list<br>
> Scip@zib.de<br>
> <a href="https://listserv.zib.de/mailman/listinfo/scip">https://listserv.zib.de/mailman/listinfo/scip</a><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>