Skip to content

Expression Class #10

@ysimillides

Description

@ysimillides

Hello.
When attempting to import the https://fenicsproject.org/olddocs/dolfin/2016.2.0/python/programmers-reference/functions/expression/Expression.html , the error below can be shown. I've tried searching for the error message online, but have had no luck. I cannot also track down the log file. I believe (but cannot be sure) that it is a precompilation error in FEniCS, as the DOLFIN JIT compiler is being called with these commands.
EDIT: I have been informed that the expression class is written in C++, so maybe it needs a different wrapper?
Running these 3 lines of code should be enough to reproduce the error.

using PyCall
@pyimport fenics
test = fenics.Expression("A*sin(x[0]) + B*cos(x[1])")

LoadError: PyError (ccall(@pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, arg, C_NULL)) <type 'exceptions.RuntimeError'>
RuntimeError("In instant.recompile: The module did not compile with command 'cmake -DDEBUG=TRUE .', see '/home/ysimillides/.cache/instant/python2.7/error/dolfin_30bdf4cb51714b187b95e13cb07aeaf2529b443b/compile.log'",)
File "/home/ysimillides/.julia/v0.6/Conda/deps/usr/lib/python2.7/site-packages/dolfin/functions/expression.py", line 679, in new
mpi_comm=kwargs.get("mpi_comm"))
File "/home/ysimillides/.julia/v0.6/Conda/deps/usr/lib/python2.7/site-packages/dolfin/compilemodules/expressions.py", line 266, in compile_expressions
mpi_comm=mpi_comm)
File "/home/ysimillides/.julia/v0.6/Conda/deps/usr/lib/python2.7/site-packages/dolfin/compilemodules/expressions.py", line 183, in compile_expression_code
mpi_comm=mpi_comm)
File "/home/ysimillides/.julia/v0.6/Conda/deps/usr/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 70, in mpi_jit
return local_jit(*args, **kwargs)
File "/home/ysimillides/.julia/v0.6/Conda/deps/usr/lib/python2.7/site-packages/dolfin/compilemodules/compilemodule.py", line 603, in compile_extension_module
**instant_kwargs)
File "/home/ysimillides/.julia/v0.6/Conda/deps/usr/lib/python2.7/site-packages/instant/build.py", line 577, in build_module
build_system)
File "/home/ysimillides/.julia/v0.6/Conda/deps/usr/lib/python2.7/site-packages/instant/build.py", line 158, in recompile
instant_error(msg % (cmd, compile_log_filename_dest))
File "/home/ysimillides/.julia/v0.6/Conda/deps/usr/lib/python2.7/site-packages/instant/output.py", line 96, in instant_error
raise RuntimeError(text)
while loading /home/ysimillides/FEniCS.jl/src/jfem.jl, in expression starting on line 40
pyerr_check at exception.jl:56 [inlined]
pyerr_check at exception.jl:61 [inlined]
macro expansion at exception.jl:81 [inlined]
#_pycall#66(::Array{Any,1}, ::Function, ::PyCall.PyObject, ::String, ::Vararg{String,N} where N) at PyCall.jl:620
_pycall(::PyCall.PyObject, ::String, ::Vararg{String,N} where N) at PyCall.jl:608
#pycall#70(::Array{Any,1}, ::Function, ::PyCall.PyObject, ::Type{PyCall.PyAny}, ::String, ::Vararg{String,N} where N) at PyCall.jl:642
pycall(::PyCall.PyObject, ::Type{PyCall.PyAny}, ::String, ::Vararg{String,N} where N) at PyCall.jl:642
#call#71(::Array{Any,1}, ::PyCall.PyObject, ::String, ::Vararg{String,N} where N) at PyCall.jl:645
FEniCS.Expression(::String) at jfem.jl:24
include_string(::String, ::String) at loading.jl:515
include_string(::Module, ::String, ::String) at Compat.jl:1492
(::Atom.##55#58{String,String})() at eval.jl:73
withpath(::Atom.##55#58{String,String}, ::String) at utils.jl:30
withpath(::Function, ::String) at eval.jl:38
macro expansion at eval.jl:71 [inlined]
(::Atom.##54#57{Dict{String,Any}})() at task.jl:80

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions