[petsc-users] PETSc 3.21 release

2024-03-29 Thread Barry Smith
We are pleased to announce the release of PETSc version 3.21.0 at 
https://urldefense.us/v3/__https://petsc.org/release/download/__;!!G_uCfscf7eWS!eYJ4I4DyRSmpyGr66cTWnTsPF_K-dLY6xDA_znXt4dYB-KDtxykopISUhT4RK_hB0ljDEzelUUGxjML3npkg5jU$
  

A list of the major changes and updates can be found at 
https://urldefense.us/v3/__https://petsc.org/release/changes/321/__;!!G_uCfscf7eWS!eYJ4I4DyRSmpyGr66cTWnTsPF_K-dLY6xDA_znXt4dYB-KDtxykopISUhT4RK_hB0ljDEzelUUGxjML3X-Mnvnc$
 

The final update to petsc-3.20 i.e., petsc-3.20.6 is also available.

We recommend upgrading to PETSc 3.21.0 soon. As always, please report problems 
to petsc-ma...@mcs.anl.gov   and ask questions 
at petsc-users@mcs.anl.gov 

A reminder that releases are at the end of March and September each year.

This release includes contributions from

Albert Cowie
Alex Lindsay
Barry Smith
Blanca Mellado Pinto
David Andrs
David Kamensky
David Wells
Fabien Evard
Fande Kong
Hansol Suh
Hong Zhang
Ilya Fursov
James Wright
Jed Brown
Jeongu Kim
Jeremy L Thompson
Jeremy Theler
Jose Roman
Junchao Zhang
Koki Sagiyama
Lars Bilke
Lisandro Dalcin
Mark Adams
Martin Diehl
Massimiliano Leoni
Matthew Knepley
Matt McGurn
Mr. Hong Zhang
Nils Friess
Pablo Brubeck
Pierre Jolivet
René Chenard
Rezgar Shakeri
Richard Tran Mills
Satish Balay
Sebastian Grimberg
Stefano Zampini
Stephan Köhler
Toby Isaac
YANG Zongze
Zach Atkins

and bug reports/proposed improvements received from

Alain O' Miniussi
Benjamin Sturdevant
Damian Marek
David Bold
Fabian Wermelinger
Fabien Evrard
Gerard Henry
Gourav Kumbhojkar
Glenn Hammond
Hana Honnerová
Hao Luo
Henrik Büsing
Ilya Fursov
Jeremy Theler
Jesse Madsen
Jose Roman
Kevin G. Wang
Mark Adams
Mehmet Sahin
Miguel Angel Salazar de Troya
Niclas Götting
Pierre Jolivet
Simone Scacchi
Victor Eijkhout
Timothy J. Williams
Yi Hu

As always, thanks for your support,

Barry

Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

2024-03-29 Thread Barry Smith

  Generically you see the ~[DOF]^3 for dense matrix factorizations. For sparse, 
depending on the problem and space dimension 1, 2, or 3 you do much better than 
~[DOF]^3 dof. Iterative solvers when working well offer the possibility of 
~[DOF] which is why they are needed for very large problems.

