Package Details: petsc4py 3.14-1

Git Clone URL: (read-only, click to copy)
Package Base: petsc4py
Description: Python bindings for PETSc
Upstream URL:
Licenses: custom
Submitter: sigvald
Maintainer: sigvald (shivupa)
Last Packager: shivupa
Votes: 5
Popularity: 0.004414
First Submitted: 2018-06-22 16:48
Last Updated: 2020-10-06 17:26

Latest Comments

haawda commented on 2020-12-28 22:24

Happens also under Debian:

and upstream is aware of it:

Edit: Maybe this package should go away entirely, as upstream ships petsc4py now within the petsc repo.

urbainvaes commented on 2020-12-27 14:03

This fails with the following error on my machine:

creating build/temp.linux-x86_64-3.9/src
/usr/bin/mpicc -pthread -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -O3 -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -I/opt/petsc/linux-c-opt/include -Isrc/include -I/usr/lib/python3.9/site-packages/numpy/core/include -I/usr/include/python3.9 -c src/PETSc.c -o build/temp.linux-x86_64-3.9/src/PETSc.o
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c: In function ‘__pyx_pymod_exec_PETSc’:
src/petsc4py.PETSc.c:330657:43: error: ‘MATDAAD’ undeclared (first use in this function)
330657 |   __pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(MATDAAD); if (unlikely(!__pyx_t_7)) __PYX_ERR(38, 49, __pyx_L1_error)
       |                                           ^~~~~~~
src/petsc4py.PETSc.c:330657:43: note: each undeclared identifier is reported only once for each function it appears in
error: command '/usr/bin/mpicc' failed with exit code 1
==> ERROR: A failure occurred in build().
error making: petsc4py

Any idea how to fix this?

sigvald commented on 2019-05-13 07:15

@haawda: I added you as co-maintainer. Please feel free to upload your PKGBUILD.

haawda commented on 2019-05-12 17:19

# Maintainer: Sigvald Marholm <>

pkgdesc="Python bindings for PETSc"
arch=('i686' 'x86_64')
depends=(petsc openmpi python-numpy)


build() {

        export PETSC_DIR=${_petsc_dir}
        export PETSC_ARCH=${_petsc_arch}

        cd ${srcdir}/${pkgname}-${pkgver}

        python build


package() {

        export PETSC_DIR=${_petsc_dir}
        export PETSC_ARCH=${_petsc_arch}

        cd ${srcdir}/${pkgname}-${pkgver}

        python install --root="${pkgdir}"


# vim: shiftwidth=2 softtabstop=2 tabstop=2 noexpandtab

sigvald commented on 2018-09-20 15:30

This was flagged out-of-date because there's a new version of petsc4py (3.10). It may not be much work to bump the version to 3.10 in the PKGBUILD, but I do not have time to do so myself at the moment. Contributions or co-maintainers welcome.