[petsc-users] Sparse triangular solver

Barry Smith bsmith at mcs.anl.gov
Sun Mar 8 21:25:23 CDT 2015


> On Mar 8, 2015, at 6:47 PM, Hoang-Vu Dang <dang.hvu at gmail.com> wrote:
> 
> Thank you for the prompt reply. That is very helpful.
> 
> If I do not need the full solver/factorization but just the backward subs, do i need any special treatment ? Is there a way to hint the solver to apply only the last step to reduce overhead ?

  These packages provide the factorizations and solves; there is no way to do the triangular solvers without the factorizations so I don't know what you are asking for. Please be more specific about what you need and what you are providing; are you doing the factorizations?

  Barry

> 
> Vu
> 
> On Mar 8, 2015 6:26 PM, "Barry Smith" <bsmith at mcs.anl.gov> wrote:
> 
>   PETSc provides sparse parallel LU (and Cholesky) factorizations and solves via the external packages SuperLU_Dist, MUMPS, and Pastix. You need to first configure PETSc to use one or more of those packages for example ./configure --download-superlu_dist --download-metis --download-parmetis.
> 
>   It is generally best to use the linear solvers via the PETSc KSP interface (even for direct solvers such as LU). So you create a KSP object, provide the matrix object and call KSPSolve(). You can control the solver used via the options database; to use the installed SuperLU_Dist you would use -pc_type lu -pc_factor_mat_solver_package superlu_dist
> 
>   The MatrixMarket format is no good for parallel computing so you must first convert the file from MatrixMarket format to the PETSc binary format (see http://www.mcs.anl.gov/petsc/documentation/faq.html#sparse-matrix-ascii-format ) and then  you can use MatLoad() to load the matrix in parallel and then pass it to the KSP solver. For example src/ksp/ksp/examples/tutorials/ex10.c does this.
> 
> 
>   Barry
> 
> > On Mar 8, 2015, at 6:08 PM, Hoang-Vu Dang <dang.hvu at gmail.com> wrote:
> >
> > Hi,
> >
> > I would like to use petcs to perform parallel backward/forward substitution for sparse triangular matrices in a distributed memory cluster (with MPI).
> >
> > Could someone provide me some pointers on how to do this or whether petsc is good for this task ?
> >
> > I think there is MatSolve method, but unsure whether it supports good algorithm for sparse triangular matrices and how to provide an input in a MartrixMarket format / CSR format.
> >
> > Thank you
> > Vu
> 



More information about the petsc-users mailing list