OK, this was fixed by remembering to pip install -U --nodeps petsc first. --cjc On 24/06/14 15:46, Colin Cotter wrote:
Hi Folks, I've tried to update my petsc4py. I started by re-pip-installing petsc, and then ran "sudo python setup.py --install" in an updated petsc4py directory, and got the output which can be read at the bottom of this email, which was unexpected.
cheers --cjc
cjc1@ae-gauss:~/firedrake/petsc4py$ sudo python setup.py install running install running build running build_src running build_py running build_ext PETSC_DIR: /usr/local/lib/python2.7/dist-packages/petsc PETSC_ARCH: scalar-type: real precision: double language: CONLY compiler: /usr/bin/mpicc.openmpi linker: /usr/bin/mpicc.openmpi building 'PETSc' extension /usr/bin/mpicc.openmpi -pthread -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -O -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -DPETSC_DIR=/usr/local/lib/python2.7/dist-packages/petsc -I/usr/lib/openmpi/include/openmpi -I/usr/lib/openmpi/include -I/usr/local/lib/python2.7/dist-packages/petsc/include -Isrc/include -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c src/PETSc.c -o build/temp.linux-x86_64-2.7/src/PETSc.o In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0, from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4, from src/include/petsc4py/numpy.h:11, from src/petsc4py.PETSc.c:347, from src/PETSc.c:3: /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] In file included from src/PETSc.c:3:0: src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_5LGMap_8create’: src/petsc4py.PETSc.c:71088:3: warning: passing argument 3 of ‘ISLocalToGlobalMappingCreate’ makes pointer from integer without a cast [enabled by default] /usr/local/lib/python2.7/dist-packages/petsc/include/petscis.h:143:29: note: expected ‘const PetscInt *’ but argument is of type ‘PetscInt’ src/petsc4py.PETSc.c:71088:3: error: incompatible type for argument 4 of ‘ISLocalToGlobalMappingCreate’ /usr/local/lib/python2.7/dist-packages/petsc/include/petscis.h:143:29: note: expected ‘PetscCopyMode’ but argument is of type ‘PetscInt *’ src/petsc4py.PETSc.c:71088:3: error: incompatible type for argument 5 of ‘ISLocalToGlobalMappingCreate’ /usr/local/lib/python2.7/dist-packages/petsc/include/petscis.h:143:29: note: expected ‘struct _p_ISLocalToGlobalMapping **’ but argument is of type ‘PetscCopyMode’ src/petsc4py.PETSc.c:71088:3: error: too many arguments to function ‘ISLocalToGlobalMappingCreate’ /usr/local/lib/python2.7/dist-packages/petsc/include/petscis.h:143:29: note: declared here src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_5LGMap_14getBlockSize’: src/petsc4py.PETSc.c:71405:3: warning: implicit declaration of function ‘ISLocalToGlobalMappingGetBlockSize’ [-Wimplicit-function-declaration] src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_5LGMap_18getBlockIndices’: src/petsc4py.PETSc.c:71752:3: warning: implicit declaration of function ‘ISLocalToGlobalMappingGetBlockIndices’ [-Wimplicit-function-declaration] src/petsc4py.PETSc.c:71803:7: warning: implicit declaration of function ‘ISLocalToGlobalMappingRestoreBlockIndices’ [-Wimplicit-function-declaration] src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_5LGMap_22getBlockInfo’: src/petsc4py.PETSc.c:72204:3: warning: implicit declaration of function ‘ISLocalToGlobalMappingGetBlockInfo’ [-Wimplicit-function-declaration] src/petsc4py.PETSc.c:72259:7: warning: implicit declaration of function ‘ISLocalToGlobalMappingRestoreBlockInfo’ [-Wimplicit-function-declaration] src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_5LGMap_26applyBlock’: src/petsc4py.PETSc.c:72724:3: warning: implicit declaration of function ‘ISLocalToGlobalMappingApplyBlock’ [-Wimplicit-function-declaration] src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_5LGMap_32applyBlockInverse’: src/petsc4py.PETSc.c:73315:3: warning: implicit declaration of function ‘ISGlobalToLocalMappingApplyBlock’ [-Wimplicit-function-declaration] src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_4DMDA_62getScatter’: src/petsc4py.PETSc.c:186920:3: error: too few arguments to function ‘DMDAGetScatter’ /usr/local/lib/python2.7/dist-packages/petsc/include/petscdmda.h:71:29: note: declared here error: command '/usr/bin/mpicc.openmpi' failed with exit status 1