CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

Anyone has PETSc learning experience?

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   March 23, 2010, 16:14
Default Anyone has PETSc learning experience?
Join Date: Jul 2009
Location: Ohio
Posts: 35
Rep Power: 8
bearcat is on a distinguished road
Send a message via MSN to bearcat

does anyone have a successful experience learning PETSc? Though I know some MPI programmings, I found the PETSc learning very tough at the beginning. Overally, I think the package is not very well prepared for beginners. The user manual only covers a small fraction of basic usage. I read through it but still feel very difficult to understand the example codes. The accompanying documents provide little mathematical fundamentals and not much explanation/flow charts to the tutorial codes. Those ppt introductions make new-comers confused. And it's not practical to scrutinize every functions/utilities.

Thank you.
bearcat is offline   Reply With Quote

Old   March 24, 2010, 15:01
Join Date: Mar 2009
Posts: 40
Rep Power: 8
ganesh is on a distinguished road
Dear Bearcat,

Well, PetSc has a steep learning curve, as the users themselves mention. PetSc is definitely a very powerful and well built platform, but whether to use it extensively or not would depend on the particular application you intend to to use it for. For instance, for linear solvers with preconditioners, I found LiS ( as a better documented option with good F90 support (because F90 is what I like and use!), and easier to learn, although the calls are quite similar to those in PetSc. What LiS lacks are non-linear solvers (such as Newton-Krylov solvers) for which I turned to PetSc. Other possibilities for non-linear solvers in open source libraries that I haven't looked at but could be worthwhile is the SUNDIALS package among others. PetSc turns out to be a comprehensive library that goes beyond just a set of solvers (allows for objects that can help in parallel programming and multigrid) and that is why an increasing number of users are utilising it. However, my own limited experience tells me that using PetSc extensively with an unstructured framework could be all the more cumbersome (definitely possible), and I suggest that you employ the library only where it is extremely useful/needed (such as a Newton--Krylov solver that is difficult and time-consuming to write, but not for time stepping that can be relatively easily coded by the user). This way it allows a better learning of the underlying concepts (because you code most of the program) and leaves only a few portions to the PetSc library. This keeps the total effort that you need to put into PetSc relatively less and yet serves your purpose.

Hope this helps.


ganesh is offline   Reply With Quote

Old   March 25, 2010, 07:58
Jed Brown
Join Date: Mar 2009
Posts: 56
Rep Power: 10
jed is on a distinguished road
PETSc's philosophy is deeply about composition and extensibility. I understand that not everything important is covered in the user's manual, but there is a tradeoff between skipping topics and overwhelming new users with verbosity that may not relate to their problem. If you can suggest specific ways to improve the user's manual, we would love to hear them. Just explaining which aspects you find challenging or confusing is useful because it helps us to improve the documentation and tutorials/courses that some of use give.

You might also consider moving this discussion to the petsc-users mailing list where there is a larger community of users and you'll usually get very quick response from the developers.
jed is offline   Reply With Quote

Old   March 25, 2010, 21:33
Senior Member
Join Date: Mar 2009
Posts: 114
Rep Power: 8
quarkz is on a distinguished road
I don't think it's that bad. My recommendation is that you read about the basic stuffs on vectors/matrix. 2-3 simple examples and then focus on the type of questions you need to solve and using specific examples as templates. hope that helps. it's really a great software :-)
quarkz is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tired of employers focus on commercial code experience Steven P. Lounge 21 May 14, 2014 09:43
My experience Installing Elmer (Open Source Multi physics programme) on Linux Ahmed Main CFD Forum 3 August 10, 2010 13:42
petsc and diverge happy_clp Main CFD Forum 16 March 24, 2009 12:36
Learning Fortran for CFD Simon Main CFD Forum 6 October 15, 2003 10:00
machine learning algorithms Rajesh Sundaram hsejarm Main CFD Forum 3 January 7, 2003 04:59

All times are GMT -4. The time now is 07:39.