When training a neural net implemented in Keras in a screen session, I appear to be running into race conditions with Theano.
I proceed as follows. I ssh into the compute cluster I am using (which I am not a root user of).
Then I run:
screen -S model1
Then, once I'm in this screen session, I run the Python script which trains my model. I detach the screen (Ctrl+A+D), and when I do screen -r, everything is fine. However, if I exit my ssh session before I run screen -r, and run screen -r upon logging back in, then I get the following error:
compilelock.py", line 91, in get_lock
File "~/.local/lib/python2.7/site-packages/theano/gof/compilelock.py", line 275, in lock
OSError: [Errno 13] Permission denied: '~/.theano/compiledir_Linux-3.11--generic-x86_64-with-Ubuntu-13.10-saucy-x86_64-2.7.5+-64/lock_dir'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "~/.local/lib/python2.7/site-packages/theano/gof/cmodule.py", line 1344, in _on_atexit
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "~/.local/lib/python2.7/site-packages/theano/gof/compilelock.py", line 54, in lock_ctx
File "~/.local/lib/python2.7/site-packages/theano/gof/compilelock.py", line 91, in get_lock
File "~/.local/lib/python2.7/site-packages/theano/gof/compilelock.py", line 275, in lock
OSError: [Errno 13] Permission denied: '~/.theano/compiledir_Linux-3.11--generic-x86_64-with-Ubuntu-13.10-saucy-x86_64-2.7.5+-64/lock_dir'
Does anyone know why this happens? It's interesting that it only happens when I logout and try to run screen -r after logging in.