Hi there,
I am trying to run some fenics code for solids with Ubuntu on my Windows pc.
I installed version fenics=2017.2.0 with python=3.6 sympy=1.1.1 boost=1.65 libboost=1.65.
Some parts of fenics seem to run fine, since I can create a mesh and define function spaces. However, when I use “Expression()” I get the following error:
" RuntimeError: In instant.recompile: The module did not compile with command ‘cmake -DDEBUG=TRUE .’ "
I also get this error when using “CompiledSubDomain()”
My code is below:
import
from dolfin import *
from fenics import *
import numpy as np
Define mesh parameters
Lx = 2. # [cm] -length of patch
Ly = 1.
Lz = 1.
Nx = 4
Ny = 2
Nz = Ny
elem_dg = 2 # set the degree of mesh elements
Create mesh and define function space
mesh = BoxMesh(Point(0,0,0),Point(Lx,Ly,Lz),Nx,Ny,Nz)
V_normal = FunctionSpace(mesh, “Lagrange”,elem_dg)
V_vector = VectorFunctionSpace(mesh, “Lagrange”, elem_dg)
V_tensor = TensorFunctionSpace(mesh, “Lagrange”, elem_dg)
fiber_exp = Expression((“1.0”, “0.0”,“0.0”), element=V_vector.ufl_element())
The full error message is:
File “question.py”, line 30, in
fiber_exp = Expression((“1.0”, “0.0”,“0.0”), element=V_vector.ufl_element())
File “/home/mvdknaap/anaconda3/envs/fenics-2017-2-new/lib/python3.6/site-packages/dolfin/functions/expression.py”, line 679, in new
mpi_comm=kwargs.get(“mpi_comm”))
File “/home/mvdknaap/anaconda3/envs/fenics-2017-2-new/lib/python3.6/site-packages/dolfin/compilemodules/expressions.py”, line 266, in compile_expressions
mpi_comm=mpi_comm)
File “/home/mvdknaap/anaconda3/envs/fenics-2017-2-new/lib/python3.6/site-packages/dolfin/compilemodules/expressions.py”, line 183, in compile_expression_code
mpi_comm=mpi_comm)
File “/home/mvdknaap/anaconda3/envs/fenics-2017-2-new/lib/python3.6/site-packages/dolfin/compilemodules/jit.py”, line 70, in mpi_jit
return local_jit(*args, **kwargs)
File “/home/mvdknaap/anaconda3/envs/fenics-2017-2-new/lib/python3.6/site-packages/dolfin/compilemodules/compilemodule.py”, line 603, in compile_extension_module
**instant_kwargs)
File “/home/mvdknaap/anaconda3/envs/fenics-2017-2-new/lib/python3.6/site-packages/instant/build.py”, line 577, in build_module
build_system)
File “/home/mvdknaap/anaconda3/envs/fenics-2017-2-new/lib/python3.6/site-packages/instant/build.py”, line 158, in recompile
instant_error(msg % (cmd, compile_log_filename_dest))
File “/home/mvdknaap/anaconda3/envs/fenics-2017-2-new/lib/python3.6/site-packages/instant/output.py”, line 96, in instant_error
raise RuntimeError(text)
RuntimeError: In instant.recompile: The module did not compile with command ‘cmake -DDEBUG=TRUE .’, see ‘/home/mvdknaap/anaconda3/envs/fenics-2017-2-new/.cache/instant/error/dolfin_16904bd4f218f3971471e7768edfd087b53fdf38/compile.log’
The compile log tells:
CMake Error: CMake was unable to find a build program corresponding to “Unix Makefiles”. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
– Configuring incomplete, errors occurred!
See also “/tmp/tmpbj70l9s_2020-12-28-11-08_instant_44f59f19d720d7567e1428c71e966a4151401d3b/dolfin_16904bd4f218f3971471e7768edfd087b53fdf38/CMakeFiles/CMakeOutput.log”.
compile.log (END)
I guess some versions are not compatible, but my knowledge in software is not sufficient to some this. I am still using the older version because the models I will use later on are not compatible with the newer fincs versions. It would be really nice if someone could help me fix this problem, so I can finally start building some models instead of keep struggling with the installation.
Thanks in advance,
Maite