<div dir="ltr">Alright got it, thanks!</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 22, 2015 at 7:44 PM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You can apply the patch with the 'patch' command<br>
<br>
cd petsc4py<br>
patch -Np1 < petsc4py.patch<br>
<span class="im HOEnZb"><br>
Satish<br>
<br>
On Wed, 22 Jul 2015, Justin Chang wrote:<br>
<br>
</span><span class="im HOEnZb">> How do I use this again?<br>
><br>
</span><div class="HOEnZb"><div class="h5">> On Wednesday, July 22, 2015, Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br>
><br>
> > The attached patch to petsc4py should fix the error.<br>
> ><br>
> > Satish<br>
> ><br>
> > On Wed, 22 Jul 2015, Justin Chang wrote:<br>
> ><br>
> > > Hi all,<br>
> > ><br>
> > > Just installed the latest petsc-dev, and when I tried to build petsc4py<br>
> > via<br>
> > > git clone ... and pip setup.py build  i get the following errors:<br>
> > ><br>
> > > ====<br>
> > ><br>
> > > running build<br>
> > ><br>
> > > running build_src<br>
> > ><br>
> > > cythonizing 'petsc4py.PETSc.pyx' -> 'petsc4py.PETSc.c'<br>
> > ><br>
> > > cythonizing 'libpetsc4py/libpetsc4py.pyx' -> 'libpetsc4py/libpetsc4py.c'<br>
> > ><br>
> > > running build_py<br>
> > ><br>
> > > creating build<br>
> > ><br>
> > > creating build/lib.linux-x86_64-2.7<br>
> > ><br>
> > > creating build/lib.linux-x86_64-2.7/petsc4py<br>
> > ><br>
> > > copying src/PETSc.py -> build/lib.linux-x86_64-2.7/petsc4py<br>
> > ><br>
> > > copying src/__init__.py -> build/lib.linux-x86_64-2.7/petsc4py<br>
> > ><br>
> > > copying src/__main__.py -> build/lib.linux-x86_64-2.7/petsc4py<br>
> > ><br>
> > > creating build/lib.linux-x86_64-2.7/petsc4py/lib<br>
> > ><br>
> > > copying src/lib/__init__.py -> build/lib.linux-x86_64-2.7/petsc4py/lib<br>
> > ><br>
> > > creating build/lib.linux-x86_64-2.7/petsc4py/include<br>
> > ><br>
> > > creating build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py<br>
> > ><br>
> > > copying src/include/petsc4py/numpy.h -><br>
> > > build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py<br>
> > ><br>
> > > copying src/include/petsc4py/petsc4py.h -><br>
> > > build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py<br>
> > ><br>
> > > copying src/include/petsc4py/petsc4py.PETSc.h -><br>
> > > build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py<br>
> > ><br>
> > > copying src/include/petsc4py/petsc4py.PETSc_api.h -><br>
> > > build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py<br>
> > ><br>
> > > copying src/include/petsc4py/petsc4py.i -><br>
> > > build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py<br>
> > ><br>
> > > copying src/include/petsc4py/PETSc.pxd -><br>
> > > build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py<br>
> > ><br>
> > > copying src/include/petsc4py/__init__.pxd -><br>
> > > build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py<br>
> > ><br>
> > > copying src/include/petsc4py/__init__.pyx -><br>
> > > build/lib.linux-x86_64-2.7/petsc4py/include/petsc4py<br>
> > ><br>
> > > copying src/lib/petsc.cfg -> build/lib.linux-x86_64-2.7/petsc4py/lib<br>
> > ><br>
> > > running build_ext<br>
> > ><br>
> > > PETSC_DIR:   /home/jchang23/petsc-dev<br>
> > ><br>
> > > PETSC_ARCH:  arch-linux2-c-opt<br>
> > ><br>
> > > version:     3.6.1 development<br>
> > ><br>
> > > scalar-type: real<br>
> > ><br>
> > > precision:   double<br>
> > ><br>
> > > language:    CONLY<br>
> > ><br>
> > > compiler:    /share/apps/openmpi-1.8.3/bin/mpicc<br>
> > ><br>
> > > linker:      /share/apps/openmpi-1.8.3/bin/mpicc<br>
> > ><br>
> > > building 'PETSc' extension<br>
> > ><br>
> > > creating build/temp.linux-x86_64-2.7<br>
> > ><br>
> > > creating build/temp.linux-x86_64-2.7/arch-linux2-c-opt<br>
> > ><br>
> > > creating build/temp.linux-x86_64-2.7/arch-linux2-c-opt/src<br>
> > ><br>
> > > /share/apps/openmpi-1.8.3/bin/mpicc -pthread -fPIC -O -fPIC<br>
> > > -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall<br>
> > > -DPETSC_DIR=/home/jchang23/petsc-dev -I/share/apps/openmpi-1.8.3/include<br>
> > > -I/home/jchang23/petsc-dev/arch-linux2-c-opt/include<br>
> > > -I/home/jchang23/petsc-dev/include -Isrc/include<br>
> > > -I/home/jchang23/.local/lib/python2.7/site-packages/numpy/core/include<br>
> > > -I/home/jchang23/.local/include/python2.7 -c src/PETSc.c -o<br>
> > > build/temp.linux-x86_64-2.7/arch-linux2-c-opt/src/PETSc.o<br>
> > ><br>
> > > In file included from<br>
> > ><br>
> > /home/jchang23/.local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804:0,<br>
> > ><br>
> > >                  from<br>
> > ><br>
> > /home/jchang23/.local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,<br>
> > ><br>
> > >                  from<br>
> > ><br>
> > /home/jchang23/.local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,<br>
> > ><br>
> > >                  from src/include/petsc4py/numpy.h:11,<br>
> > ><br>
> > >                  from src/petsc4py.PETSc.c:258,<br>
> > ><br>
> > >                  from src/PETSc.c:3:<br>
> > ><br>
> > ><br>
> > /home/jchang23/.local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2:<br>
> > > warning: #warning "Using deprecated NumPy API, disable it by " "#defining<br>
> > > NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]<br>
> > ><br>
> > >  #warning "Using deprecated NumPy API, disable it by " \<br>
> > ><br>
> > >   ^<br>
> > ><br>
> > > In file included from src/PETSc.c:3:0:<br>
> > ><br>
> > > src/petsc4py.PETSc.c: In function<br>
> > > ‘__pyx_pf_8petsc4py_5PETSc_7Section_76createGlobalSection’:<br>
> > ><br>
> > > src/petsc4py.PETSc.c:108243:47: error: incompatible type for argument 4<br>
> > of<br>
> > > ‘PetscSectionCreateGlobalSection’<br>
> > ><br>
> > >    __pyx_t_2 =<br>
> > ><br>
> > __pyx_f_8petsc4py_5PETSc_CHKERR(PetscSectionCreateGlobalSection(__pyx_v_self->sec,<br>
> > > __pyx_v_sf->sf, PETSC_FALSE, (&__pyx_v_gsec->sec))); if<br>
> > (unlikely(__pyx_t_2<br>
> > > == -1)) {__pyx_filename = __pyx_f[32]; __pyx_lineno = 213; __pyx_clineno<br>
> > =<br>
> > > __LINE__; goto __pyx_L1_error;}<br>
> > ><br>
> > >                                                ^<br>
> > ><br>
> > > In file included from /home/jchang23/petsc-dev/include/petscvec.h:9:0,<br>
> > ><br>
> > >                  from /home/jchang23/petsc-dev/include/petscmat.h:6,<br>
> > ><br>
> > >                  from /home/jchang23/petsc-dev/include/petscdm.h:6,<br>
> > ><br>
> > >                  from /home/jchang23/petsc-dev/include/petscdmda.h:4,<br>
> > ><br>
> > >                  from /home/jchang23/petsc-dev/include/petsc.h:12,<br>
> > ><br>
> > >                  from src/petsc4py.PETSc.c:254,<br>
> > ><br>
> > >                  from src/PETSc.c:3:<br>
> > ><br>
> > > /home/jchang23/petsc-dev/include/petscis.h:334:29: note: expected<br>
> > > ‘PetscBool’ but argument is of type ‘struct _p_PetscSection **’<br>
> > ><br>
> > >  PETSC_EXTERN PetscErrorCode<br>
> > PetscSectionCreateGlobalSection(PetscSection,<br>
> > > PetscSF, PetscBool, PetscBool, PetscSection *);<br>
> > ><br>
> > >                              ^<br>
> > ><br>
> > > In file included from src/PETSc.c:3:0:<br>
> > ><br>
> > > src/petsc4py.PETSc.c:108243:47: error: too few arguments to function<br>
> > > ‘PetscSectionCreateGlobalSection’<br>
> > ><br>
> > >    __pyx_t_2 =<br>
> > ><br>
> > __pyx_f_8petsc4py_5PETSc_CHKERR(PetscSectionCreateGlobalSection(__pyx_v_self->sec,<br>
> > > __pyx_v_sf->sf, PETSC_FALSE, (&__pyx_v_gsec->sec))); if<br>
> > (unlikely(__pyx_t_2<br>
> > > == -1)) {__pyx_filename = __pyx_f[32]; __pyx_lineno = 213; __pyx_clineno<br>
> > =<br>
> > > __LINE__; goto __pyx_L1_error;}<br>
> > ><br>
> > >                                                ^<br>
> > ><br>
> > > In file included from /home/jchang23/petsc-dev/include/petscvec.h:9:0,<br>
> > ><br>
> > >                  from /home/jchang23/petsc-dev/include/petscmat.h:6,<br>
> > ><br>
> > >                  from /home/jchang23/petsc-dev/include/petscdm.h:6,<br>
> > ><br>
> > >                  from /home/jchang23/petsc-dev/include/petscdmda.h:4,<br>
> > ><br>
> > >                  from /home/jchang23/petsc-dev/include/petsc.h:12,<br>
> > ><br>
> > >                  from src/petsc4py.PETSc.c:254,<br>
> > ><br>
> > >                  from src/PETSc.c:3:<br>
> > ><br>
> > > /home/jchang23/petsc-dev/include/petscis.h:334:29: note: declared here<br>
> > ><br>
> > >  PETSC_EXTERN PetscErrorCode<br>
> > PetscSectionCreateGlobalSection(PetscSection,<br>
> > > PetscSF, PetscBool, PetscBool, PetscSection *);<br>
> > ><br>
> > > error: command '/share/apps/openmpi-1.8.3/bin/mpicc' failed with exit<br>
> > > status 1<br>
> > ><br>
> > ><br>
> > > =========<br>
> > ><br>
> > > I am guessing it's because PetscSectionCreateGlobalSection has changed in<br>
> > > this latest released. Is there a way to fix this?<br>
> > ><br>
> > > Thanks,<br>
> > ><br>
> > > Justin<br>
> > ><br>
> ><br>
><br>
</div></div></blockquote></div><br></div>