[petsc-dev] petsc's hypre interface

Barry Smith bsmith at mcs.anl.gov
Mon Aug 12 11:27:40 CDT 2013


   In the code is the comment. 

  /* cstart is only valid for square MPIAIJ layed out in the usual way */

   This code uses specific details of the PETSc and hypre storage formats and is not general purpose. If you want to use it from rectangular matrices you will need to debug and rewrite it yourself.

   Barry


On Aug 12, 2013, at 9:21 AM, Alexander Grayver <agrayver at gfz-potsdam.de> wrote:

> Dear petsc devs,
> 
> I have came across strange behavior trying to make use of PETSc routines (from mhyp.c) to convert rectangular matrices into hypre format in parallel (i.e. MATMPIAIJ). 
> Whenever I use MatHYPRE_IJMatrixCreate -> MatHYPRE_IJMatrixCopy -> hypre_ParCSRMatrixTranspose I get following error:
> hypre_assert failed: AT_i[A_j[j]] < num_nonzerosAT
> hypre_assert failed: AT_i[A_j[j]] < num_nonzerosAT
> 
> it comes from csr_matop.c : hypre_CSRMatrixTranspose.
> 
> The error message never appears if construct hypre matrix directly and transpose it. 
> 
> Attached is a minimal example that reproduces the problem (try to (un)comment line 58).
> 
> I am wondering where is an origin of this error: in my code, in petsc or in hypre?
> 
> Thanks,
> Alexander
> <test_hypre.c>




More information about the petsc-dev mailing list