Hi again,<div><br></div><div>I am getting another error related to petsc4py. It happens when I updated to the latest version:</div><div><br></div><div><div class="Ki"><div class="Li" style="height:80px"><div class="Xh" style="height:80px"><div class="gi ji Wh" dir="ltr"><font color="#000000" size="2"><span style="background-color:rgba(255,255,255,0)">Traceback (most recent call last):<br></span></font><div style="clear:both"></div></div></div></div></div><div style="clear:both"></div><div class="Ki"><div class="Li" style="height:3036px"><div class="Xh" style="height:3036px"><div class="gi hi Wh" dir="ltr"><font size="2"><span style="background-color:rgba(255,255,255,0)"> File "/usr/local/bin/py.test", line 11, in <module><br> sys.exit(main())<br> File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 18, in main<br> config = _prepareconfig(args, plugins)<br> File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 62, in _prepareconfig<br> pluginmanager=pluginmanager, args=args)<br> File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 376, in __call__<br> return self._docall(methods, kwargs)<br> File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 387, in _docall<br> res = mc.execute()<br> File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 288, in execute<br> res = method(**kwargs)<br> File "/usr/lib/python2.7/dist-packages/_pytest/helpconfig.py", line 25, in pytest_cmdline_parse<br> config = __multicall__.execute()<br> File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 288, in execute<br> res = method(**kwargs)<br> File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 617, in pytest_cmdline_parse<br> self.parse(args)<br> File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 710, in parse<br> self._preparse(args)<br> File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 690, in _preparse<br> args=args, parser=self._parser)<br> File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 376, in __call__<br> return self._docall(methods, kwargs)<br> File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 387, in _docall<br> res = mc.execute()<br> File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 288, in execute<br> res = method(**kwargs)<br> File "/usr/lib/python2.7/dist-packages/_pytest/capture.py", line 42, in pytest_load_initial_conftests<br> return __multicall__.execute()<br> File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 288, in execute<br> res = method(**kwargs)<br> File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 673, in pytest_load_initial_conftests<br> self._conftest.setinitial(args)<br> File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 486, in setinitial<br> self._try_load_conftest(anchor)<br> File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 492, in _try_load_conftest<br> self._path2confmods[None] = self.getconftestmodules(anchor)<br> File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 511, in getconftestmodules<br> clist.append(self.importconftest(conftestpath))<br> File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 537, in importconftest<br> self._conftestpath2mod[conftestpath] = mod = conftestpath.pyimport()<br> File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 620, in pyimport<br> __import__(modname)<br> File "/home/justin/Software/firedrake-deps/PyOP2/test/conftest.py", line 40, in <module><br> from pyop2 import op2<br> File "/home/justin/Software/firedrake-deps/PyOP2/pyop2/__init__.py", line 9, in <module><br> from op2 import *<br> File "/home/justin/Software/firedrake-deps/PyOP2/pyop2/op2.py", line 39, in <module><br> import base<br> File "/home/justin/Software/firedrake-deps/PyOP2/pyop2/base.py", line 56, in <module><br> from sparsity import build_sparsity<br> File "PETSc.pxd", line 70, in init pyop2.sparsity (pyop2/sparsity.cpp:22252)<br> File "/usr/local/lib/python2.7/dist-packages/petsc4py/PETSc.py", line 3, in <module><br> PETSc = ImportPETSc(ARCH)<br> File "/usr/local/lib/python2.7/dist-packages/petsc4py/lib/__init__.py", line 29, in ImportPETSc<br> return Import('petsc4py', 'PETSc', path, arch)<br> File "/usr/local/lib/python2.7/dist-packages/petsc4py/lib/__init__.py", line 64, in Import<br> module = imp.load_module(fullname, fo, fn, stuff)<br>ImportError: /usr/local/lib/python2.7/dist-packages/petsc4py/lib/arch-linux2-c-opt/PETSc.so: undefined symbol: DMShellSetCreateSubDM<br>make: *** [unit_sequential] Error 1</span></font></div><div class="gi hi Wh" dir="ltr"><font size="2"><span style="background-color:rgba(255,255,255,0)"><br></span></font></div><div class="gi hi Wh" dir="ltr"><font size="2"><span style="background-color:rgba(255,255,255,0)"><br></span></font></div><div class="gi hi Wh" dir="ltr"><font size="2"><span style="background-color:rgba(255,255,255,0)">Any idea on how to fix this? Thanks,</span></font></div><div class="gi hi Wh" dir="ltr"><font size="2"><span style="background-color:rgba(255,255,255,0)"><br></span></font></div><div class="gi hi Wh" dir="ltr"><font size="2"><span style="background-color:rgba(255,255,255,0)">Justin</span></font></div></div></div></div><br>On Wednesday, July 22, 2015, Justin Chang <<a href="mailto:jychang48@gmail.com">jychang48@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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="javascript:_e(%7B%7D,'cvml','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><br>
Satish<br>
<br>
On Wed, 22 Jul 2015, Justin Chang wrote:<br>
<br>
</span><span>> How do I use this again?<br>
><br>
</span><div><div>> On Wednesday, July 22, 2015, Satish Balay <<a href="javascript:_e(%7B%7D,'cvml','balay@mcs.anl.gov');" target="_blank">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>
</blockquote></div>