[petsc-users] solving saddle point problem in distributed memory

Bin Liu lbllm2018 at hotmail.com
Tue Jul 28 20:56:42 CDT 2020


Sure. Thank you very much for your suggestions on  setup. I also believe there are some problems in my setup. I will definitely give a try



From: Matthew Knepley [mailto:knepley at gmail.com]
Sent: Wednesday, 29 July 2020 9:36 AM
To: Bin Liu <lbllm2018 at hotmail.com>
Cc: Stefano Zampini <stefano.zampini at gmail.com>; petsc-users at mcs.anl.gov
Subject: Re: [petsc-users] solving saddle point problem in distributed memory

On Tue, Jul 28, 2020 at 9:00 PM Bin Liu <lbllm2018 at hotmail.com<mailto:lbllm2018 at hotmail.com>> wrote:
Thanks for your tutorials. Yes. I tried PCFIELDSPLIT. However, it only works for sequential runs. When I run the code in distributed memory, it reports errors.

This would mean that your setup is incorrect. We run FIELDSPLIT all the time in parallel, and it has been used on
some of the largest run ever made on supercomputers.

Second, the way to directly solve a saddle-point problem is to directly solve the (0,0) block and the Schur complement. This is not hard:

  -pc_type fieldsplit
  -pc_fieldsplit_detect_saddlepoint
  -pc_fieldsplit_type schur
  -pc_fieldsplit_schur_fact_type full
  -pc_fieldsplit_schur_precondition full
  -fieldsplit_0_pc_type lu
  -fieldsplit_0_pc_factor_mat_solver_type superlu_dist
  -fieldsplit_1_pc_type lu
  -fieldsplit_1_pc_factor_mat_solver_type superlu_dist

  Thanks,

     Matt

In fact, the essence of my wonder is (a) how to set up superlu_dist in petsc for solving saddle point problem in distributed memory? (b) does the direct solvers in petsc can run in distributed memory for solving saddle point problem?

From: Stefano Zampini [mailto:stefano.zampini at gmail.com<mailto:stefano.zampini at gmail.com>]
Sent: Tuesday, 28 July 2020 6:55 PM
To: Bin Liu <lbllm2018 at hotmail.com<mailto:lbllm2018 at hotmail.com>>
Cc: petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] solving saddle point problem in distributed memory

If you want advice you should post the error trace PETSc reports.

Anyway, solving Stokes is not so trivial (without direct solvers, you may need mesh dependent information), but we have examples for it

https://gitlab.com/petsc/petsc/-/blob/master/src/ksp/ksp/tutorials/ex42.c
https://gitlab.com/petsc/petsc/-/blob/master/src/ksp/ksp/tutorials/ex43.c
https://gitlab.com/petsc/petsc/-/blob/master/src/snes/tutorials/ex69.c

If you scroll to the end of those files, you see a bunch of possible options either using PCFIELDSPLIT,  PCBDDC or KSPFETIDP.


On Jul 28, 2020, at 12:37 PM, Bin Liu <lbllm2018 at hotmail.com<mailto:lbllm2018 at hotmail.com>> wrote:

I would like to solve a saddle point problem arising from the stokes equation. I got successful to use the direct solvers in sequential runs. However, I would like to extend it for distributed memory computation. I tried to use superlu_dist, but the program returns errors. Is it possible to solve a saddle point problem in distributed memory using superlu_dist? Could anyone give a simple sample code to set up the parameters of the solver?

Thanks



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/<http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200729/65dbc974/attachment-0001.html>


More information about the petsc-users mailing list