Hi, <div><br></div><div>I was trying to find the exact (or more or less exact) memory consumption of any PETSc object. </div><div>I was wondering how accurate is this method: </div><div><br></div><div><meta name="qrichtext" content="1"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><b>PetscMemoryGetMaximumUsage<span style=" color:#aaaaaa;">(&</span>mem1<span style=" color:#aaaaaa;">);</span></b></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="Apple-style-span" style="color: rgb(170, 170, 170); "><b>.</b></span></pre><pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<span style=" color:#aaaaaa;"><b>(creation of any PETSc object).</b></span></pre><pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="Apple-style-span" style="color: rgb(170, 170, 170); "><b>.</b></span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#aaaaaa;"><b><br></b></span></pre><pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font class="Apple-style-span" color="#AAAAAA"><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: arial; white-space: normal; "><pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; color: rgb(0, 0, 0); ">
<b>PetscMemoryGetMaximumUsage<span style="color: rgb(170, 170, 170); ">(&</span>mem2<span style="color: rgb(170, 170, 170); ">);</span></b></pre><pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; color: rgb(0, 0, 0); ">
<span class="Apple-style-span" style="color: rgb(170, 170, 170); "><b>Memory = mem2 - mem1; </b></span></pre><pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; color: rgb(0, 0, 0); ">
<span class="Apple-style-span" style="color: rgb(170, 170, 170); "><b><br></b></span></pre><pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; color: rgb(0, 0, 0); "><span class="Apple-style-span" style="color: rgb(170, 170, 170); "><b>Thanks in advance, </b></span></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><b>Mohamad</b></pre><pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<b><br></b></pre><pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; color: rgb(0, 0, 0); "><span style="color: rgb(170, 170, 170); "><br></span></pre><div style="color: rgb(0, 0, 0); ">
<span style="color: rgb(170, 170, 170); "><br></span></div></span></font></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre></div><div><br></div>