[petsc-users] PCDiagonalScale

Klaij, Christiaan C.Klaij at marin.nl
Wed Feb 23 09:45:39 CST 2011


I'm trying to understand the use of PCDiagonalScale since I want to apply additional diagonal scaling when solving my linear system.

As a first step I modified src/ksp/ksp/examples/tutorials/ex2f.F in petsc-3.1-p7 as follows:

1) at line 87 added 3 lines:
      PC          pc
      PCType      ptype
      PetscScalar tol

2) then I uncommented lines 247 -- 252 (the ones to use PCJACOBI)

3) at line 253 I added :
      call PCDiagonalScale(pc,PETSC_TRUE,ierr)

Running "make ex2f" gives:

ex2f.o: In function `MAIN__':
ex2f.F:(.text+0x767): undefined reference to `pcdiagonalscale_'

Without the call to PCDiagonalScale "make ex2f" does not give any errors and runs fine...


dr. ir. Christiaan Klaij
CFD Researcher
Research & Development
E mailto:C.Klaij at marin.nl
T +31 317 49 33 44

MARIN
2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands
T +31 317 49 39 11, F +31 317 49 32 45, I www.marin.nl



More information about the petsc-users mailing list