Copy both
    gpu_lock.py
    run_on_me_or_pid_quit
to a convenient directory. You'll want them on your $PYTHONPATH if you want to
import gpu_lock.py as a module, or just on your $PATH if you're happy shelling
gpu_lock.py as an executable.

If you are a Matlab user also copy obtain_gpu_lock_id.m into the same directory
and use that to get lock IDs.

Personally I also make a sym-link
    ln -s gpu_lock.py gpu_lock
which is a prettier command to call (I still need the .py file to be able to
import it as a Python module though.)

The other files give examples of how to shell gpu_lock.py to obtain and lock a
GPU id.

For more information, run gpu_lock.py with no arguments. For even more
information, see:
    http://www.cs.toronto.edu/~murray/code/gpu_monitoring/



--------------------------------------------------------------------------------
Toronto users: alias the version in my bin directory:
    ~/murray/bin/gpu_lock.py
Then you will automatically get bug-fixes. If you sym-link it somewhere, also
create a sym-link to:
    ~/murray/bin/run_on_me_or_pid_quit
--------------------------------------------------------------------------------


      Name                    Last modified      Size  Description
run_on_me_or_pid_quit 2010-01-13 02:52 677 obtain_gpu_lock_id.m 2011-01-24 11:51 1.3K matlab_notes 2009-11-27 17:30 533 gpu_lock.py 2011-01-24 11:51 4.8K example2.py 2009-11-27 17:27 140 example.sh 2009-11-27 17:27 121 example.py 2009-11-27 17:27 177