> On Mar 29, 2024, at 3:29 PM, Zou, Ling via petsc-users 
>  wrote:
> 
> Note that [Wall Time] ~ [DOF]^1.333, instead of being ~[DOF]^3.
> The [DOF]^3 rule was the scary part that I wanted to avoid LU.
>  
> -Ling
>  
> From: petsc-users  > on behalf of Zou, Ling via 
> petsc-users mailto:petsc-users@mcs.anl.gov>>
> Date: Friday, March 29, 2024 at 2:06 PM
> To: Barry Smith mailto:bsm...@petsc.dev>>, Zhang, Hong 
> mailto:hzh...@mcs.anl.gov>>
> Cc: petsc-users@mcs.anl.gov  
> mailto:petsc-users@mcs.anl.gov>>
> Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use 
> LU?
> 
> Hong, are these results somewhat expected? I don’t see any speed up for using 
> 2 processors (maybe I don’t have 2 processors?).
>  
> Option
> Wall Time (sec)
> -pc_type lu
> 7.442
> mpiexec -n 2 -pc_type lu
> 9.112
> -pc_type lu -pc_factor_mat_solver_type mumps
> 8.748
> mpiexec -n 2 -pc_type lu -pc_factor_mat_solver_type mumps
> 9.013
>  
> For different size problems
> -pc_type lu -m 1000 -n 1000
> 7.442
> -pc_type lu -m 750 -n 750
> 3.142
> -pc_type lu -m 500 -n 500
> 1.007
> -pc_type lu -m 250 -n 250
> 0.150
> -pc_type lu -m 100 -n 100
> 0.016
>  
> 
>  
>  
>  
> From: petsc-users  > on behalf of Zou, Ling via 
> petsc-users mailto:petsc-users@mcs.anl.gov>>
> Date: Friday, March 29, 2024 at 12:50 PM
> To: Barry Smith mailto:bsm...@petsc.dev>>
> Cc: petsc-users@mcs.anl.gov  
> mailto:petsc-users@mcs.anl.gov>>
> Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use 
> LU?
> 
> I cannot believe that I typed: make ex02
> Thanks, it works.
>  
> -Ling
>  
> From: Barry Smith mailto:bsm...@petsc.dev>>
> Date: Friday, March 29, 2024 at 12:43 PM
> To: Zou, Ling mailto:l...@anl.gov>>
> Cc: Zhang, Hong mailto:hzh...@mcs.anl.gov>>, 
> petsc-users@mcs.anl.gov  
> mailto:petsc-users@mcs.anl.gov>>
> Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use 
> LU?
> 
> cd src/ksp/ksp/tutorials make ex2 On Mar 29, 2024, at 1: 10 PM, Zou, Ling 
>  wrote: Hong, thanks! That’s great to know. I’d like to try 
> the ex2 tutorial case locally to see how it performs. I have already 
> installed PETSc 3. 20. 5
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
>  
> ZjQcmQRYFpfptBannerEnd
>  
>cd src/ksp/ksp/tutorials
> make ex2 
>  
>  
> 
> On Mar 29, 2024, at 1:10 PM, Zou, Ling mailto:l...@anl.gov>> 
> wrote:
>  
> Hong, thanks! That’s great to know.
> I’d like to try the ex2 tutorial case locally to see how it performs. I have 
> already installed PETSc 3.20.5 on my Mac.
> Here shows the very last step of installation.
>  
> make PETSC_DIR=/Users/lingzou/Downloads/petsc-3.20.5 PETSC_ARCH=arch-opt check
> Running PETSc check examples to verify correct installation
> Using PETSC_DIR=/Users/lingzou/Downloads/petsc-3.20.5 and PETSC_ARCH=arch-opt
> C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
> C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
> Completed PETSc check examples
>  
> I found myself not knowing how to compile petsc/src/ksp/ksp/tutorials/ex2.c
> Do we have a page for how to do that?
>  
> Best,
>  
> -Ling
>  
> From: Zhang, Hong mailto:hzh...@mcs.anl.gov>>
> Date: Thursday, March 28, 2024 at 4:59 PM
> To: Zou, Ling mailto:l...@anl.gov>>, Barry Smith 
> mailto:bsm...@petsc.dev>>
> Cc: petsc-users@mcs.anl.gov  
> mailto:petsc-users@mcs.anl.gov>>
> Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use 
> LU?
> 
> Ling,
> MUMPS 
> https://urldefense.us/v3/__https://mumps-solver.org/index.php__;!!G_uCfscf7eWS!ZmTlsQateB-nACNJAmqiJGcDWxWQOps2BeB7_vEs7q7-Rr8Do1invh3ez12a6aaIkSB7-jziREAovRpWXE73gS4$
>   
> 
>  , superlu and  superlu_dist 
> https://urldefense.us/v3/__https://portal.nersc.gov/project/sparse/superlu/__;!!G_uCfscf7eWS!ZmTlsQateB-nACNJAmqiJGcDWxWQOps2BeB7_vEs7q7-Rr8Do1invh3ez12a6aaIkSB7-jziREAovRpWWnkf2IM$
>   
> 
> are sparse LU solvers, i.e., they produce SPARSE LU matrix factors. For many 
> applications, they can solve 1 million DOF easily even in sequential mode. 
> For example 
> 

