Hello everyone,
Even a basic examples like
from dolfin import *
mesh=UnitSquareMesh(10,10)
V=FunctionSpace(mesh,‘CG’,1)
test=Expression(‘log(x[0])’,degree=2)
produce the following error:
------------------- Start compiler output ------------------------
/tmp/tmp8fpv9cnf/dolfin_expression_79f612eabded1b3ced20c6e95eb1587c.cpp: In member function ‘virtual void dolfin::dolfin_expression_79f612eabded1b3ced20c6e95eb1587c::eval(Eigen::Ref<Eigen::Matrix<double, -1, 1> >, Eigen::Ref<const Eigen::Matrix<double, -1, 1> >) const’:
/tmp/tmp8fpv9cnf/dolfin_expression_79f612eabded1b3ced20c6e95eb1587c.cpp:61:30: error: too few arguments to function ‘void dolfin::log(int, std::__cxx11::string, …)’
values[0] = log(x[0]);
^
In file included from /usr/include/dolfin/common/Array.h:32:0,
from /usr/include/dolfin/function/Expression.h:27,
from /tmp/tmp8fpv9cnf/dolfin_expression_79f612eabded1b3ced20c6e95eb1587c.cpp:13:
/usr/include/dolfin/log/log.h:103:8: note: declared here
void log(int debug_level, std::string msg, …);
^~~------------------- End compiler output ------------------------
Traceback (most recent call last):
File “”, line 6, in
test=Expression(‘log(x[0])’,degree=2)File “/usr/lib/python3/dist-packages/dolfin/function/expression.py”, line 376, in init
self._cpp_object = jit.compile_expression(cpp_code, params)File “/usr/lib/python3/dist-packages/dolfin/function/jit.py”, line 158, in compile_expression
expression = compile_class(cpp_data, mpi_comm=mpi_comm)File “/usr/lib/python3/dist-packages/dolfin/jit/jit.py”, line 170, in compile_class
raise RuntimeError(“Unable to compile C++ code with dijitso”)RuntimeError: Unable to compile C++ code with dijitso
At a first glance it looks like dijitso is trying to access some kind of error log function instead of cmath natural logarithm? Am I doing something wrong, is there a quick fix or have I accidentally overwritten some in-built objects and it will be the best to just reinstall FEniCS?
I should probably also mention that the example will work for any other cmath function.