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

Help with cdc.block installation

0 votes

Hi, I have a simple problem. I dowloaded and installed cdc.block and when I run demo navierstokes.py I get the following error

File "navierstokes.py", line 71, in <module>
Dp = ML(collapse(C*InvDiag(A)*B))
  File "/usr/local/lib/python2.7/dist-packages/block/algebraic/petsc/precond.py", line 86, in __init__
    precond.__init__(self, A, PETSc.PC.Type.ML, options, pdes, nullspace)
  File "/usr/local/lib/python2.7/dist-packages/block/algebraic/petsc/precond.py", line 29, in __init__
    self.petsc_prec.setType(prectype)
  File "PC.pyx", line 118, in petsc4py.PETSc.PC.setType (src/petsc4py.PETSc.c:104755)
petsc4py.PETSc.Error: error code 86
[0] PCSetType() line 71 in src/ksp/pc/interface/pcset.c
[0] Unknown type. Check for miss-spelling or missing external package needed for type:
see http://www.mcs.anl.gov/petsc/documentation/installation.html#external
[0] Unable to find requested PC type ml

Unfortunately I'm kind of stupid when it comes to linux and command line and the guide that is in the recommended link is too much complicated for me.

Can you please tell me how to add the correct package to PETSc?
Sorry for such a dumb question but you would save me a lot of time and pain if you can help me.

asked Aug 20, 2015 by Ianx86 FEniCS User (1,050 points)

1 Answer

0 votes

cbc.block requires PETSc built with ML. If you installed PETSc from source, you should reconfigure with --download-ml to add ML.

answered Aug 21, 2015 by johannr FEniCS Expert (17,350 points)

Hi, all I did was that I installed fenics following this simple guide.
Btw, when I change ML to AMG, it works fine. So, I guess I'm will be ok with that for now.

Ok, the PETSc packages in Ubuntu does not have ML.

...