[petsc-users] Controlling MUMPS parameters inside PETSC

Evan Um evanum at gmail.com
Fri Oct 13 19:39:02 CDT 2017


Hi Hong,

Thanks for your reply. When I use standalone MUMPS for a symmetric matrix,
I pass a upper/lower triangular part to MUMPS. To do this, I use id.sym=2.
Under PETSC environment,

KSPCreate(PETSC_COMM_WORLD, &ksp);
KSPSetOperators(ksp, A, A);
KSPSetType (ksp, KSPPREONLY);
KSPGetPC(ksp, &pc);
MatSetOption(A, MAT_SYMMETRIC, PETSC_TRUE);
PCSetType(pc, PCLU);
PCFactorSetMatSolverPackage(pc, MATSOLVERMUMPS);
PCFactorSetUpMatSolverPackage(pc);

Can the 5th line be an alternative to id.sym=2?

Best,
Evan




On Fri, Oct 13, 2017 at 4:16 PM, Hong <hzhang at mcs.anl.gov> wrote:

> Evan:
>
>> Dear PETSC-users,
>>
>> I use parallel direct solver MUMPS inside PETSC and need to control some
>> MUMPS parameters inside PETSC. For example, I want to set up MUMPS
>> parameters as shown below.
>>
>>  ZMUMPS_STRUC_C id;
>>  id.job=-1; /* Initialize mumps instance*/
>>
> This is set in petsc/mumps interface. See line 1197, mumps.c
>
>
>>  id.par=1;  /* 0: host is not involved in solution processes */
>>
>  id.par=1; is used in the interface. See line 1198, id.par=1;
>
>  id.sym=2;  /* 0:unsysm, 2:general symmetric matrix */
>>
> id.sym is set in the interface based on the input matrix type, see line
> 2154-2171
>
>>
>> How can I access structure similar to id in PETSC?
>>
> Why do you want access id?
>
>
>> For example, I control my icntl parameters like this.
>>
>> PCFactorGetMatrix(pc, &F);
>> MatMumpsSetIcntl(F, icntl[i], ival[i]);
>>
>> However, it is not clear about how to control id.par and id.sym. If you
>> have any experience in controlling id.par and id.sym inside PETSC, I
>> request your help. In advance, thank you  very much for your help.
>>
>
> Petsc/mumps interface is developed for petsc users to call mumps direct
> solvers under petsc environment. The parameters id.par, id.sym ... are set
> in the interface according to the user's matrix and solver type, thus user
> does not need to know about them.
>
> Hong
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171013/3af5bd69/attachment.html>


More information about the petsc-users mailing list