[petsc-dev] Is the petsc4py build broken?

Matthew Knepley knepley at gmail.com
Sun Apr 16 12:07:29 CDT 2023


On Sun, Apr 16, 2023 at 12:34 AM Pierre Jolivet <pierre.jolivet at lip6.fr>
wrote:

> petsc4py build is not broken, but maybe it is not future-proof and can’t
> handle Cython 3.0.0b2 (or there is a regression in Cython).
> Could you downgrade your Cython (to an actual release and not a beta) and
> see if the error persists?
>

You are correct. However, I think this is a bug in the petsc4py install
now. I had deleted my Cython, and it was fetched automatically.
I think we need to change

  src/binding/petsc4py/conf/confpetsc.py:133

I just changed '>=' to '==', but maybe we just put a '< 3' since it is
incompatible with the 3.0.0.b2 which setuptools
is automatically bringing down.

  Thanks,

    Matt


> Thanks,
> Pierre
>
> > On 16 Apr 2023, at 12:25 AM, Satish Balay via petsc-dev <
> petsc-dev at mcs.anl.gov> wrote:
> >
> > Works for me with latest main - so I'm not sure whats going on here..
> >
> > Is this reproducible in a clean clone? Also - are you using mpi4py in
> this build?
> > https://gitlab.com/petsc/petsc/-/issues/1359
> > [this issue looks different though..]
> >
> > Satish
> >
> > ------
> >
> > *** Building petsc4py ***
> > running build
> > running build_src
> > using Cython 0.29.33
> > cythonizing 'petsc4py/PETSc.pyx' -> 'petsc4py/PETSc.c'
> > running build_py
> > creating build
> > creating build/lib.linux-x86_64-cpython-311
> > creating build/lib.linux-x86_64-cpython-311/petsc4py
> > copying src/petsc4py/PETSc.py ->
> build/lib.linux-x86_64-cpython-311/petsc4py
> > copying src/petsc4py/__main__.py ->
> build/lib.linux-x86_64-cpython-311/petsc4py
> > copying src/petsc4py/__init__.py ->
> build/lib.linux-x86_64-cpython-311/petsc4py
> > creating build/lib.linux-x86_64-cpython-311/petsc4py/lib
> > ....
> >
> >
> > On Sat, 15 Apr 2023, Matthew Knepley wrote:
> >
> >> I get
> >>
> >> *** Building petsc4py ***
> >> running build
> >> running build_src
> >> removing Cython 0.29.30 from sys.modules
> >> fetching build requirement 'Cython >= 0.29.32'
> >> Searching for Cython>=0.29.32
> >> Best match: Cython 3.0.0b2
> >> Processing Cython-3.0.0b2-py3.8-macosx-10.9-x86_64.egg
> >>
> >> Using
> >>
> /PETSc3/petsc/petsc-dev/src/binding/petsc4py/.eggs/Cython-3.0.0b2-py3.8-macosx-10.9-x86_64.egg
> >>
> >> using Cython 3.0.0b2
> >> cythonizing 'petsc4py/PETSc.pyx' -> 'petsc4py/PETSc.c'
> >> /PETSc3/petsc/petsc-dev/src/binding/petsc4py/conf/cythonize.py: No such
> >> file or directory: 'petsc4py/PETSc.pyx'
> >> error: Cython failure: 'petsc4py/PETSc.pyx' -> 'petsc4py/PETSc.c'
> >> **************************ERROR*************************************
> >> Error building petsc4py.
> >>
> >>  Thanks,
> >>
> >>     Matt
> >>
> >>
> >
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20230416/26dd3f55/attachment.html>


More information about the petsc-dev mailing list