[petsc-dev] Is the petsc4py build broken?

Pierre Jolivet pierre.jolivet at lip6.fr
Sat Apr 15 23:34:03 CDT 2023


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?

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
>> 
>> 
> 



More information about the petsc-dev mailing list