[firedrake] error installing PyOP2

Justin Chang jychang48 at gmail.com
Tue Jul 14 13:03:46 BST 2015


I had my PETSc use the globally installed MPI. Now it seems they all point
to the same MPI library

However, now I am getting this new error when running 'make test':

cd test; py.test unit --backend=sequential
Traceback (most recent call last):
  File "/usr/local/bin/py.test", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 18, in
main
    config = _prepareconfig(args, plugins)
  File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 62, in
_prepareconfig
    pluginmanager=pluginmanager, args=args)
  File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 376, in
__call__
    return self._docall(methods, kwargs)
  File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 387, in
_docall
    res = mc.execute()
  File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 288, in
execute
    res = method(**kwargs)
  File "/usr/lib/python2.7/dist-packages/_pytest/helpconfig.py", line 25,
in pytest_cmdline_parse
    config = __multicall__.execute()
  File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 288, in
execute
    res = method(**kwargs)
  File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 617, in
pytest_cmdline_parse
    self.parse(args)
  File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 710, in
parse
    self._preparse(args)
  File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 690, in
_preparse
    args=args, parser=self._parser)
  File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 376, in
__call__
    return self._docall(methods, kwargs)
  File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 387, in
_docall
    res = mc.execute()
  File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 288, in
execute
    res = method(**kwargs)
  File "/usr/lib/python2.7/dist-packages/_pytest/capture.py", line 42, in
pytest_load_initial_conftests
    return __multicall__.execute()
  File "/usr/lib/python2.7/dist-packages/_pytest/core.py", line 288, in
execute
    res = method(**kwargs)
  File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 673, in
pytest_load_initial_conftests
    self._conftest.setinitial(args)
  File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 486, in
setinitial
    self._try_load_conftest(anchor)
  File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 492, in
_try_load_conftest
    self._path2confmods[None] = self.getconftestmodules(anchor)
  File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 511, in
getconftestmodules
    clist.append(self.importconftest(conftestpath))
  File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 537, in
importconftest
    self._conftestpath2mod[conftestpath] = mod = conftestpath.pyimport()
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 620, in
pyimport
    __import__(modname)
  File "/home/justin/Software/firedrake-deps/PyOP2/test/conftest.py", line
40, in <module>
    from pyop2 import op2
  File
"/usr/local/lib/python2.7/dist-packages/PyOP2-0.11.0_341_gbf1441a-py2.7-linux-x86_64.egg/pyop2/__init__.py",
line 9, in <module>
    from op2 import *
  File
"/usr/local/lib/python2.7/dist-packages/PyOP2-0.11.0_341_gbf1441a-py2.7-linux-x86_64.egg/pyop2/op2.py",
line 39, in <module>
    import base
  File
"/usr/local/lib/python2.7/dist-packages/PyOP2-0.11.0_341_gbf1441a-py2.7-linux-x86_64.egg/pyop2/base.py",
line 56, in <module>
    from sparsity import build_sparsity
  File "PETSc.pxd", line 61, in init pyop2.sparsity
(pyop2/sparsity.cpp:22149)
ValueError: petsc4py.PETSc.Comm has the wrong size, try recompiling
make: *** [unit_sequential] Error 1

I also noticed that the latest pull of the petsc4py repository has now
upgraded me from 3.5.1 to 3.6. Could this have something to do with this
error?

Thanks,
Justin


On Tue, Jul 14, 2015 at 5:29 AM, Lawrence Mitchell <
lawrence.mitchell at imperial.ac.uk> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 14/07/15 11:23, Justin Chang wrote:
> > python -c "import pyop2; pyop2.init(); print pyop2.__version__"
> > gives the following:
>
> OK, thanks.
>
> I think we're nearly there.
>
> This backtrace points at
>
> > /usr/lib/libmpi.so.1(MPI_Comm_set_errhandler+0x4d)
> > [0x7f83c5be3a1d]
>
> The globally installed MPI.
>
> But all the link output points to:
> >
> > libmpi.so.12 =>
> > /home/justin/Software/petsc-dev/arch-linux2-c-opt/lib/libmpi.so.12
> > (0x00007f780047c000) libmpifort.so.12 =>
> > /home/justin/Software/petsc-dev/arch-linux2-c-opt/lib/libmpifort.so.12
> >
> >
> (0x00007f77fe670000)
>
> I.e. the MPI version petsc has built for you.
>
> I therefore suspect that the issue is coming from an mpi4py
> installation that is linked against /usr/lib/libmpi.so (rather than
> the $PETSC_DIR/$PETSC_ARCH/lib/libmpi.so).
>
> Does the following sequence result in the same set of errors?
>
> python -c "from mpi4py import MPI; from petsc4py import PETSc"
>
> If so, I think the solution is to install mpi4py linked against the
> same MPI library that petsc and friends are using.
>
> Cheers,
>
> Lawrence
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iQEcBAEBAgAGBQJVpOSaAAoJECOc1kQ8PEYvkVsH/3MRr3/W1K7oCoRP0Cranr1h
> IG62KO69/3OP2aA0WjrLXiShK/RBPhHUv3oLzx2wbQUPxuaRIT2uBmrWpH+MJmik
> j//dYtHrvgXqYPSs2DWNAE0nYJ/6f+AOCtj59gTzT7Wy17h2Vw1brE04eei3qjK2
> dJgcMpYrGiYEa+/j6lW/z+q29eODFBAUkbUIRS3hfHxmR63LNSgKLdaUHRFOWZy2
> njjTD9JlSobtfLJGWUgMKPaJSdki4+tbr0XmLdMl5CsPcLzTtOW3FrODSu5ZRPt7
> shfOSGh7ATrXZ4ioA0JAxDjUcGt7Qyu29ZJ3GntQAX/7ZTEvzOSIj1RgMNChYdM=
> =tigp
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> firedrake mailing list
> firedrake at imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the firedrake mailing list