Hi,
I am trying to initialize a LCL TAO solver with petsc4py:

from petsc4py import PETSc
solver = PETSc.TAO().create()
solver.setType(PETSc.TAO.Type.LCL)

The last line throws the following error:

Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "petsc4py/PETSc/TAO.pyx", line 183, in petsc4py.PETSc.TAO.setType
petsc4py.PETSc.Error: error code 86
[0] TaoSetType() at /petsc/src/tao/interface/taosolver.c:2164
[0] Unknown type. Check for miss-spelling or missing package: 
https://urldefense.us/v3/__https://petsc.org/release/install/install/*external-packages__;Iw!!G_uCfscf7eWS!bi3UN8Pwci-Vryovl2zHhUj6yCPxh-3xwyOp74MnoU6mnVpJN8twrV3OQEGKWOU6UtghBOlXVbBW_TAta4L0NMGih55H4vncwyyG$
 
[0] Unable to find requested Tao type lcl

However, hasattr(solver.Type(), 'LCL') returns True. The same happens with any 
other PETSc.TAO.Type. What am I missing here?

Cheers,
Elena

Reply via email to