Re: [petsc-users] ex19: Segmentation Violation when run with MUMPS on MacOS (arm64)

2024-03-29 Thread Satish Balay via petsc-users
I'm able to reproduce this error on a slightly older xcode [but don't know why 
this issue comes up]

> Apple clang version 15.0.0 (clang-1500.1.0.2.5)

Can you try using the additional configure options (along with 
LDFLAGS=-Wl,-ld_classic)  and see if it works?

COPTFLAGS=-O0 FOPTFLAGS=-O0

Satish

On Fri, 29 Mar 2024, zeyu xia wrote:

> Hi! I am grateful for your prompt response.
> 
> I follow your suggestions, and however, it still does not work. For the
> related information please find the files 'make check2.txt' and
> 'configure.log' in the attachment.
> 
> If possible, please do me a favor again. Thanks for your patience.
> 
> Best wishes,
> Zeyu Xia
> 
> 
> Satish Balay  于2024年3月29日周五 23:48写道:
> 
> > Could you:
> >
> > - reinstall brew after the xcode upgrade (not just update)
> > https://urldefense.us/v3/__https://petsc.org/main/install/install/*installing-on-macos__;Iw!!G_uCfscf7eWS!dGItos-D58VSJn4kOlKy2TEX-PWhflbWfNuM0zqhEXbGniD5S13iWCxgBmg9wYk4OrSwaP6jjzANIHN1ZHATKXE$
> >  
> > - not use --LDFLAGS=-Wl,-ld_classic
> >
> > And see if the problem persists?
> >
> > Satish
> >
> > On Fri, 29 Mar 2024, zeyu xia wrote:
> >
> > > Dear PETSc team:
> > >
> > > Recently I installed firedrake on MacOS (arm64) with the latest
> > > Xcode, and there seems some error with mumps. I ran two times of the
> > > command `make check`. The first time it just output wrong results, and
> > the
> > > second time it raised an error with Segmentation Violation. Please see
> > the
> > > files “make check.txt” and “configure.log” in the attachment.
> > >
> > > I will certainly be happy and grateful if you can take some time
> > to
> > > deal with this problem. Thanks for your patience.
> > >
> > > Best wishes,
> > > Zeyu Xia
> > >
> >
> 

Re: [petsc-users] [External] Re: Does ILU(15) still make sense or should just use LU?

2024-03-29 Thread Satish Balay via petsc-users
On Fri, 29 Mar 2024, Pfeiffer, Sharon wrote:

> I’d like to unsubscribe to this mailing list.

Done.

Note: every list e-mail provides this info [in headers]

List-Id: PETSc users list 
List-Unsubscribe: 
,

List-Archive: 

List-Post: 
List-Help: 
List-Subscribe: 
,


Satish

Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

2024-03-29 Thread Zou, Ling via petsc-users
I cannot believe that I typed: make ex02
Thanks, it works.

-Ling

From: Barry Smith 
Date: Friday, March 29, 2024 at 12:43 PM
To: Zou, Ling 
Cc: Zhang, Hong , petsc-users@mcs.anl.gov 

Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use LU?
cd src/ksp/ksp/tutorials make ex2 On Mar 29, 2024, at 1: 10 PM, Zou, Ling 
 wrote: Hong, thanks! That’s great to know. I’d like to try the 
ex2 tutorial case locally to see how it performs. I have already installed 
PETSc 3. 20. 5
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd

   cd src/ksp/ksp/tutorials
make ex2



On Mar 29, 2024, at 1:10 PM, Zou, Ling  wrote:

Hong, thanks! That’s great to know.
I’d like to try the ex2 tutorial case locally to see how it performs. I have 
already installed PETSc 3.20.5 on my Mac.
Here shows the very last step of installation.

make PETSC_DIR=/Users/lingzou/Downloads/petsc-3.20.5 PETSC_ARCH=arch-opt check
Running PETSc check examples to verify correct installation
Using PETSC_DIR=/Users/lingzou/Downloads/petsc-3.20.5 and PETSC_ARCH=arch-opt
C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
Completed PETSc check examples

I found myself not knowing how to compile petsc/src/ksp/ksp/tutorials/ex2.c
Do we have a page for how to do that?

