<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Matrix types is from MATMPIDENSE to MATSCALAPACK, but I think it happens also for other matrix types IIRC.</div>
<div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Freitag, 13. Januar 2023 um 16:58 Uhr<br/>
<b>Von:</b> "Pierre Jolivet" <pierre@joliv.et><br/>
<b>An:</b> "Marius Buerkle" <mbuerkle@web.de><br/>
<b>Cc:</b> petsc-users@mcs.anl.gov<br/>
<b>Betreff:</b> Re: [petsc-users] MatConvert changes distribution of local rows</div>
<div name="quoted-content">
<div>
<div>
<blockquote>
<div>On 13 Jan 2023, at 8:49 AM, Marius Buerkle <mbuerkle@web.de> wrote:</div>
<div>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Hi,</div>
<div> </div>
<div>I have a matrix A for which I defined the number of local rows per process manually using MatSetSizes. When I use MatConvert to change the matrix type it changes the number of local rows (to what one would get if MatSetSize is called with PETSC_DECIDE for number of local rows), which causes problems when doing MatVec producs and stuff like that. Is there any way to preserve the the number of local rows when using MatConvert?</div>
</div>
</div>
</div>
</blockquote>
<div> </div>
<div>This is most likely a bug, it’s not handled properly in some MatConvert() implementations.</div>
<div>Could you please share either the matrix types or a minimal working example?</div>
<div> </div>
<div>Thanks,</div>
<div>Pierre</div>
<div> </div>
<blockquote>
<div>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div> </div>
<div>Best,</div>
<div>Marius</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>