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

2017-06-06 Thread Johannes Ring
On Fri, Jun 2, 2017 at 7:34 PM, Drew Parsons  wrote:
> It's still failing, with python-ffc 2016.2.0-3 and libdolfin-dev
> 2016.2.0-4 (with UseDOLFIN.cmake patched).

Oh, sorry I forgot that this patch is needed for instant:
https://bitbucket.org/fenics-project/instant/commits/67be09da6e9cd8907bddba7e1363da8953851bda.

Johannes

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


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

2017-06-02 Thread Drew Parsons
On Thu, 1 Jun 2017 10:39:37 +0200 Johannes Ring 
wrote:
> On Thu, Jun 1, 2017 at 10:24 AM, Drew Parsons 
wrote:
> > Should the vtk section in UseDOLFIN.cmake be controlled with some
> > python3 test, so VTK is still pulled in for python2?
> 
> Yes, we can do that, although I believe the vtk section in
> UseDOLFIN.cmake is not important. I will make a patch.


It's still failing, with python-ffc 2016.2.0-3 and libdolfin-dev
2016.2.0-4 (with UseDOLFIN.cmake patched).

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_ee8f3791ac0429f005de8924557ccde25f2d90f2' from 
'/home/drew/.cache/instant/python3.5/cache/dolfin_ee8f3791ac0429f005de8924557ccde25f2d90f2';
ImportError:dynamic module does not define module export function 
(PyInit__dolfin_ee8f3791ac0429fd87a23c24557ccde25f2d90f2);
Failed to import module found in cache. Modulename: 
'dolfin_ee8f3791ac0429fd87a23c24557ccde25f2d90f2';
Path: 
'/home/useruser/.cache/instant/python3.5/cache/dolfin_ee8f3791ac0429fd87a23c24557ccde25f2d90f2';
ImportError:dynamic module does not define module export function 
(PyInit__dolfin_ee8f3791ac0429fd87a23c24557ccde25f2d90f2);
---
AssertionErrorTraceback (most recent call last)
 in ()
> 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_ee8f3791ac0429fd87a23c24557ccde25f2d90f2';
Path: 

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

2017-06-01 Thread Johannes Ring
On Thu, Jun 1, 2017 at 10:24 AM, Drew Parsons  wrote:
> Should the vtk section in UseDOLFIN.cmake be controlled with some
> python3 test, so VTK is still pulled in for python2?

Yes, we can do that, although I believe the vtk section in
UseDOLFIN.cmake is not important. I will make a patch.

Johannes

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


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

2017-06-01 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> reassign 863828 libdolfin-dev 2016.2.0-3
Bug #863828 [python3-instant] python3-instant: undefined symbol: PyClass_Type 
during interpolate
Bug reassigned from package 'python3-instant' to 'libdolfin-dev'.
No longer marked as found in versions instant/2016.2.0-2.
Ignoring request to alter fixed versions of bug #863828 to the same values 
previously set
Bug #863828 [libdolfin-dev] python3-instant: undefined symbol: PyClass_Type 
during interpolate
Marked as found in versions dolfin/2016.2.0-3.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
863828: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863828
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


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

2017-06-01 Thread Drew Parsons
reassign 863828 libdolfin-dev 2016.2.0-3
thanks

On Thu, 2017-06-01 at 10:01 +0200, Johannes Ring wrote:
> 
> The problem here is that Python 2 header files are used. This comes
> from VTK, which is built against Python 2 only. The solution is to
> not
> call `find_package(VTK)` and `include(${VTK_USE_FILE})` in
> /usr/share/dolfin/cmake/UseDOLFIN.cmake. It can be verified that this
> fixes the problem by removing these lines in UseDOLFIN.cmake.
> 
> This is a bug in dolfin, not instant. Drew: could you re-target this
> to dolfin (perhaps libdolfin-dev)?

Reassigned.

Should the vtk section in UseDOLFIN.cmake be controlled with some
python3 test, so VTK is still pulled in for python2?

Drew

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

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

2017-06-01 Thread Johannes Ring
On Wed, May 31, 2017 at 6:26 PM, Drew Parsons  wrote:
> $ 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 problem here is that Python 2 header files are used. This comes
from VTK, which is built against Python 2 only. The solution is to not
call `find_package(VTK)` and `include(${VTK_USE_FILE})` in
/usr/share/dolfin/cmake/UseDOLFIN.cmake. It can be verified that this
fixes the problem by removing these lines in UseDOLFIN.cmake.

This is a bug in dolfin, not instant. Drew: could you re-target this
to dolfin (perhaps libdolfin-dev)?

Johannes

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


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

2017-05-31 Thread Drew Parsons
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;
---
AssertionErrorTraceback (most recent call last)
 in ()
> 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