[petsc-users] PCFactorSetMatOrderingType not working with 3.21

Barry Smith bsmith at petsc.dev
Sat Aug 17 12:07:46 CDT 2024


   I have attached src/snes/tutorials/ex5.c in which I tried to reproduce your problem by inserting the code you've indicated.

   However I am not getting the problem you see, I am seeing,

    type: ilu
      out-of-place factorization
      0 levels of fill
      tolerance for zero pivot 2.22045e-14
      matrix ordering: rcm

when I run with -pc_type ilu -snes_view

 Can you please confirm you get the same problem with the attached ex5.c ?  You could send your code to see if I can reproduce the problem.

  I am using the release branch of PETSc 

  Barry






> On Aug 17, 2024, at 12:35 PM, Zou, Ling via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> Hi all,
>  
> The following codes are how I used to setup PC mat ordering:
>  
>   // Setup KSP/PC (at this moment, user-input options and commandline options are available)
>   SNESGetKSP(snes, &ksp);
>   KSPSetFromOptions(ksp);
>   PC pc;
>   KSPGetPC(ksp, &pc);
>   PCFactorSetMatOrderingType(pc, MATORDERINGRCM);
>   // PCFactorSetLevels(pc, 5);
>   SNESSetFromOptions(snes);
>  
> After switching to PETSc 3.21, this no longer works, and can be confirmed from ‘-snes_view’ output:
>  
>   PC Object: 1 MPI process
>     type: ilu
>       out-of-place factorization
>       0 levels of fill
>       tolerance for zero pivot 2.22045e-14
>       using diagonal shift to prevent zero pivot [NONZERO]
>       matrix ordering: natural
>  
> The command line option still works, i.e., ‘-pc_factor_mat_ordering_type rcm’ gives me the correct behavior.
>  
> Questions:
> Is this a bug introduced in the new version, or
> With the new version, I should call this function at a different time?
>  
> Best,
>  
> -Ling

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240817/4e556b41/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex5.c
Type: application/octet-stream
Size: 37704 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240817/4e556b41/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240817/4e556b41/attachment-0003.html>


More information about the petsc-users mailing list