<div dir="ltr">We also found that if we use MatCreateSeqAIJ, then no more memory increase with matrix vector multiplication. However, with MatCreateMPIAIJMKL, the behavior is consistent.<br></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Wed, Jul 17, 2019 at 5:26 PM Karl Lin <<a href="mailto:karl.linkui@gmail.com">karl.linkui@gmail.com</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">MatCreateMPIAIJMKL</div><div dir="ltr"><br></div><div>parallel and sequential exhibit the same behavior. In fact, we found that doing matmult will increase the memory by the size of matrix as well.<br></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Wed, Jul 17, 2019 at 4:55 PM Zhang, Hong <<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@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>
<div dir="ltr">
<div dir="ltr">Karl:<br>
</div>
<div>What matrix format do you use? Run it in parallel or sequential?</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 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" target="_blank">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_-5292850215921239070gmail-m_980216059706594888gmail-m_-6664523132381501245gmail-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_-5292850215921239070gmail-m_980216059706594888gmail-m_-6664523132381501245gmail-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>
</blockquote>
</div>
</div>
</div>
</blockquote></div>
</blockquote></div>