Python Tutorial in PETSc Repository not working

Issue #44 resolved
Former user created an issue

I want to use petsc4py with a matrix free representation of the linear operator. I've found some resources online:

In the petsc repository a found a tutorial ( petsc/tutorials/python/ex1.py ) which is doing something similar, but I could not get this running with the recent petsc4py.

Here are the steps to reproduce the problem: - installed development version to python3.4 environment according to instructions on pypi:

$ pip install Cython numpy mpi4py
$ pip install --no-deps git+https://bitbucket.org/petsc/petsc
$ pip install --no-deps git+https://bitbucket.org/petsc/petsc4py

Downloaded the tutorial and tried to run ex1.py

  • first problem: ksp.setOperators(A,A,True) ( too many arguments ), I changed that to ksp.setOperators(A)
  • run again, then it segfaults inside solve()

Is this a bug, or have I missed something in the setup?

Thanks for your help!

Comments (3)

  1. Log in to comment