Error using BoomerAMG with eqns

Ben Tay zonexo at gmail.com
Mon Jun 9 21:46:50 CDT 2008


Hi,

I tried to use BoomerAMG as the preconditioner. When I use ./a.out 
-pc_type hypre -pc_hypre_type boomeramg, I got

KSP Object:
  type: richardson
    Richardson: damping factor=1
  maximum iterations=10000, initial guess is zero
  tolerances:  relative=1e-05, absolute=1e-50, divergence=10000
  left preconditioning
PC Object:
  type: hypre
    HYPRE BoomerAMG preconditioning
    HYPRE BoomerAMG: Cycle type V
    HYPRE BoomerAMG: Maximum number of levels 25
    HYPRE BoomerAMG: Maximum number of iterations PER hypre call 1
    HYPRE BoomerAMG: Convergence tolerance PER hypre call 0
    HYPRE BoomerAMG: Threshold for strong coupling 0.25
    HYPRE BoomerAMG: Interpolation truncation factor 0
    HYPRE BoomerAMG: Interpolation: max elements per row 0
    HYPRE BoomerAMG: Number of levels of aggressive coarsening 0
    HYPRE BoomerAMG: Number of paths for aggressive coarsening 1

However, when I add the BoomerAMG into my code, I got

[3]PETSC ERROR: 
------------------------------------------------------------------------
[3]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, 
probably memory access out of range
[3]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[3]PETSC ERROR: or see 
http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[3]PETSC 
ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple to 
find memory corruption errors
[3]PETSC ERROR: configure using --with-debugging=yes, recompile, link, 
and run
[3]PETSC ERROR: to get more information on the crash.
[3]PETSC ERROR: --------------------- Error Message 
------------------------------------
[3]PETSC ERROR: Signal received!
[3]PETSC ERROR: 
------------------------------------------------------------------------
[3]PETSC ERROR: Petsc Release Version 2.3.3, Patch 8, Fri Nov 16 
17:03:40 CST 2007 HG revision: 414581156e67e55c761739b0deb119f7590d0f4b
[3]PETSC ERROR: See docs/changes/index.html for recent updates.
[3]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[3]PETSC ERROR: See docs/index.html for manual pages.
[3]PETSC ERROR: 
------------------------------------------------------------------------
[3]PETSC ERROR: ./a.out on a atlas3-mp named atlas3-c36 by g0306332 Tue 
Jun 10 10:36:34 2008
[3]PETSC ERROR: Libraries linked from 
/nfs/home/enduser/g0306332/petsc-2.3.3-p8/lib/atlas3-mpi
[3]PETSC ERROR: Configure run at Tue Jan  8 22:22:08 2008


Here's part of my code:

call MatAssemblyBegin(A_mat_uv,MAT_FINAL_ASSEMBLY,ierr)
call MatAssemblyEnd(A_mat_uv,MAT_FINAL_ASSEMBLY,ierr)

call VecAssemblyBegin(b_rhs_uv,ierr)
call VecAssemblyEnd(b_rhs_uv,ierr)

call VecAssemblyBegin(xx_uv,ierr)
call VecAssemblyEnd(xx_uv,ierr)

call KSPSetOperators(ksp_uv,A_mat_uv,A_mat_uv,SAME_NONZERO_PATTERN,ierr)

call KSPGetPC(ksp_uv,pc_uv,ierr)

ksptype=KSPRICHARDSON

call KSPSetType(ksp_uv,ksptype,ierr)

call PCSetType(pc,'hypre',ierr)

call PCHYPRESetType(pc,'boomeramg',ierr)

call KSPSetFromOptions(ksp_uv,ierr)

tol=1.e-5

call 
KSPSetTolerances(ksp_uv,tol,PETSC_DEFAULT_DOUBLE_PRECISION,PETSC_DEFAULT_DOUBLE_PRECISION,PETSC_DEFAULT_INTEGER,ierr)

call KSPSolve(ksp_uv,b_rhs_uv,xx_uv,ierr)

call KSPGetConvergedReason(ksp_uv,reason,ierr)


The matrix changes every timestep so I have to call the preconditioner 
every time. So what did I do wrong? Btw, the matrix is A_mat_uv, RHS is 
b_rhs_uv and the answer is xx_uv.

Thank you very much.

Regards.




More information about the petsc-users mailing list