Bug#863828: python3-instant: undefined symbol: PyClass_Type during interpolate

Drew Parsons dparsons at debian.org
Wed May 31 16:26:17 UTC 2017


Package: python3-instant
Version: 2016.2.0-2
Severity: normal

Testing the new python3 dolfin.  It works fine on my own scripts. But
seems to fail when instant is invoked by interpolate.

$ instant-clean-3 
$ ipython3
Python 3.5.3 (default, Jan 19 2017, 14:11:04) 
In [1]: from fenics import *  # dolfin module behaves the same
In [2]: mesh = UnitSquareMesh(2, 2)
In [3]: V = FunctionSpace(mesh, 'P', 1)
In [4]: u = interpolate(Expression('x[0] + x[1]', degree=1), V)
...
AssertionError: Failed to import module found in cache. Modulename: 'dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2';
Path: '/home/user/.cache/instant/python3.5/cache/dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2';
ImportError:/home/user/.cache/instant/python3.5/cache/dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2/_dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2.so: undefined symbol: PyClass_Type;



The full error report is:

In [4]: u = interpolate(Expression('x[0] + x[1]', degree=1), V)
Calling DOLFIN just-in-time (JIT) compiler, this may take some time.
--- Instant: compiling ---
In instant.import_module_directly: Failed to import module 'dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2' from '/home/user/.cache/instant/python3.5/cache/dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2';
ImportError:/home/user/.cache/instant/python3.5/cache/dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2/_dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2.so: undefined symbol: PyClass_Type;
Failed to import module found in cache. Modulename: 'dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2';
Path: '/home/user/.cache/instant/python3.5/cache/dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2';
ImportError:/home/user/.cache/instant/python3.5/cache/dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2/_dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2.so: undefined symbol: PyClass_Type;
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
<ipython-input-4-e06382777336> in <module>()
----> 1 u = interpolate(Expression('x[0] + x[1]', degree=1), V)

/usr/lib/python3/dist-packages/dolfin/functions/expression.py in __new__(cls, cppcode, *args, **kwargs)
    652         cpp_base, members = compile_expressions([cppcode],
    653                                                 [generic_function_members],
--> 654                                                 mpi_comm=kwargs.get("mpi_comm"))
    655         cpp_base, members = cpp_base[0], members[0]
    656 

/usr/lib/python3/dist-packages/dolfin/compilemodules/expressions.py in compile_expressions(cppargs, generic_function_members, mpi_comm)
    212         "\n\n".join(code_snippets), classnames,
    213         additional_declarations="\n".join(additional_declarations),
--> 214         mpi_comm=mpi_comm)
    215 
    216     return expression_classes, all_members

/usr/lib/python3/dist-packages/dolfin/compilemodules/expressions.py in compile_expression_code(code, classnames, module_name, additional_declarations, mpi_comm)
    139     compiled_module = compile_extension_module(
    140         code, additional_declarations=additional_declarations,
--> 141         mpi_comm=mpi_comm)
    142 
    143     # Get the compiled class

/usr/lib/python3/dist-packages/dolfin/compilemodules/jit.py in mpi_jit(*args, **kwargs)
     66         # Just call JIT compiler when running in serial
     67         if MPI.size(mpi_comm) == 1:
---> 68             return local_jit(*args, **kwargs)
     69 
     70         # Compile first on process 0

/usr/lib/python3/dist-packages/dolfin/compilemodules/compilemodule.py in compile_extension_module(code, module_name, additional_declarations, additional_system_headers, mpi_comm, **instant_kwargs)
    470             code=code,
    471             additional_declarations=additional_declarations,
--> 472             **instant_kwargs)
    473 
    474     sys.stdout.flush()

/usr/lib/python3/dist-packages/instant/build.py in build_module(modulename, source_directory, code, init_code, additional_definitions, additional_declarations, sources, wrap_headers, local_headers, system_headers, include_dirs, library_dirs, libraries, swigargs, swig_include_dirs, cppargs, lddargs, object_files, arrays, generate_interface, generate_setup, cmake_packages, signature, cache_dir)
    585 
    586         # Import module and place in memory cache
--> 587         module = import_and_cache_module(module_path, modulename, moduleids)
    588 
    589         if not module:

/usr/lib/python3/dist-packages/instant/cache.py in import_and_cache_module(path, modulename, moduleids)
     90     module, e = import_module_directly(path, modulename)
     91     instant_assert(module is not None, "Failed to import module found in cache. Modulename: '%s';\nPath: '%s';\n%s:%s;" % (modulename, path, type(e).__name__,
---> 92                                                                                                                            e))
     93     for moduleid in moduleids:
     94         place_module_in_memory_cache(moduleid, module)

/usr/lib/python3/dist-packages/instant/output.py in instant_assert(condition, *message)
    101         _log.error(*message)
    102         text = message[0] % message[1:]
--> 103         raise AssertionError(text)
    104 
    105 

AssertionError: Failed to import module found in cache. Modulename: 'dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2';
Path: '/home/user/.cache/instant/python3.5/cache/dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2';
ImportError:/home/user/.cache/instant/python3.5/cache/dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2/_dolfin_ee8f3791ac0426bc9e123d64557ccde25f2d90f2.so: undefined symbol: PyClass_Type;





-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64
 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-instant depends on:
ii  build-essential  12.3
ii  cmake            3.7.2-1
ii  pkg-config       0.29-4+b1
ii  python3-dev      3.5.3-1
ii  python3-numpy    1:1.12.1-3
ii  python3-six      1.10.0-4
pn  python3:any      <none>
ii  swig             3.0.10-1.1

python3-instant recommends no packages.

python3-instant suggests no packages.

-- no debconf information



More information about the debian-science-maintainers mailing list