Hi Jed, You're right, I should experiment more with assembled matrices before choosing a solver/preconditioner. Could you be more specific about the command line options that I could test. I have a version of the code with assembled sparse matrices (default format). I tried running with the option -pc_type mg and got the following error:
[0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger [0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors [0]PETSC ERROR: likely location of problem given in stack below [0]PETSC ERROR: --------------------- Stack Frames ------------------------------------ [0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available, [0]PETSC ERROR: INSTEAD the line number of the start of the function [0]PETSC ERROR: is given. [0]PETSC ERROR: [0] PCSetFromOptions_MG line 318 src/ksp/pc/impls/mg/mg.c [0]PETSC ERROR: [0] PCSetFromOptions line 166 src/ksp/pc/interface/pcset.c [0]PETSC ERROR: [0] KSPSetFromOptions line 320 src/ksp/ksp/interface/itcl.c [0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Signal received! [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Petsc Release Version 3.1.0, Patch 4, Fri Jul 30 14:42:02 CDT 2010 [0]PETSC ERROR: See docs/changes/index.html for recent updates. [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. [0]PETSC ERROR: See docs/index.html for manual pages. [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: ./planestrain on a darwin10. named catalina.gps.caltech.edu by sbarbot Tue May 17 11:24:14 2011 [0]PETSC ERROR: Libraries linked from /Users/sbarbot/Documents/work/petsc/darwin10.4.0-c-debug/lib [0]PETSC ERROR: Configure run at Mon Aug 2 17:15:50 2010 [0]PETSC ERROR: Configure options --with-blas-lapack-dir=/opt/intel/Compiler/11.1/084/Frameworks/mkl/lib/em64t --with-mpi-dir=/shared/bin/ [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown file application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0 in the code, the matrix assembly for c%A is followed by: CALL KSPCreate(PETSC_COMM_WORLD,c%ksp,ierr) CALL KSPSetOperators(c%ksp,c%A,c%A,DIFFERENT_NONZERO_PATTERN,ierr) CALL KSPSetFromOptions(c%ksp,ierr) CALL KSPSetUp(c%ksp,ierr) Thanks for your suggestions, Sylvain 2011/5/12 Jed Brown <jed at 59a2.org>: > On Thu, May 12, 2011 at 08:12, Sylvain Barbot <sylbar.vainbot at gmail.com> > wrote: >> >> My primary concern now is computation speed, especially for >> 3-D problems, where i have of the order 512^3 degrees of freedom. I >> was planning to test Jacobi and SOR smoothers. Is there another >> smoother you recommend for this kind of problem? > > It's worth trying ILU as a smoother, especially if you are using a stretched > mesh. What discretization are you using? I still recommend just writing the > matrix assembly and experimenting (you can do everything on the command > line). Then, if the problem of interest responds well to SOR, you can easily > put in an option to use matrix-free. That is, you would have one code with a > runtime option of which levels to assemble versus handle matrix-free. The > fastest choice will almost certainly depend on the problem and on the > hardware that you are running it on, so it's well worth having both options > available.
