dolfin FEniCS problem

Asked by Scott Richardson

Hello, I am having a problem running most of the demo problems. But I can run a couple. Here's what I get when I try to run the elasticity demo problem:

scottr99@scottr99-HP-Pavilion-dm4-Notebook-PC:/usr/share/dolfin/demo/undocumented/elasticity/python$ python demo_elasticity.py
Calling FFC just-in-time (JIT) compiler, this may take some time.
Traceback (most recent call last):
  File "demo_elasticity.py", line 31, in <module>
    V = VectorFunctionSpace(mesh, "CG", 1)
  File "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", line 505, in __init__
    FunctionSpaceBase.__init__(self, mesh, element)
  File "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", line 77, in __init__
    ufc_element, ufc_dofmap = jit(self._ufl_element)
  File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", line 66, in mpi_jit
    return local_jit(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", line 154, in jit
    return jit_compile(form, parameters=p, common_cell=common_cell)
  File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 71, in jit
    return jit_element(ufl_object, parameters)
  File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 178, in jit_element
    compiled_form, module, form_data, prefix = jit_form(form, parameters)
  File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 130, in jit_form
    common_cell=common_cell)
  File "/usr/lib/python2.7/dist-packages/ffc/compiler.py", line 175, in compile_form
    format_code(code, wrapper_code, prefix, parameters)
  File "/usr/lib/python2.7/dist-packages/ffc/formatting.py", line 107, in format_code
    _write_file(code_h, prefix, ".h", parameters)
  File "/usr/lib/python2.7/dist-packages/ffc/formatting.py", line 130, in _write_file
    hfile = open(filename, "w")
IOError: [Errno 13] Permission denied: './ffc_form_68a7216c25aa80e752f19dff9ae71c20c6fc3b3c.h'
scottr99@scottr99-HP-Pavilion-dm4-Notebook-PC:/usr/share/dolfin/demo/undocumented/elasticity/python$

I am trying to run this on the latest Ubuntu (12..)

Can someone help me? Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Scott Richardson
Solved:
Last query:
Last reply:
Revision history for this message
Scott Richardson (scott-richardson-personal) said :
#1

OK I changed "CG" to "Lagrange" and elasticity works fine. Will check the rest tomorrow, but for now it seems hopefull!

Revision history for this message
Scott Richardson (scott-richardson-personal) said :
#2

OK I changed "CG" to "Lagrange" and elasticity works fine. Will check the rest tomorrow, but for now it seems hopefull!

Revision history for this message
Johan Hake (johan-hake) said :
#3

you need to run your problem in a directory which you have write
permissions to. Try:

cd
mkdir dolfin_demos
cd dolfin_demos
cp -r /usr/share/dolfin/demo/* .
cd undocumented/elasticity/python
python demo_elasticity.py

Johan

On 06/17/2012 10:21 PM, Scott Richardson wrote:
> New question #200714 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/200714
>
> Hello, I am having a problem running most of the demo problems. But I can run a couple. Here's what I get when I try to run the elasticity demo problem:
>
> scottr99@scottr99-HP-Pavilion-dm4-Notebook-PC:/usr/share/dolfin/demo/undocumented/elasticity/python$ python demo_elasticity.py
> Calling FFC just-in-time (JIT) compiler, this may take some time.
> Traceback (most recent call last):
> File "demo_elasticity.py", line 31, in<module>
> V = VectorFunctionSpace(mesh, "CG", 1)
> File "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", line 505, in __init__
> FunctionSpaceBase.__init__(self, mesh, element)
> File "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", line 77, in __init__
> ufc_element, ufc_dofmap = jit(self._ufl_element)
> File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", line 66, in mpi_jit
> return local_jit(*args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", line 154, in jit
> return jit_compile(form, parameters=p, common_cell=common_cell)
> File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 71, in jit
> return jit_element(ufl_object, parameters)
> File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 178, in jit_element
> compiled_form, module, form_data, prefix = jit_form(form, parameters)
> File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 130, in jit_form
> common_cell=common_cell)
> File "/usr/lib/python2.7/dist-packages/ffc/compiler.py", line 175, in compile_form
> format_code(code, wrapper_code, prefix, parameters)
> File "/usr/lib/python2.7/dist-packages/ffc/formatting.py", line 107, in format_code
> _write_file(code_h, prefix, ".h", parameters)
> File "/usr/lib/python2.7/dist-packages/ffc/formatting.py", line 130, in _write_file
> hfile = open(filename, "w")
> IOError: [Errno 13] Permission denied: './ffc_form_68a7216c25aa80e752f19dff9ae71c20c6fc3b3c.h'
> scottr99@scottr99-HP-Pavilion-dm4-Notebook-PC:/usr/share/dolfin/demo/undocumented/elasticity/python$
>
> I am trying to run this on the latest Ubuntu (12..)
>
> Can someone help me? Thank you.
>
>

Revision history for this message
jay reno (jayreno33) said :
#4

I had the similar error on Ubuntu 12.04 LTS ( running via virtual box).
However if I run the program using : Sudo python demo_poisson.py, it works fine.

Revision history for this message
Anders Logg (logg) said :
#5

Jay, you should not run the demos using sudo. See comment from Johan Hake.