<div dir="ltr"><div>Hi everyone,</div><div><br></div><div>Recently I installed the PETSc version 3.12.4 in optimized mode:</div><div><br></div><div>./configure --with-debugging=0 COPTFLAGS='-O2 -march=native -mtune=native' CXXOPTFLAGS='-O2 -march=native -mtune=native' FOPTFLAGS='-O2 -march=native -mtune=native' --download-mpich=1 --download-fblaslapack=1 --with-cxx-dialect=C++11</div><div><br></div><div>When I perform MatMatMult(A,B,MAT_REUSE_MATRIX,PETSC_DEFAULT,&C), for sparse A and dense B matrices, then:<br></div><div><br></div><div>In the special case where matrix B (and hence C) are dense you can
create the correctly sized matrix C yourself and then call this routine
with <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatReuse.html#MatReuse" target="_blank">MAT_REUSE_MATRIX</a>, rather than first having <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMatMult.html#MatMatMult" target="_blank">MatMatMult</a>() create it for you. You can NEVER do this if the matrix C is sparse. <br></div><div><br></div><div></div><div>So, for these new release 3.12.4, if you create C as a dense matrix it is necessary to apply a MatAssemblyBegin() and MatAssemblyEnd() after the matrix multiplication, other wise it's not possible to perform further operations.</div><div><br></div><div>It does not happen in the 3.11.3 version, where MatAssembly after multiplication it's not necessary.<br></div><div><br></div><div>Kind regards.<br></div></div>