This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Problem with compiling Expression - instant.recompile The module did not compile with command 'make VERBOSE=1'

0 votes

Hello,

I installed FEniCS 1.5.0 (for Mac OS 10.9) and I cannot run any of the old codes I had any more. The error seems to be when compiling the Expressions.

For example, for the following (which is actually an example I copied from one of the FEniCS demos):

from dolfin import *

mesh = UnitSquareMesh(3, 3)
# Mark boundaries of original mesh
bdry = FacetFunction('size_t', mesh, 0)
DomainBoundary().mark(bdry, 10)

# Function space for displacement u
V = VectorFunctionSpace(mesh, 'CG', 1)
# Shear displacement
u = interpolate(Expression(('0.25*x[1]', '0')), V)

plot(bdry, title='Initial', interactive=True)

# Move the mesh
mesh.move(u)
plot(bdry, title='Moved', interactive=True)

# Revert manually
x, y = mesh.coordinates()[:, 0], mesh.coordinates()[:, 1]
x -= 0.25*y
plot(bdry, title='And back', interactive=True)

The error message I get is as follows:

In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '/Users/debanjan-shaddenlab/.instant/error/dolfin_compile_code_5295871d33b17b4758523c206c35ce895941b320/compile.log'
Traceback (most recent call last):
  File "mesh-move-fenics-forum.py", line 11, in <module>
    u = interpolate(Expression(('0.25*x[1]', '0')), V)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/dolfin/functions/expression.py", line 602, in __new__
    mpi_comm=mpi_comm)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/dolfin/compilemodules/expressions.py", line 217, in compile_expressions
    mpi_comm=mpi_comm)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/dolfin/compilemodules/expressions.py", line 145, in compile_expression_code
    mpi_comm=mpi_comm)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 64, in mpi_jit
    return local_jit(*args, **kwargs)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/dolfin/compilemodules/compilemodule.py", line 458, in compile_extension_module
    **instant_kwargs)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/instant/build.py", line 563, in build_module
    recompile(modulename, module_path, new_compilation_checksum, build_system)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/instant/build.py", line 165, in recompile
    instant_error(msg % (cmd, compile_log_filename_dest))
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/instant/output.py", line 85, in instant_error
    raise RuntimeError(text)
RuntimeError: In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '/Users/debanjan-shaddenlab/.instant/error/dolfin_compile_code_5295871d33b17b4758523c206c35ce895941b320/compile.log'

I also checked the log file, and it seems like the error is originating from the following:

fatal error: 'numpy/arrayobject.h' file not found
 71 #include <numpy/arrayobject.h>
 72          ^
 73 1 error generated.
 74 make[2]: *** [CMakeFiles/_dolfin_compile_code_21b017147821a4e96e4d0e94f3a17c6708c1f661.dir/dolfin_compile_code_21b017147821a4e96e4d0e94f3a17c6708c1f661PYTHON_wrap.cxx.o] Error 1
 75 make[1]: *** [CMakeFiles/_dolfin_compile_code_21b017147821a4e96e4d0e94f3a17c6708c1f661.dir/all] Error 2
 76 make: *** [all] Error 2

I have however not yet been able to work out the issue. I have checked and I have the latest numpy installed, and also latest scipy. Can someone provide some tips, or help creating a cleaner alternative installation?

Thanks

Further Information

Tried installing FEniCS 1.4.0 - and this gives an error saying module python-scientific is not installed.

Tried installing from source by running
curl -s http://fenicsproject.org/fenics-install.sh | bash
This did not complete the installation - and gave an error when the python build was initiated.

Any help will be very valuable.

Thanks

asked Dec 22, 2015 by debmukh FEniCS Novice (880 points)
edited Dec 22, 2015 by debmukh

1 Answer

0 votes

Try to remove everything and start over. There are probably left-overs from
previous installations that mess up the new installations. So make sure that you remove
everything.

answered Dec 28, 2015 by Kent-Andre Mardal FEniCS Expert (14,380 points)
...