Hi Barry, Thanks for your comments.
>> ? ? ? CALL MatShellSetOperation(c%sA(l+1),MATOP_MULT,matrixsmoothfv,ierr); > > ? ?You say this is a smoother but you register it as a MATOP_MULT? What is > the calling sequence of matrixsmoothfv() and what does it do? Smooth or > multiply? MATOP_MULT is for registering a multiple MATOP_SOR (or MATOP_RELAX > in older versions of PETSc) is for providing a smoother. My function matrixsmoothfv indeed performs the smoothing operation so it not a multiplication. I can see no documentation about MATOP_SOR, is there an example somewhere online? Assigning MATOP_SOR to my smoothing matrix now generates the following runtime error message: [0]PETSC ERROR: MatShellSetOperation_Fortran() line 107 in src/mat/impls/shell/ftn-custom/zshellf.c application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0 rank 0 in job 37 catalina.gps.caltech.edu_50093 caused collective abort of all ranks exit status of rank 0: return code 1 >> I also provide work space... >> Despite that, I have a crash upon running KSPSetup() with "[0]PETSC >> ERROR: PCSetUp_BJacobi()". > > It is trying to use bjacobi because that is the default solver, you need to > tell it to use some other solver explicitly if you do not want it to use > block Jacobi. So if you registered your matrixsmoothfv() as a MATOP_SOR then > you can use -mg_levels_pc_type sor to have it use that smoother. ?What solver > options are you running with? I setup the solver with: CALL PCMGSetType(c%pc,PC_MG_MULTIPLICATIVE,ierr); but this error might not be representative of the problem. upstream, my smoothing matrices were not set up properly. >> MatGetVecs() line 7265 in src/mat/interface/matrix.c >> [0]PETSC ERROR: KSPGetVecs() line 806 in src/ksp/ksp/interface/iterativ.c >> [0]PETSC ERROR: KSPSetUp_GMRES() line 94 in src/ksp/ksp/impls/gmres/gmres.c >> [0]PETSC ERROR: KSPSetUp() line >> > ? ? This is not an indication that it is trying to use a direct solver, this > is an indication then you never provided ANY kind of matrix at this level. > You need to provide a matrix operator on each level for it to get work > vectors from etc. It would be help to have the COMPLETE error message here so > I can see exactly what is happening instead of a fragment making me guess > what the problem is.
