<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="">Hong,<div class="">José didn’t report this, though he may have run into the same issue, I did.</div><div class="">I’ll try the branch and get back at you on GitLab MR.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Pierre<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 25 Apr 2020, at 6:17 PM, Zhang, Hong <<a href="mailto:hzhang@mcs.anl.gov" class="">hzhang@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Jose,</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div class="BodyFragment" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font size="2" class=""><span style="font-size: 11pt;" class=""><div class="PlainText">>> I also now just tested some previously PETSC_VERSION_LT(3,13,0) running code with C=A*B, Dense=Nest*Dense, all previously allocated prior to a call to MatMatMult and scall = MAT_REUSE_MATRIX.<br class="">>> Sadly, it’s now broken. It is my fault for not having a test for this in<span class="Apple-converted-space"> </span><a href="https://gitlab.com/petsc/petsc/-/merge_requests/2069" class="">https://gitlab.com/petsc/petsc/-/merge_requests/2069</a>, sorry about that.<br class="">>> [0]PETSC ERROR: Call MatProductSymbolic() first<br class="">>> [0]PETSC ERROR: #1 MatProductNumeric() line 730 in /ccc/work/cont003/rndm/rndm/petsc/src/mat/interface/matproduct.c<br class="">>> [0]PETSC ERROR: #2 MatMatMult() line 9335 in /ccc/work/cont003/rndm/rndm/petsc/src/mat/interface/matrix.c<br class="">>><span class="Apple-converted-space"> </span><br class="">>> Here is a reproducer (that will work OK with 3.12.4).<br class="">>> diff --git a/src/mat/tests/ex195.c b/src/mat/tests/ex195.c<br class="">>> index c72662bc3c..811de669c5 100644<br class="">>> --- a/src/mat/tests/ex195.c<br class="">>> +++ b/src/mat/tests/ex195.c<br class="">>> @@ -73,2 +73,3 @@ int main(int argc,char **args)<br class="">>>    ierr = MatMatMult(nest,B,MAT_REUSE_MATRIX,PETSC_DEFAULT,&C);CHKERRQ(ierr);<br class="">>> +  ierr = MatMatMult(nest,C,MAT_REUSE_MATRIX,PETSC_DEFAULT,&B);CHKERRQ(ierr);<br class="">>>    ierr = MatMatMultEqual(nest,B,C,10,&equal);CHKERRQ(ierr);<br class="">>><span class="Apple-converted-space"> </span><br class="">>> $ make -f gmakefile test searchin=mat_tests-ex195<br class="">>><span class="Apple-converted-space"> </span><br class="">>> I believe this is very close to the topic at hand and issue #608, so maybe you could fix this as well in the same upcoming MR? Just let me know, I can have a crack it otherwise.</div><div class="PlainText"><br class=""></div><div class="PlainText">This is a bug. I fixed it in the branch hzhang/fix-matproduct-reuse/maint. Can you test it?</div><div class="PlainText">Hong</div></span></font></div></div></blockquote></div><br class=""></div></body></html>