On Wed, May 6, 2020 at 2:11 PM Andrew Hicks <ahick17@lsu.edu> wrote:
Hi Matt,
Actually, the “hypre” pc-type worked just fine, it took far less time than originally, but still a bit slow.
What are you comparing against for slow? Until maybe 50-100K unknowns, direct solvers can be faster, especially for sparser matrices, like 2D low order. Above that MG tends to win, but you should check that the number of iterates is < 10-20. If not, then you need to think about tuning AMG. Thanks, Matt
I tried the “gamg” pc-type but got the following error from which I’ve cut out the middle part:
petsc4py.PETSc.Error: error code 83
…
[0] Require AIJ matrix type
I’m working with three spatial dimensions but the vector I’m using is 5D, so it’s the PDE consists of solving for a function from R^3 into R^5. Is that why this won’t work?
Andrew
*From:* Matthew Knepley <knepley@gmail.com> *Sent:* Wednesday, May 6, 2020 11:04 AM *To:* Lawrence Mitchell <wence@gmx.li> *Cc:* Andrew Hicks <ahick17@lsu.edu>; firedrake@imperial.ac.uk *Subject:* Re: [firedrake] 3D Elliptic Solvers
On Wed, May 6, 2020 at 11:42 AM Lawrence Mitchell <wence@gmx.li> wrote:
Hi Andrew,
On 6 May 2020, at 16:39, Andrew Hicks <ahick17@lsu.edu> wrote:
Hello all,
I have a simple question. I’m trying to solve an elliptic PDE in 3D, but the regular solver in firedrake is just too slow. What is the best 3D solver in firedrake for this? Perhaps there is an algebraic multigrid solver or something along those lines? Any suggestions would be highly appreciated!
There are a number of multigrid options available (via PETSc).
Try with "pc_type": "hypre" in your solver_parameters dictionary for the solver.
It may need some tuning for best performance for 3D problems, but if you have not been setting any parameters at all up to now, it should be much better.
Hypre is the best for 2D. In 3D, agglomeration multigrid becomes competitive, -pc_type gamg.
Thanks,
Matt
Cheers,
Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.ic.ac.uk%2Fmailman%2Flistinfo%2Ffiredrake&data=02%7C01%7Cahick17%40lsu.edu%7C03f15c9f2a454167887a08d7f1d72479%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637243778648593309&sdata=TzS8qDlKbrMzLO1ElpmVwCvtqKwv3vA5VHWyFMuF3lY%3D&reserved=0>
--
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/ <https://nam04.safelinks.protection.outlook.com/?url=http:%2F%2Fwww.cse.buffalo.edu%2F~knepley%2F&data=02%7C01%7Cahick17%40lsu.edu%7C03f15c9f2a454167887a08d7f1d72479%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637243778648603308&sdata=4zz78GjQ9tav4ON8QfylSwMjUKWTyO3dTpIeJ82hrEo%3D&reserved=0>
-- 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/>