<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
What happens if you try to preallocate C matrix (in the same way as A and B) and use MatMatMult with MAT_REUSE_MATRIX?
<div class=""><br class="">
</div>
<div class="">Hong (Mr.)<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Mar 5, 2019, at 6:19 PM, Marius Buerkle via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<div style="font-family: Verdana;font-size: 12.0px;" class="">
<div class="">
<p class=""><span style="font-size:11pt" class=""><span style="line-height:normal" class=""><span style="font-family:Calibri,sans-serif" class=""><span style="font-size:12.0pt" class=""><span style="font-family:"Times New Roman",serif" class="">Hi,</span></span></span></span></span></p>
<div class=""> <br class="webkit-block-placeholder">
</div>
<p class=""><span style="font-size:11pt" class=""><span style="line-height:normal" class=""><span style="font-family:Calibri,sans-serif" class=""><span style="font-size:12.0pt" class=""><span style="font-family:"Times New Roman",serif" class="">I have a question
 regarding MatMatMult for MPIDENSE matrices. I have two dense matrices A and B for which I set the number up the number of local rows each processor owns manually (same for A and B) when creating them with MatCreateDense (which is different from what PETSC_DECIDE
 what do). When I calculate A*B=C using MatMatMult with MAT_INITIAL_MATRIX the resulting matrix C has a different distribution of the rows among the processes. Is this normal? I would have expected that C inherits the local row structure from A and B.
</span></span><span style="font-size:12.0pt" class=""><span style="font-family:"Yu Mincho",serif" class="">Later</span></span><span style="font-size:12.0pt" class=""><span style="font-family:"Times New Roman",serif" class=""> on, I want to multiply C let’s
 say with A which gives then accordingly an error that the local size is not conform.
</span></span></span></span></span></p>
<p class=""><span style="font-size:11pt" class=""><span style="line-height:normal" class=""><span style="font-family:Calibri,sans-serif" class=""><span style="font-size:12.0pt" class=""><span style="font-family:"Times New Roman",serif" class="">If on the other
 hand A is MATMPIAIJ then C has the same local row structure.</span></span></span></span></span></p>
<div class=""> <br class="webkit-block-placeholder">
</div>
<p class=""><span style="font-size:11pt" class=""><span style="line-height:normal" class=""><span style="font-family:Calibri,sans-serif" class=""><span style="font-size:12.0pt" class=""><span style="font-family:"Times New Roman",serif" class="">Best,</span></span></span></span></span></p>
<p class=""><span style="font-size:11pt" class=""><span style="line-height:normal" class=""><span style="font-family:Calibri,sans-serif" class=""><span style="font-size:12.0pt" class=""><span style="font-family:"Times New Roman",serif" class="">Marius</span></span></span></span></span></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>