<div dir="ltr">Hi all,<br><br>Just installed the latest petsc-dev, and when I tried to build petsc4py via git clone ... and pip setup.py build i get the following errors:<br><br>====<br>
<p class=""><span class="">running build</span></p>
<p class=""><span class="">running build_src</span></p>
<p class=""><span class="">cythonizing 'petsc4py.PETSc.pyx' -> 'petsc4py.PETSc.c'</span></p>
<p class=""><span class="">cythonizing 'libpetsc4py/libpetsc4py.pyx' -> 'libpetsc4py/libpetsc4py.c'</span></p>
<p class=""><span class="">running build_py</span></p>
<p class=""><span class="">creating build</span></p>
<p class=""><span class="">creating build/lib.linux-x86_64-2.7</span></p>
<p class=""><span class="">creating build/lib.linux-x86_64-2.7/petsc4py</span></p>
<p class=""><span class="">copying src/PETSc.py -> build/lib.linux-x86_64-2.7/petsc4py</span></p>
<p class=""><span class="">copying src/__init__.py -> build/lib.linux-x86_64-2.7/petsc4py</span></p>
<p class=""><span class="">copying src/__main__.py -> build/lib.linux-x86_64-2.7/petsc4py</span></p>
<p class=""><span class="">creating build/lib.linux-x86_64-2.7/petsc4py/lib</span></p>
<p class=""><span class="">copying src/lib/__init__.py -> build/lib.linux-x86_64-2.7/petsc4py/lib</span></p>
<p class=""><span class="">creating build/lib.linux-x86_64-2.7/petsc4py/include</span></p>
<p class=""><span class="">creating build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py</span></p>
<p class=""><span class="">copying src/include/petsc4py/numpy.h -> build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py</span></p>
<p class=""><span class="">copying src/include/petsc4py/petsc4py.h -> build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py</span></p>
<p class=""><span class="">copying src/include/petsc4py/petsc4py.PETSc.h -> build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py</span></p>
<p class=""><span class="">copying src/include/petsc4py/petsc4py.PETSc_api.h -> build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py</span></p>
<p class=""><span class="">copying src/include/petsc4py/petsc4py.i -> build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py</span></p>
<p class=""><span class="">copying src/include/petsc4py/PETSc.pxd -> build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py</span></p>
<p class=""><span class="">copying src/include/petsc4py/__init__.pxd -> build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py</span></p>
<p class=""><span class="">copying src/include/petsc4py/__init__.pyx -> build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py</span></p>
<p class=""><span class="">copying src/lib/petsc.cfg -> build/lib.linux-x86_64-2.7/petsc4py/lib</span></p>
<p class=""><span class="">running build_ext</span></p>
<p class=""><span class="">PETSC_DIR: /home/jchang23/petsc-dev</span></p>
<p class=""><span class="">PETSC_ARCH: arch-linux2-c-opt</span></p>
<p class=""><span class="">version: 3.6.1 development</span></p>
<p class=""><span class="">scalar-type: real</span></p>
<p class=""><span class="">precision: double</span></p>
<p class=""><span class="">language: CONLY</span></p>
<p class=""><span class="">compiler: /share/apps/openmpi-1.8.3/bin/mpicc</span></p>
<p class=""><span class="">linker: /share/apps/openmpi-1.8.3/bin/mpicc</span></p>
<p class=""><span class="">building 'PETSc' extension</span></p>
<p class=""><span class="">creating build/temp.linux-x86_64-2.7</span></p>
<p class=""><span class="">creating build/temp.linux-x86_64-2.7/arch-linux2-c-opt</span></p>
<p class=""><span class="">creating build/temp.linux-x86_64-2.7/arch-linux2-c-opt/src</span></p>
<p class=""><span class="">/share/apps/openmpi-1.8.3/bin/mpicc -pthread -fPIC -O -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DPETSC_DIR=/home/jchang23/petsc-dev -I/share/apps/openmpi-1.8.3/include -I/home/jchang23/petsc-dev/arch-linux2-c-opt/include -I/home/jchang23/petsc-dev/include -Isrc/include -I/home/jchang23/.local/lib/python2.7/site-packages/numpy/core/include -I/home/jchang23/.local/include/python2.7 -c src/PETSc.c -o build/temp.linux-x86_64-2.7/arch-linux2-c-opt/src/PETSc.o</span></p>
<p class=""><span class="">In file included from /home/jchang23/.local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804:0,</span></p>
<p class=""><span class=""> from /home/jchang23/.local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,</span></p>
<p class=""><span class=""> from /home/jchang23/.local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,</span></p>
<p class=""><span class=""> from src/include/petsc4py/numpy.h:11,</span></p>
<p class=""><span class=""> from src/petsc4py.PETSc.c:258,</span></p>
<p class=""><span class=""> from src/PETSc.c:3:</span></p>
<p class=""><span class="">/home/jchang23/.local/lib/python2.7/site-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]</span></p>
<p class=""><span class=""> #warning "Using deprecated NumPy API, disable it by " \</span></p>
<p class=""><span class=""> ^</span></p>
<p class=""><span class="">In file included from src/PETSc.c:3:0:</span></p>
<p class=""><span class="">src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_7Section_76createGlobalSection’:</span></p>
<p class=""><span class="">src/petsc4py.PETSc.c:108243:47: error: incompatible type for argument 4 of ‘PetscSectionCreateGlobalSection’</span></p>
<p class=""><span class=""> __pyx_t_2 = __pyx_f_8petsc4py_5PETSc_CHKERR(PetscSectionCreateGlobalSection(__pyx_v_self->sec, __pyx_v_sf->sf, PETSC_FALSE, (&__pyx_v_gsec->sec))); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[32]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span></p>
<p class=""><span class=""> ^</span></p>
<p class=""><span class="">In file included from /home/jchang23/petsc-dev/include/petscvec.h:9:0,</span></p>
<p class=""><span class=""> from /home/jchang23/petsc-dev/include/petscmat.h:6,</span></p>
<p class=""><span class=""> from /home/jchang23/petsc-dev/include/petscdm.h:6,</span></p>
<p class=""><span class=""> from /home/jchang23/petsc-dev/include/petscdmda.h:4,</span></p>
<p class=""><span class=""> from /home/jchang23/petsc-dev/include/petsc.h:12,</span></p>
<p class=""><span class=""> from src/petsc4py.PETSc.c:254,</span></p>
<p class=""><span class=""> from src/PETSc.c:3:</span></p>
<p class=""><span class="">/home/jchang23/petsc-dev/include/petscis.h:334:29: note: expected ‘PetscBool’ but argument is of type ‘struct _p_PetscSection **’</span></p>
<p class=""><span class=""> PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSection(PetscSection, PetscSF, PetscBool, PetscBool, PetscSection *);</span></p>
<p class=""><span class=""> ^</span></p>
<p class=""><span class="">In file included from src/PETSc.c:3:0:</span></p>
<p class=""><span class="">src/petsc4py.PETSc.c:108243:47: error: too few arguments to function ‘PetscSectionCreateGlobalSection’</span></p>
<p class=""><span class=""> __pyx_t_2 = __pyx_f_8petsc4py_5PETSc_CHKERR(PetscSectionCreateGlobalSection(__pyx_v_self->sec, __pyx_v_sf->sf, PETSC_FALSE, (&__pyx_v_gsec->sec))); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[32]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span></p>
<p class=""><span class=""> ^</span></p>
<p class=""><span class="">In file included from /home/jchang23/petsc-dev/include/petscvec.h:9:0,</span></p>
<p class=""><span class=""> from /home/jchang23/petsc-dev/include/petscmat.h:6,</span></p>
<p class=""><span class=""> from /home/jchang23/petsc-dev/include/petscdm.h:6,</span></p>
<p class=""><span class=""> from /home/jchang23/petsc-dev/include/petscdmda.h:4,</span></p>
<p class=""><span class=""> from /home/jchang23/petsc-dev/include/petsc.h:12,</span></p>
<p class=""><span class=""> from src/petsc4py.PETSc.c:254,</span></p>
<p class=""><span class=""> from src/PETSc.c:3:</span></p>
<p class=""><span class="">/home/jchang23/petsc-dev/include/petscis.h:334:29: note: declared here</span></p>
<p class=""><span class=""> PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSection(PetscSection, PetscSF, PetscBool, PetscBool, PetscSection *);</span></p><p class=""><span class="">
</span></p><p class=""><span class="">error: command '/share/apps/openmpi-1.8.3/bin/mpicc' failed with exit status 1</span></p><p class=""><span class=""><br></span></p><p class=""><span class="">=========</span></p><p class="">I am guessing it's because PetscSectionCreateGlobalSection has changed in this latest released. Is there a way to fix this?<br><br>Thanks,</p><p class="">Justin</p>
</div>