This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Problem using CBC.block

+1 vote

Hello,
I tried to use CBC.Block and I already built PETSc with ML.

I got this message (example stokes.py) :

python stokes.py
ml
Traceback (most recent call last):
File "stokes.py", line 64, in
BB = block_mat([[ML(A), 0],
File "/Users/stephanepagano/Desktop/work/Fenics/install/lib/python2.7/site-packages/block/algebraic/petsc/precond.py", line 88, in init
precond.init(self, A, PETSc.PC.Type.ML, parameters, pdes, nullspace)
File "/Users/stephanepagano/Desktop/work/Fenics/install/lib/python2.7/site-packages/block/algebraic/petsc/precond.py", line 29, in init
self.petsc_prec.setType(prectype)
File "PETSc/PC.pyx", line 143, in petsc4py.PETSc.PC.setType (src/petsc4py.PETSc.c:134516)
petsc4py.PETSc.Error: error code 86
[0] PCSetType() line 71 in /opt/local/var/macports/build/_opt_mports_dports_math_petsc/petsc/work/v3.6.3/src/ksp/pc/interface/pcset.c
[0] Unknown type. Check for miss-spelling or missing package: http://www.mcs.anl.gov/petsc/documentation/installation.html#external
[0] Unable to find requested PC type ml

Thanks

asked Jul 12, 2016 by stephanepa FEniCS Novice (350 points)

2 Answers

0 votes
 
Best answer

This is the message generated when PETSc was built without Trilinos ML. Maybe you have multiple PETSc installations and linked dolfin to one without ML?

You can also check if ML is available in dolfin with

list_krylov_solver_preconditioners()

it should appear in the list as ml_amg.

answered Jul 13, 2016 by Magne Nordaas FEniCS Expert (13,820 points)
selected Jul 13, 2016 by stephanepa

Ok thanks for your answer.
I have installed Petsc using macport and it is not possible (or I dont find) to build with Trilinos ML.

0 votes

Ok thanks for your answer.
I have installed Petsc using macport and it is not possible (or I dont find) to build with Trilinos ML.

answered Jul 13, 2016 by stephanepa FEniCS Novice (350 points)
...