Problem in FEniCS compilatin

Asked by Mohamed El-Amin

Dear Sir

I have installed FEinCS on my macbook which has Mac OS X version 10.6.8. I am trying to run an example of "stokes_example.py". I got the following error messages ,

elaminm@KL-11075:Nonlinear$ python stokes_example.py Calling FFC just-in-time (JIT) compiler, this may take some time.
In instant.recompile: The module did not compile, see '/Users/elaminm/.instant/error/instant_module_512026621ffb6cd40781116c7a38f228be2824b5/compile.log'
Traceback (most recent call last):
  File "stokes_example.py", line 13, in <module>
    V = VectorFunctionSpace(mesh, "Lagrange" , 2)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/dolfin/functions/functionspace.py", line 505, in __init__
    FunctionSpaceBase.__init__(self, mesh, element)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/dolfin/functions/functionspace.py", line 77, in __init__
    ufc_element, ufc_dofmap = jit(self._ufl_element)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/dolfin/compilemodules/jit.py", line 66, in mpi_jit
    return local_jit(*args, **kwargs)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/dolfin/compilemodules/jit.py", line 154, in jit
    return jit_compile(form, parameters=p, common_cell=common_cell)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/ffc/jitcompiler.py", line 71, in jit
    return jit_element(ufl_object, parameters)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/ffc/jitcompiler.py", line 178, in jit_element
    compiled_form, module, form_data, prefix = jit_form(form, parameters)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/ffc/jitcompiler.py", line 145, in jit_form
    cache_dir = cache_dir)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/ufc_utils/build.py", line 73, in build_ufc_module
    **kwargs)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/instant/build.py", line 492, in build_module
    recompile(modulename, module_path, setup_name, new_compilation_checksum)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/instant/build.py", line 115, in recompile
    "compile, see '%s'" % compile_log_filename_dest)
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/instant/output.py", line 49, in instant_error
    raise RuntimeError(text)
RuntimeError: In instant.recompile: The module did not compile, see '/Users/elaminm/.instant/error/instant_module_512026621ffb6cd40781116c7a38f228be2824b5/compile.log'

Question information

Language:
English Edit question
Status:
Solved
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Solved by:
Mohamed El-Amin
Solved:
Last query:
Last reply:
Revision history for this message
Martin Sandve Alnæs (martinal) said :
#1

At the end it says

RuntimeError: In instant.recompile: The module did not compile, see '/Users/elaminm/.instant/error/instant_module_512026621ffb6cd40781116c7a38f228be2824b5/compile.log'

what is the first error message in that file?

Revision history for this message
Mohamed El-Amin (mohamed-elamin) said :
#2

Thanks for answer.

The message in the file is:

running build_ext
building '_d42cfb07651b0822cf415533175ab2e301e7512f' extension
creating build
creating build/temp.macosx-10.6-universal-2.6
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -I/Applications/FEniCS.app/Contents/Resources/include -I/Applications/FEniCS.app/Contents/Resources/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c d42cfb07651b0822cf415533175ab2e301e7512f_wrap.cxx -o build/temp.macosx-10.6-universal-2.6/d42cfb07651b0822cf415533175ab2e301e7512f_wrap.o -O0
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
d42cfb07651b0822cf415533175ab2e301e7512f_wrap.cxx:4149: fatal error: error writing to -: Broken pipe
compilation terminated.
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
lipo: can't open input file: /var/folders/Tg/TgGK-NPpHeeSOkT0c7zkYbv2ZUI/-Tmp-//cc6AxgjF.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1

Revision history for this message
Johannes Ring (johannr) said :
#3

Does any of the demo programs in /Applications/FEniCS.app/Contents/Resources/share/dolfin/demo work?

Revision history for this message
Mohamed El-Amin (mohamed-elamin) said :
#4

All the demo programs I tried gives same kind of errors. some of them just give the mesh and then give error.

Thanks

Revision history for this message
Johannes Ring (johannr) said :
#5

Googling your error message led me to this page:

  http://martinkou.blogspot.no/2011/05/how-to-solve-assembler-for-architecture.html

According to that page, you should be able to fix the problem by running the following two commands:

  sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gcc/darwin/ppc /Developer/usr/libexec/gcc/darwin
  sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gcc/darwin/ppc /usr/libexec/gcc/darwin

Revision history for this message
Mohamed El-Amin (mohamed-elamin) said :
#6

Now, it is work.

Thank you very much