<div dir="ltr"><div dir="ltr">We used /proc/self/stat to track the resident set size during program run, and we saw the resident set size jumped by the size of the matrix right after we did matmulttranspose.<br></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Wed, Jul 17, 2019 at 12:04 PM hong--- via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div dir="ltr">Kun:<br></div><div>How do you know 'MatMultTranpose creates an extra memory copy of matrix'?</div><div>Hong</div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div lang="EN-US">
<div class="gmail-m_-8066335926639544998gmail-m_-3538158395817514375WordSection1">
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I was using MatMultTranpose and MatMult to solver a linear system.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">However we found out, MatMultTranpose create an extra memory copy of matrix for its operation. This extra memory copy is not stated everywhere in petsc manual.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">This basically double my memory requirement to solve my system.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I remember mkl’s routine can do inplace matrix transpose vector product, without transposing the matrix itself.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is this always the case? Or there is way to make petsc to do inplace matrix transpose vector product.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Any help is greatly appreciated.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regards,<u></u><u></u></p>
<p class="MsoNormal">Kun<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<br>
<p align="Center" class="gmail-m_-8066335926639544998gmail-m_-3538158395817514375msipfooter6d2e06ff" style="margin:0px"><span style="color:rgb(0,0,0);font-family:Calibri;font-size:10pt">Schlumberger-Private</span></p>
</div>
</div>
</blockquote></div></div>
</blockquote></div>