Best,

-Ling

From: Zhang, Hong 
Date: Thursday, March 28, 2024 at 4:59 PM
To: Zou, Ling , Barry Smith 
Cc: petsc-users@mcs.anl.gov 
Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use LU?
Ling,
MUMPS 
https://urldefense.us/v3/__https://mumps-solver.org/index.php__;!!G_uCfscf7eWS!aYi5-0T3JGIgMhN_s0Mk_JoL1s-lEdaLb59ojpdtYoBOnghYle7EUfUsQEJUjpoedPeovb9GdH-kAEWJp8c$
 

 , superlu and  superlu_dist 
https://urldefense.us/v3/__https://portal.nersc.gov/project/sparse/superlu/__;!!G_uCfscf7eWS!aYi5-0T3JGIgMhN_s0Mk_JoL1s-lEdaLb59ojpdtYoBOnghYle7EUfUsQEJUjpoedPeovb9GdH-kEF6SvEw$
 

are sparse LU solvers, i.e., they produce SPARSE LU matrix factors. For many 
applications, they can solve 1 million DOF easily even in sequential mode. For 
example
petsc/src/ksp/ksp/tutorials
./ex2 -pc_type lu -pc_factor_mat_solver_type mumps -m 1000 -n 1000 
-ksp_monitor_true_residual
  0 KSP preconditioned resid norm 1.e+03 true resid norm 
6.330876716538e+01 ||r(i)||/||b|| 1.e+00
  1 KSP preconditioned resid norm 9.976801056860e-09 true resid norm 
3.908107755078e-10 ||r(i)||/||b|| 6.173090916254e-12
Norm of error 9.98582e-09 iterations 1

MUMPS LU solves this matrix of size 1.e6 in one iteration (takes few sec on my 
laptop).
As Barry suggests, try mumps first. If it fails or it is too slow, then explore 
other solvers available in PETSc 
https://urldefense.us/v3/__https://petsc.org/release/overview/linear_solve_table/__;!!G_uCfscf7eWS!aYi5-0T3JGIgMhN_s0Mk_JoL1s-lEdaLb59ojpdtYoBOnghYle7EUfUsQEJUjpoedPeovb9GdH-kcP4TJnA$
 


>From my experiments, MUMPS is faster and more robust than 
>superlu/superlu_dist, yet it consumes slightly more memory.
See 
https://urldefense.us/v3/__https://petsc.org/release/manual/ksp/*using-external-linear-solvers__;Iw!!G_uCfscf7eWS!aYi5-0T3JGIgMhN_s0Mk_JoL1s-lEdaLb59ojpdtYoBOnghYle7EUfUsQEJUjpoedPeovb9GdH-kb33BH94$
 

 on how to install mumps with petsc.

Hong







From: Zou, Ling 
Sent: Thursday, March 28, 2024 2:34 PM
To: Barry Smith 
Cc: Zhang, Hong ; petsc-users@mcs.anl.gov 

Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

Thank you. Those are great suggestions. Although I mentioned 1 million DOF, but 
we rarely go there, so maybe stick with what is working now, and meanwhile 
seeking helps from literatures.

-Ling


