Update: With Ubuntu 13.10 swig was noti installed (no idea why). Thus, I had to install it. After that, I was able to run the demos. Again, the process was successful only with a sudo, that is:
sudo python demo_xxx.py Thus, the last (maybe trivial, but for a newbie like me not trivial at all) question is how to get the program compile without the sudo. Thank you, Rauno 2014-03-07 12:45 GMT-08:00 Rauno Cavallaro <[email protected]>: > Hi, > > I maybe figured out what was wrong. > Fist let me clarify that the output I posted yesterday was on a UBUNTU > 13.10, whereas the output I post now is relative to an UBUNTU 12.04. > They are very very similar, however the one relative to the 12.04 version > gave me the input to fix the issue. > > rauno@ps231calpha:~/dolfin-demos/documented/stokes-stabilized/python$ > python demo_stokes-stabilized.py > Traceback (most recent call last): > File "demo_stokes-stabilized.py", line 39, in <module> > scalar = FunctionSpace(mesh, "CG", 1) > File > "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", line > 403, in __init__ > FunctionSpaceBase.__init__(self, mesh, element, constrained_domain) > File > "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", line > 84, in __init__ > ufc_element, ufc_dofmap = jit(self._ufl_element) > File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", > line 60, in mpi_jit > return local_jit(*args, **kwargs) > File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", > line 122, in jit > return jit_compile(form, parameters=p, common_cell=common_cell) > File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 76, in > jit > return jit_element(ufl_object, parameters) > File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 252, in > jit_element > compiled_form, module, form_data, prefix = jit_form(form, parameters) > File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 179, in > jit_form > module = instant.import_module(module_name, cache_dir=cache_dir) > File "/usr/lib/python2.7/dist-packages/instant/cache.py", line 156, in > import_module > return check_disk_cache(modulename, cache_dir, moduleids) > File "/usr/lib/python2.7/dist-packages/instant/cache.py", line 113, in > check_disk_cache > lock = get_lock(cache_dir, modulename) > File "/usr/lib/python2.7/dist-packages/instant/locking.py", line 81, in > get_lock > lock = open(os.path.join(cache_dir, lockname), "w") > IOError: [Errno 13] Permission denied: > '/home/rauno/.instant/cache/ffc_form_fca4b6ffb2fc6e2e2de21f0bd1c9de03ea2f593c.lock' > > I then tried to launch the python command with a sudo, and: > > rauno@ps231calpha:~/dolfin-demos/documented/stokes-stabilized/python$ > sudo python demo_stokes-stabilized.py > Calling FFC just-in-time (JIT) compiler, this may take some time. > Calling FFC just-in-time (JIT) compiler, this may take some time. > Calling FFC just-in-time (JIT) compiler, this may take some time. > Calling DOLFIN just-in-time (JIT) compiler, this may take some time. > Calling FFC just-in-time (JIT) compiler, this may take some time. > Calling FFC just-in-time (JIT) compiler, this may take some time. > Solving linear variational problem. > > I think this will be successful also on Ubuntu 13.10, I will tell you > later when I am back home. > May be not relevant but: > > rauno@ps231calpha:~/dolfin-demos/documented/stokes-stabilized/python$ > swig -version > SWIG Version 2.0.4 > Compiled with g++ [x86_64-unknown-linux-gnu] > Configured options: +pcre > Please see http://www.swig.org for reporting bugs and further information > > Just to conclude this topic, what should I do (I guess I have to use some > chmod) to avoid to run python with sudo? > Thank you, > Rauno > > > 2014-03-07 2:38 GMT-08:00 Johannes Ring <[email protected]>: > > On Fri, Mar 7, 2014 at 11:27 AM, Rauno Cavallaro <[email protected]> >> wrote: >> > Well, I followed what you suggested. >> > Unfortunately, it is still not working: >> > >> > ~/dolfin-demos/documented/stokes-stabilized/python$ python >> > demo_stokes-stabilized.py >> > Traceback (most recent call last): >> > File "demo_stokes-stabilized.py", line 39, in <module> >> > scalar = FunctionSpace(mesh, "CG", 1) >> > File >> "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", >> > line 403, in __init__ >> > FunctionSpaceBase.__init__(self, mesh, element, constrained_domain) >> > File >> "/usr/lib/python2.7/dist-packages/dolfin/functions/functionspace.py", >> > line 84, in __init__ >> > ufc_element, ufc_dofmap = jit(self._ufl_element) >> > File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", >> line >> > 60, in mpi_jit >> > return local_jit(*args, **kwargs) >> > File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", >> line >> > 122, in jit >> > return jit_compile(form, parameters=p, common_cell=common_cell) >> > File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 76, >> in >> > jit >> > return jit_element(ufl_object, parameters) >> > File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 252, >> in >> > jit_element >> > compiled_form, module, form_data, prefix = jit_form(form, >> parameters) >> > File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 175, >> in >> > jit_form >> > module_name = "ffc_form_" + jit_object.signature() >> > File "/usr/lib/python2.7/dist-packages/ffc/jitobject.py", line 91, in >> > signature >> > swig_signature = str(get_swig_version()) >> > File "/usr/lib/python2.7/dist-packages/instant/config.py", line 47, in >> > get_swig_version >> > result, output = get_status_output("%s -version"%get_swig_binary()) >> > File "/usr/lib/python2.7/dist-packages/instant/output.py", line 82, in >> > get_status_output >> > pipe = Popen(cmd, shell=False, cwd=cwd, env=env, stdout=PIPE, >> > stderr=STDOUT) >> > File "/usr/lib/python2.7/subprocess.py", line 709, in __init__ >> > errread, errwrite) >> > File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child >> > raise child_exception >> > OSError: [Errno 2] No such file or directory >> > >> > >> > I tried again and c++ version of the same demo runs perfectly. >> > Do you have any other idea? >> >> At least it's a different error this time. It looks like some file is >> missing. Do you have the same problem when running other Python demos? >> What do you get when you run "swig -version"? Which version of Ubuntu >> are you on? >> >> Johannes >> > >
_______________________________________________ fenics-support mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics-support
