Need help debugging unreported exception

699 views
Skip to first unread message

Marco Morandini

unread,
Sep 6, 2017, 11:34:12 AM9/6/17
to fenics-support
I'm having an hard time building a working dolfin (git master) on my new
laptop.
The same building procedure leads to a working dolfin on my desktop.
The two machines, however differ: the laptopt has a newer swig and gcc
(3.0.12 and 7.1.1, respectively)

The error I'm getting is

--------------------------------
marco@spark:~> python3
Python 3.6.1 (default, Mar 23 2017, 13:04:44) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from dolfin import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/home/marco/local/Fenics/lib64/python3.6/site-packages/dolfin/__init__.py",
line 17, in <module>
from . import cpp
File
"/home/marco/local/Fenics/lib64/python3.6/site-packages/dolfin/cpp/__init__.py",
line 43, in <module>
exec("from . import %s" % module_name)
File "<string>", line 1, in <module>
File
"/home/marco/local/Fenics/lib64/python3.6/site-packages/dolfin/cpp/common.py",
line 21, in <module>
_common = swig_import_helper()
File
"/home/marco/local/Fenics/lib64/python3.6/site-packages/dolfin/cpp/common.py",
line 18, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
SystemError: initialization of _common raised unreported exception
--------------------

Running python3 under a debugger and setting a breakpoint to
PyInit__common did not help: PyInit__common returns without raising any
exception.

_bootstrap._gcd_import appears to be frozen inside python, so I don't
get any additional clues editing my system _bootstrap.py

I also do not see missing libraries with "ldd _common.so"

Any suggestion on how to troubleshoot this?

Thank you in advance,

Marco

Garth N. Wells

unread,
Sep 6, 2017, 11:44:46 AM9/6/17
to Marco Morandini, fenics-support
This is a dreaded error that could be almost anything.

I see this most often when there is (i) a linking problem with the
DOLFIN library, or (ii) I have petsc4py/slepc4py installed but not
up-to-date with my PETSc/SLEPc library.

I expect we'll see less of this with pybind11 because the linking
process is simpler and less opaque.

Garth
> --
> You received this message because you are subscribed to the Google Groups
> "fenics-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fenics-suppor...@googlegroups.com.
> To post to this group, send email to fenics-...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/fenics-support/01beffac-9b11-fb4e-99ca-7c53dbebc131%40polimi.it.
> For more options, visit https://groups.google.com/d/optout.

Marco Morandini

unread,
Sep 7, 2017, 7:34:31 AM9/7/17
to Garth N. Wells, fenics-support
On 09/06/2017 05:44 PM, Garth N. Wells wrote:
> This is a dreaded error that could be almost anything.
>
> I see this most often when there is (i) a linking problem with the
> DOLFIN library, or (ii) I have petsc4py/slepc4py installed but not
> up-to-date with my PETSc/SLEPc library.

You were right (as usual). Rebuilding them from scratch (same version)
fixed the issue.

Thank you,

Marco
Reply all
Reply to author
Forward
0 new messages