[petsc-users] Using factored complex matrices from MUMPS as a preconditioner in PETSC

Hong hzhang at mcs.anl.gov
Wed Oct 11 11:16:29 CDT 2017


Evan,
I start looking at petsc/STRUMPACK-sparse interface.

Currently, the interface supports preconditioners: lu and ilu.
First, you configure petsc with '--download-strumpack
--with-cxx-dialect=C++11' (some external packages are also required).

After building petsc, I tested petsc/src/ksp/ksp/examples/tutorials/ex2.c:
mpiexec -n 4 ./ex2 -pc_type ilu -pc_factor_mat_solver_package strumpack
-mat_strumpack_hssminsize 2 -ksp_monitor
# WARNING STRUMPACK: There were unrecognized options.
  0 KSP Residual norm 7.459478705273e+00
  1 KSP Residual norm 1.525843261155e-02
  2 KSP Residual norm 6.672464933691e-05
Norm of error 6.61922e-05 iterations 2

using options '-help', I see strumpack supports two preconditioners, lu and
ilu, with following few options:
$ mpiexec -n 4 ./ex2 -pc_type ilu -pc_factor_mat_solver_package strumpack
-mat_strumpack_hssminsize 2 -ksp_monitor -h |grep strumpack
  -mat_strumpack_verbose: <FALSE> Print STRUMPACK information (None)
  -mat_strumpack_rctol <0.01>: Relative compression tolerance (None)
  -mat_strumpack_colperm: <TRUE> Find a col perm to get nonzero diagonal
(None)
  -mat_strumpack_hssminsize <2500>: Minimum size of dense block for HSS
compression

My guess is that hss is what you mentioned 'low rank approximation'
and  '-mat_strumpack_hssminsize'
is the block size (excuse me for ignorant of HSS).
If this is true, you requested feature is already in our interface.
Otherwise, please send me more detailed info about your request. The
STRUMPACK interface was contributed by an user, so I have to learn it for
supporting it.

Hong

On Tue, Oct 10, 2017 at 2:23 PM, Evan Um <evanum at gmail.com> wrote:

> Hi Hong,
>
> Thanks for your help. I am testing if I can use MUMPS block low rank
> factors as a preconditioner for QMR in MUMPS framework. I would like to ask
> one more question. STRUMPACK (http://portal.nersc.gov/
> project/sparse/strumpack/) also supports low rank approximation. Can
> PETSC also allow users to use the approximate factors as a preconditioner
> in PETSC-QMR?
>
> Best,
> Evan
>
>
> On Tue, Oct 3, 2017 at 8:34 AM, Hong <hzhang at mcs.anl.gov> wrote:
>
>> Evan,
>> ICNTL(35) and CNTL(7) are added to petsc-mumps interface in branch
>> hzhang/update-mumps-5.1.1-cntl
>>
>> You may give it a try. Once it passes our regression tests, I'll merge it
>> to petsc master branch.
>>
>> Hong
>>
>>
>> On Sun, Sep 24, 2017 at 8:08 PM, Hong <hzhang at mcs.anl.gov> wrote:
>>
>>> I'll check it.
>>> Hong
>>>
>>> On Sun, Sep 24, 2017 at 3:42 PM, Evan Um <evanum at gmail.com> wrote:
>>>
>>>> Hi Barry,
>>>>
>>>> Thanks for your comments. To activate block low rank (BLR)
>>>> approximation in MUMPS version 5.1.1, a user needs to turn on the
>>>> functionality (i.e. ICNTL(35)=1) and specify the tolerance value (e.g.
>>>> CNTL(7)=1e-4). In PETSC, I think that we can set up ICNTL and CNTL
>>>> parameters for MUMPS. I was wondering if we can still use BLR approximation
>>>> for a preconditioner for Krylov solvers.
>>>>
>>>> Best,
>>>> Evan
>>>>
>>>>
>>>> On Sat, Sep 23, 2017 at 6:45 PM, Barry Smith <bsmith at mcs.anl.gov>
>>>> wrote:
>>>>
>>>>>
>>>>> > On Sep 23, 2017, at 8:38 PM, Evan Um <evanum at gmail.com> wrote:
>>>>> >
>>>>> > Dear PETSC Users,
>>>>> >
>>>>> > My system matrix comes from finite element modeling and is complex
>>>>> and unstructured. Its typical size is a few millions-by a few millions. I
>>>>> wondering if I can use MUMPS parallel direct solver as a preconditioner in
>>>>> PETSC. For example, I want to pass factored matrices to Krylov iterative
>>>>> solvers such as QMR. Is there any PETSC+MUMPS example code for the purpose?
>>>>>
>>>>>   You don't pass factored matrices you just pass the original matrix
>>>>> and use -pc_type lu -pc_factor_mat_solver_package mumps
>>>>>
>>>>> > Can PETSC call the latest MUMPS that supports block low rank
>>>>> approximation?
>>>>>
>>>>>   No, send us info on it and we'll see if we can add an interface
>>>>>
>>>>>
>>>>> >
>>>>> > In advance, thank you very much for your comments.
>>>>> >
>>>>> > Best,
>>>>> > Evan
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171011/658a30be/attachment.html>


More information about the petsc-users mailing list