Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I keep getting the permission denial error: IOError: [Errno 13] Permission denied, when I try running making a function space.

I think it it something to do with the JIT compiler. Somehow, all the compiling is done in root and when it tries reading the permission is denied.

Here is the log of the error I get:

lento@lento-VPCF11C5E:~/Documents/Thesis/programs/navierstokes$ python test_navierStokes.py 
Traceback (most recent call last):
  File "test_navierStokes.py", line 104, in <module>
    N=np.array([nx,ny]))
  File "/home/lento/Documents/Thesis/programs/navierstokes/navierStokes.py", line 145, in __init__
    self._nu,self._cfl,self._uMax)
  File "/home/lento/Documents/Thesis/programs/navierstokes/base/ipcs.py", line 129, in __init__
    super(ipcs,self).__init__(mesh,boundaryDomains,nu,cfl,uMax)
  File "/home/lento/Documents/Thesis/programs/navierstokes/base/solverBase.py", line 68, in __init__
    self.boundary_DOFCoordinates, self.boundary_VectorDOFIndex = boundary.locate_boundaryDOFs(self.mesh,self.boundaryDomains,3)     
  File "/home/lento/Documents/Thesis/programs/navierstokes/base/boundary.py", line 125, in locate_boundaryDOFs
    V = dolfin.FunctionSpace(mesh, "CG", p)
  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/lento/.instant/cache/ffc_form_3d305e9085738f267ea73581b5f0769fda1e332d.lock'
share|improve this question
add comment

1 Answer

You shouldn't compile stuff as root. Compiling doesn't need root. root is only to install and if you are going to install in your $HOME directory you shouldn't use root since it's your $HOME, not root's. You should just change the permissions of the stuff you compiled as root.

sudo chwon -R $USER:$USER ~/.instant
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.