[petsc-users] Example for MatMatMultSymbolic

Johannes Huber johannes.huber at unibas.ch
Tue Jan 8 08:26:44 CST 2013


Hi,
I have a valgrind "invalid read" in MatGetBrowsOfAoCols_MPIAIJ in the lines
 rvalues  = gen_from->values; /* holds the length of receiving row */
 svalues  = gen_to->values;   /* holds the length of sending row */
(and others, but that are the first). This function is called indirectly via MatMatMultSymbolic.
All invalid reads apear in MatGetBrowsOfAoCols_MPIAIJ.
The calling sequence for the matrix factors are
  MatCreate(PETSC_COMM_WORLD,A);
  MatSetSizes(A,NumLocRows,NumLocCols,PETSC_DETERMINE,PETSC_DETERMINE);
  MatSetType(A,MATMPIAIJ);
  MatMPIAIJSetPreallocation(A,PETSC_NULL,nnz,PETSC_NULL,onz);
  MatSetValues(...);
  MatAssemblyBegin(...)
  MatAssemblyEnd(...)
and then a call to MatMatMultSymbolic.
I want the result matrix to be created. In the documentation I see, that this happens, if I pass MAT_REUSE_MATRIX as scall, but how can I pass the value, I don't the parameter.
Where can I find an example for MatMatMultSymbolic / MatMatMultNumeric?
Thanks,
    Hannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130108/0a06291c/attachment.html>


More information about the petsc-users mailing list