From: Barry Smith 
Date: Thursday, March 28, 2024 at 2:26 PM
To: Zou, Ling 
Cc: Zhang, Hong , petsc-users@mcs.anl.gov 

Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use LU?
You may benefit from a literature search on your model AND preconditioners to 
see what others have used. But I would try PETSc/MUMPS on the biggest size you 
want and see how it goes (better it runs for a little longer and you don't 
waste months

Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

2024-03-29 Thread Barry Smith

   cd src/ksp/ksp/tutorials
make ex2 


> On Mar 29, 2024, at 1:10 PM, Zou, Ling  wrote:
> 
> Hong, thanks! That’s great to know.
> I’d like to try the ex2 tutorial case locally to see how it performs. I have 
> already installed PETSc 3.20.5 on my Mac.
> Here shows the very last step of installation.
>  
> make PETSC_DIR=/Users/lingzou/Downloads/petsc-3.20.5 PETSC_ARCH=arch-opt check
> Running PETSc check examples to verify correct installation
> Using PETSC_DIR=/Users/lingzou/Downloads/petsc-3.20.5 and PETSC_ARCH=arch-opt
> C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
> C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
> Completed PETSc check examples
>  
> I found myself not knowing how to compile petsc/src/ksp/ksp/tutorials/ex2.c
> Do we have a page for how to do that?
>  
> Best,
>  
> -Ling
>  
> From: Zhang, Hong 
> Date: Thursday, March 28, 2024 at 4:59 PM
> To: Zou, Ling , Barry Smith 
> Cc: petsc-users@mcs.anl.gov 
> Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use 
> LU?
> 
> Ling,
> MUMPS 
> https://urldefense.us/v3/__https://mumps-solver.org/index.php__;!!G_uCfscf7eWS!fYi1HJwMm9FudQ0Jmc80axT8PKPd_uSQDnx_QONzQKRQWyTElDsv-kkch9H3dHrw1M1ezregBqWojsAXknJURaY$
>   , superlu and  superlu_dist 
> https://urldefense.us/v3/__https://portal.nersc.gov/project/sparse/superlu/__;!!G_uCfscf7eWS!fYi1HJwMm9FudQ0Jmc80axT8PKPd_uSQDnx_QONzQKRQWyTElDsv-kkch9H3dHrw1M1ezregBqWojsAXkSrGTOI$
>  
> are sparse LU solvers, i.e., they produce SPARSE LU matrix factors. For many 
> applications, they can solve 1 million DOF easily even in sequential mode. 
> For example 
> petsc/src/ksp/ksp/tutorials 
> ./ex2 -pc_type lu -pc_factor_mat_solver_type mumps -m 1000 -n 1000 
> -ksp_monitor_true_residual
>   0 KSP preconditioned resid norm 1.e+03 true resid norm 
> 6.330876716538e+01 ||r(i)||/||b|| 1.e+00
>   1 KSP preconditioned resid norm 9.976801056860e-09 true resid norm 
> 3.908107755078e-10 ||r(i)||/||b|| 6.173090916254e-12
> Norm of error 9.98582e-09 iterations 1
>  
> MUMPS LU solves this matrix of size 1.e6 in one iteration (takes few sec on 
> my laptop).
> As Barry suggests, try mumps first. If it fails or it is too slow, then 
> explore other solvers available in PETSc 
> https://urldefense.us/v3/__https://petsc.org/release/overview/linear_solve_table/__;!!G_uCfscf7eWS!fYi1HJwMm9FudQ0Jmc80axT8PKPd_uSQDnx_QONzQKRQWyTElDsv-kkch9H3dHrw1M1ezregBqWojsAXj0nzSvY$
>  
>  
> From my experiments, MUMPS is faster and more robust than 
> superlu/superlu_dist, yet it consumes slightly more memory.
> See 
> https://urldefense.us/v3/__https://petsc.org/release/manual/ksp/*using-external-linear-solvers__;Iw!!G_uCfscf7eWS!fYi1HJwMm9FudQ0Jmc80axT8PKPd_uSQDnx_QONzQKRQWyTElDsv-kkch9H3dHrw1M1ezregBqWojsAXrhJbO84$
>   on how to install mumps with petsc.
>  
> Hong
>  
>  
>  
>  
>  
>  
> From: Zou, Ling 
> Sent: Thursday, March 28, 2024 2:34 PM
> To: Barry Smith 
> Cc: Zhang, Hong ; petsc-users@mcs.anl.gov 
> 
> Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use 
> LU?
>  
> Thank you. Those are great suggestions. Although I mentioned 1 million DOF, 
> but we rarely go there, so maybe stick with what is working now, and 
> meanwhile seeking helps from literatures.
>  
> -Ling
>  
> From: Barry Smith 
> Date: Thursday, March 28, 2024 at 2:26 PM
> To: Zou, Ling 
> Cc: Zhang, Hong , petsc-users@mcs.anl.gov 
> 
> Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use 
> LU?
> 
> You may benefit from a literature search on your model AND preconditioners to 
> see what others have used. But I would try PETSc/MUMPS on the biggest size 
> you want and see how it goes (better it runs for a little longer and you 
> don't waste months 
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
>  
> ZjQcmQRYFpfptBannerEnd
>  
>You may benefit from a literature search on your model AND preconditioners 
> to see what others have used. But I would try PETSc/MUMPS on the biggest size 
> you want and see how it goes (better it runs for a little longer and you 
> don't waste months trying to find a good preconditioner).
>  
>  
>  
>  
> 
> On Mar 28, 2024, at 2:20 PM, Zou, Ling  wrote:
>  
> Thank you, Barry.
> Yes, I have tried different preconditioners, but in a naïve way, i.e., 
> looping through possible options using `-pc_type ` command line.
> But no, not in a meaningful way because the lack of understanding of the 
> connection between physics (the problem we are dealing with) to math (the 
> correct combination of those preconditioners).
>  
> -Ling
>  
> From: Barry Smith mailto:bsm...@petsc.dev>>
> Date: Thursday, March 28, 2024 at 1:09 PM
> To: Zou, Ling mailto:l...@anl.gov>>
> Cc: Zhang, Hong mailto:hzh...@mcs.anl.gov>>, 
> petsc-users@mcs.anl.gov  
> mailto:petsc-users@mcs.anl.gov>>
> 

Re: [petsc-users] [External] Re: Does ILU(15) still make sense or should just use LU?

2024-03-29 Thread Pfeiffer, Sharon
OFFICIAL USE ONLY / À USAGE EXCLUSIF

I’d like to unsubscribe to this mailing list.

Thanks.

~ Sharon

From: petsc-users  On Behalf Of Barry Smith
Sent: Thursday, March 28, 2024 3:26 PM
To: Zou, Ling 
Cc: petsc-users@mcs.anl.gov
Subject: [External] Re: [petsc-users] Does ILU(15) still make sense or should 
just use LU?

You may benefit from a literature search on your model AND preconditioners to 
see what others have used. But I would try PETSc/MUMPS on the biggest size you 
want and see how it goes (better it runs for a little longer and you don't 
waste months
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender

This message came from outside your organization. Do not open attachments or 
click links from unknown senders or unexpected email

Report Suspicious  

   ‌



ZjQcmQRYFpfptBannerEnd
You may benefit from a literature search on your model AND preconditioners to 
see what others have used. But I would try PETSc/MUMPS on the biggest size you 
want and see how it goes (better it runs for a little longer and you don't 
waste months
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender

This message came from outside your organization.



ZjQcmQRYFpfptBannerEnd

   You may benefit from a literature search on your model AND preconditioners 
to see what others have used. But I would try PETSc/MUMPS on the biggest size 
you want and see how it goes (better it runs for a little longer and you don't 
waste months trying to find a good preconditioner).




On Mar 28, 2024, at 2:20 PM, Zou, Ling mailto:l...@anl.gov>> 
wrote:

Thank you, Barry.
Yes, I have tried different preconditioners, but in a naïve way, i.e., looping 
through possible options using `-pc_type ` command line.
But no, not in a meaningful way because the lack of understanding of the 
connection between physics (the problem we are dealing with) to math (the 
correct combination of those preconditioners).

-Ling

From: Barry Smith mailto:bsm...@petsc.dev>>
Date: Thursday, March 28, 2024 at 1:09 PM
To: Zou, Ling mailto:l...@anl.gov>>
Cc: Zhang, Hong mailto:hzh...@mcs.anl.gov>>, 
petsc-users@mcs.anl.gov 
mailto:petsc-users@mcs.anl.gov>>
Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use LU?
1 million is possible for direct solvers using PETSc with the MUMPS direct 
solver when you cannot get a preconditioner to work well for your problems. ILU 
are not very robust preconditioners and I would not rely on them. Have you 
investigated
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd

   1 million is possible for direct solvers using PETSc with the MUMPS direct 
solver when you cannot get a preconditioner to work well for your problems.

ILU are not very robust preconditioners and I would not rely on them. Have 
you investigated other preconditioners in PETSc, PCGAMG, PCASM, PCFIELDSPLIT or 
some combination of these preconditioners work for many problems, though 
certainly not all.



On Mar 28, 2024, at 1:14 PM, Zou, Ling mailto:l...@anl.gov>> 
wrote:

Thank you, Barry.
Yeah, this is unfortunate given that the problem we are handling is quite 
heterogeneous (in both mesh and physics).
I expect that our problem sizes will be mostly smaller than 1 million DOF, 
should LU still be a practical solution? Can it scale well if we choose to run 
the problem in a parallel way?

PS1: -ksp_norm_type unpreconditioned did not work as the true residual did not 
go down, even with 300 linear iterations.
PS2: what do you think if it will be beneficial to have more detailed 
discussions (e.g., a presentation?) on the problem we are solving to seek more 
advice?

-Ling

From: Barry Smith mailto:bsm...@petsc.dev>>
Date: Thursday, March 28, 2024 at 11:14 AM
To: Zou, Ling mailto:l...@anl.gov>>
Cc: Zhang, Hong mailto:hzh...@mcs.anl.gov>>, 
petsc-users@mcs.anl.gov 
mailto:petsc-users@mcs.anl.gov>>
Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use LU?
This is a bad situation, the solver is not really converging. This can happen 
with ILU() sometimes, it so badly scales things that the preconditioned 
residual decreases a lot but the true residual is not really getting smaller. 
Since your matrices
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd

   This is a bad situation, the solver is not really converging. This can 
happen with ILU() sometimes, it so badly scales things that the preconditioned 
residual decreases a lot but the true residual is not really getting smaller. 
Since your matrices are small best to stick to LU.

You can use -ksp_norm_type unpreconditioned to 

Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

2024-03-29 Thread Zou, Ling via petsc-users
Hong, thanks! That’s great to know.
I’d like to try the ex2 tutorial case locally to see how it performs. I have 
already installed PETSc 3.20.5 on my Mac.
Here shows the very last step of installation.


make PETSC_DIR=/Users/lingzou/Downloads/petsc-3.20.5 PETSC_ARCH=arch-opt check

Running PETSc check examples to verify correct installation

Using PETSC_DIR=/Users/lingzou/Downloads/petsc-3.20.5 and PETSC_ARCH=arch-opt

C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process

C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes

Completed PETSc check examples

I found myself not knowing how to compile petsc/src/ksp/ksp/tutorials/ex2.c
Do we have a page for how to do that?

Best,

-Ling

From: Zhang, Hong 
Date: Thursday, March 28, 2024 at 4:59 PM
To: Zou, Ling , Barry Smith 
Cc: petsc-users@mcs.anl.gov 
Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use LU?
Ling,
MUMPS 
https://urldefense.us/v3/__https://mumps-solver.org/index.php__;!!G_uCfscf7eWS!Z3HkqPZmZutJUiRjmnhyaPa2HkhKQJb9dJOEBTClUJN3Kd4WY4jmqd2wNQzXlHQ3tzJYID4p5EVPhtWVP1Y$
  , superlu and  superlu_dist 
https://urldefense.us/v3/__https://portal.nersc.gov/project/sparse/superlu/__;!!G_uCfscf7eWS!Z3HkqPZmZutJUiRjmnhyaPa2HkhKQJb9dJOEBTClUJN3Kd4WY4jmqd2wNQzXlHQ3tzJYID4p5EVPnIot-SE$
 
are sparse LU solvers, i.e., they produce SPARSE LU matrix factors. For many 
applications, they can solve 1 million DOF easily even in sequential mode. For 
example
petsc/src/ksp/ksp/tutorials
./ex2 -pc_type lu -pc_factor_mat_solver_type mumps -m 1000 -n 1000 
-ksp_monitor_true_residual
  0 KSP preconditioned resid norm 1.e+03 true resid norm 
6.330876716538e+01 ||r(i)||/||b|| 1.e+00
  1 KSP preconditioned resid norm 9.976801056860e-09 true resid norm 
3.908107755078e-10 ||r(i)||/||b|| 6.173090916254e-12
Norm of error 9.98582e-09 iterations 1

MUMPS LU solves this matrix of size 1.e6 in one iteration (takes few sec on my 
laptop).
As Barry suggests, try mumps first. If it fails or it is too slow, then explore 
other solvers available in PETSc 
https://urldefense.us/v3/__https://petsc.org/release/overview/linear_solve_table/__;!!G_uCfscf7eWS!Z3HkqPZmZutJUiRjmnhyaPa2HkhKQJb9dJOEBTClUJN3Kd4WY4jmqd2wNQzXlHQ3tzJYID4p5EVPYE9JX04$
 

>From my experiments, MUMPS is faster and more robust than 
>superlu/superlu_dist, yet it consumes slightly more memory.
See 
https://urldefense.us/v3/__https://petsc.org/release/manual/ksp/*using-external-linear-solvers__;Iw!!G_uCfscf7eWS!Z3HkqPZmZutJUiRjmnhyaPa2HkhKQJb9dJOEBTClUJN3Kd4WY4jmqd2wNQzXlHQ3tzJYID4p5EVPz34vg0Q$
  on how to install mumps with petsc.

Hong







From: Zou, Ling 
Sent: Thursday, March 28, 2024 2:34 PM
To: Barry Smith 
Cc: Zhang, Hong ; petsc-users@mcs.anl.gov 

Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use LU?


Thank you. Those are great suggestions. Although I mentioned 1 million DOF, but 
we rarely go there, so maybe stick with what is working now, and meanwhile 
seeking helps from literatures.



-Ling



From: Barry Smith 
Date: Thursday, March 28, 2024 at 2:26 PM
To: Zou, Ling 
Cc: Zhang, Hong , petsc-users@mcs.anl.gov 

Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

You may benefit from a literature search on your model AND preconditioners to 
see what others have used. But I would try PETSc/MUMPS on the biggest size you 
want and see how it goes (better it runs for a little longer and you don't 
waste months

ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender

This message came from outside your organization.



ZjQcmQRYFpfptBannerEnd



   You may benefit from a literature search on your model AND preconditioners 
to see what others have used. But I would try PETSc/MUMPS on the biggest size 
you want and see how it goes (better it runs for a little longer and you don't 
waste months trying to find a good preconditioner).









On Mar 28, 2024, at 2:20 PM, Zou, Ling  wrote:



Thank you, Barry.

Yes, I have tried different preconditioners, but in a naïve way, i.e., looping 
through possible options using `-pc_type ` command line.

But no, not in a meaningful way because the lack of understanding of the 
connection between physics (the problem we are dealing with) to math (the 
correct combination of those preconditioners).



-Ling



From: Barry Smith mailto:bsm...@petsc.dev>>
Date: Thursday, March 28, 2024 at 1:09 PM
To: Zou, Ling mailto:l...@anl.gov>>
Cc: Zhang, Hong mailto:hzh...@mcs.anl.gov>>, 
petsc-users@mcs.anl.gov 
mailto:petsc-users@mcs.anl.gov>>
Subject: Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

1 million is possible for direct solvers using PETSc with the MUMPS direct 
solver when you cannot get a preconditioner to work well for your problems. ILU 
are not very robust preconditioners and I would not rely on them. Have you 
investigated


Re: [petsc-users] ex19: Segmentation Violation when run with MUMPS on MacOS (arm64)

2024-03-29 Thread Satish Balay via petsc-users
Could you:

- reinstall brew after the xcode upgrade (not just update) 
https://urldefense.us/v3/__https://petsc.org/main/install/install/*installing-on-macos__;Iw!!G_uCfscf7eWS!fr-mLHdhIQgT2IBZhK9C2IQMUAmTmneTF38VsNLrywxooidf1uunovfx8qJrr8-Y73tICazCqyaZ6SJ6ca6JXnQ$
 
- not use --LDFLAGS=-Wl,-ld_classic

And see if the problem persists?

Satish

On Fri, 29 Mar 2024, zeyu xia wrote:

> Dear PETSc team:
> 
> Recently I installed firedrake on MacOS (arm64) with the latest
> Xcode, and there seems some error with mumps. I ran two times of the
> command `make check`. The first time it just output wrong results, and the
> second time it raised an error with Segmentation Violation. Please see the
> files “make check.txt” and “configure.log” in the attachment.
> 
> I will certainly be happy and grateful if you can take some time to
> deal with this problem. Thanks for your patience.
> 
> Best wishes,
> Zeyu Xia
>