Error using the function "Expression"

Asked by Erwan Liberge on 2013-07-20

Hello,

I am using the no-stable version proposed by Dorsal for mountainlion platform. The problem occurs also with stable version.

If I try to use the "Expression" function, for example :

f = Expression('0')

 I get the following error :

"
in instant.recompile: The module did not compile with command 'make VERBOSE=1', see '/Users/eliberge/.instant/error/dolfin_compile_code_f3241a28b286528bd5eb6f354aca8340/compile.log'
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-27-ca317e5af957> in <module>()
----> 1 u0 = Expression('sin(2*pi*x[0])*sin(2*pi*x[1])', pi=np.pi)

/Users/eliberge/Work/FEniCS/lib/python2.7/site-packages/dolfin/functions/expression.py in __new__(cls, cppcode, element, cell, degree, name, label, **kwargs)
    580 # Compile module and get the cpp.Expression class
    581 cpp_base, members = compile_expressions([cppcode],
--> 582 [generic_function_members])
    583 cpp_base, members = cpp_base[0], members[0]
    584

/Users/eliberge/Work/FEniCS/lib/python2.7/site-packages/dolfin/compilemodules/expressions.py in compile_expressions(cppargs, generic_function_members)
    215 expression_classes = compile_expression_code("\n\n".join(\
    216 code_snippets), classnames, additional_declarations="\n".join(\
--> 217 additional_declarations))
    218
    219 return expression_classes, all_members

/Users/eliberge/Work/FEniCS/lib/python2.7/site-packages/dolfin/compilemodules/expressions.py in compile_expression_code(code, classnames, module_name, additional_declarations)
    140 # Compile the extension module
    141 compiled_module = compile_extension_module(\
--> 142 code, additional_declarations=additional_declarations)
    143
    144 # Get the compiled class

/Users/eliberge/Work/FEniCS/lib/python2.7/site-packages/dolfin/compilemodules/jit.py in mpi_jit(*args, **kwargs)
     64 # Just call JIT compiler when running in serial
     65 if MPI.num_processes() == 1:
---> 66 return local_jit(*args, **kwargs)
     67
     68 # Compile first on process 0

/Users/eliberge/Work/FEniCS/lib/python2.7/site-packages/dolfin/compilemodules/compilemodule.py in compile_extension_module(code, module_name, additional_declarations, additional_system_headers, **instant_kwargs)
    429 code = code,
    430 additional_declarations = _additional_declarations%declaration_strs,
--> 431 **instant_kwargs)
    432
    433 sys.stdout.flush()

/Users/eliberge/Work/FEniCS/lib/python2.7/site-packages/instant/build.pyc 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)
    542
    543 # Recompile if necessary
--> 544 recompile(modulename, module_path, new_compilation_checksum, build_system)
    545
    546 # --- Load, cache, and return module

/Users/eliberge/Work/FEniCS/lib/python2.7/site-packages/instant/build.pyc in recompile(modulename, module_path, new_compilation_checksum, build_system)
    149 os.remove(compilation_checksum_filename)
    150 msg = "In instant.recompile: The module did not compile with command '%s', see '%s'"
--> 151 instant_error(msg % (cmd, compile_log_filename_dest))
    152
    153 finally:

/Users/eliberge/Work/FEniCS/lib/python2.7/site-packages/instant/output.pyc in instant_error(*message)
     47 _log.error(*message)
     48 text = message[0] % message[1:]
---> 49 raise RuntimeError(text)
     50
     51 def instant_assert(condition, *message):

RuntimeError: In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '/Users/eliberge/.instant/error/dolfin_compile_code_f3241a28b286528bd5eb6f354aca8340/compile.log'

"

And in the "compile.log" file, I get 3 warning :

clang: warning: argument unused during compilation: '-frounding-math'
clang: warning: argument unused during compilation: '-fopenmp'
#warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"

and 1 error :

/opt/local/lib/vtk-5.10/libvtkViews.dylib /opt/local/lib/vtk-5.10/libvtkCharts.dylib /usr/lib/libpython2.7.dylib
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [_dolfin_compile_code_f3241a28b286528bd5eb6f354aca8340.so] Error 1
make[1]: *** [CMakeFiles/_dolfin_compile_code_f3241a28b286528bd5eb6f354aca8340.dir/all] Error 2
make: *** [all] Error 2

Openmpi has been installed :
port installed openmpi
The following ports are currently installed:
  openmpi @1.6.4_0+gcc47
  openmpi @1.7.1_0+gcc47
  openmpi @1.7.2_0+gcc47 (active)

Many Thanks for answers,

Erwan

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
2013-07-20
Last reply:
2013-07-31
Johannes Ring (johannr) said : #1

FEniCS no longer uses Launchpad for Questions & Answers. Please consult the documentation on the FEniCS web page for where and how to (re)post your question: http://fenicsproject.org/support/

Can you help with this problem?

Provide an answer of your own, or ask Erwan Liberge for more information if necessary.

To post a message you must log in.