<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Pierre :<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Yes, of course I defined (*C)->ops->matmultnumeric = MatMatMultNumeric_MPIBAIJ_MPID<wbr>ense in MatMatMultSymbolic_MPIBAIJ_MPI<wbr>Dense.<br>
However, the routine MatMatMultSymbolic_MPIBAIJ_MPI<wbr>Dense is never reached when calling MatMatMult with scall == MAT_REUSE_MATRIX (<a href="http://www.mcs.anl.gov/petsc/petsc-current/src/mat/interface/matrix.c.html#line9487" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>petsc-current/src/mat/interfac<wbr>e/matrix.c.html#line9487</a>, just to be sure I added a dummy printf in MatMatMultSymbolic_MPIBAIJ_MPI<wbr>Dense and nothing is displayed with MAT_REUSE_MATRIX, MAT_INITIAL_MATRIX works as intended)<br></blockquote><div><br></div><div> MatMatMultSymbolic_xxx() is called only for MAT_INITIAL_MATRIX, during which, it defines</div><div>(*C)->ops->matmultnumeric = MatMatMultNumeric_MPIBAIJ_MPID<wbr>ense;<br></div><div><br></div><div>Then MatMatMult(A,C,MAT_REUSE_MATRIX,..) calls </div><div> (*(*C)->ops->matmultnumeric)(A,B,*C); (line 9432 in matrix.c)<br></div><div>which should go to MatMatMultNumeric_MPIBAIJ_MPID<wbr>ense.</div><div><br></div><div>You may follow a debugging process using petsc/src/mat/examples/tests/ex109.c</div><div><br></div><div>Are you working on a branch of petsc? If so, I may take a look and see what is the problem.</div><div><br></div><div>Hong</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2) I'm having trouble when scall == MAT_REUSE_MATRIX. Here,<br>
<br>
</blockquote>
<br>
<a href="http://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/dense/mpi/mpidense.c.html#line1208" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/p<wbr>etsc-current/src/mat/impls/den<wbr>se/mpi/mpidense.c.html#line120<wbr>8</a><br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
[2] it looks that the numeric part of the MatMatMult (which is<span class="gmail-"><br>
called when scall == MAT_REUSE_MATRIX) is hardwired to this routine<br>
<br>
</span></blockquote>
<br>
<a href="http://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/aij/mpi/mpimatmatmult.c.html#line376" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/p<wbr>etsc-current/src/mat/impls/aij<wbr>/mpi/mpimatmatmult.c.html#line<wbr>376</a><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
[3]. <br>
</blockquote><span class="gmail-">
Thus, at runtime, this call fails<br>
<br></span>
Links:<br>
------<br>
[1]<br>
<br>
<a href="http://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/aij/mpi/mpimatmatmult.c.html#line556" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/p<wbr>etsc-current/src/mat/impls/aij<wbr>/mpi/mpimatmatmult.c.html#line<wbr>556</a><br>
[2]<br>
<br>
<a href="http://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/dense/mpi/mpidense.c.html#line1208" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/p<wbr>etsc-current/src/mat/impls/den<wbr>se/mpi/mpidense.c.html#line120<wbr>8</a><br>
[3]<br>
<br>
<a href="http://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/aij/mpi/mpimatmatmult.c.html#line376" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/p<wbr>etsc-current/src/mat/impls/aij<wbr>/mpi/mpimatmatmult.c.html#line<wbr>376</a><br>
</blockquote>
<br>
</blockquote></div><br></div></div>