Tuesday, May 22, 2012

Getting around Matlab pool's StorageLocation error

I just spent several hours trying to figure out why I couldn't open a Matlab pool on one of my research group's computers.  I kept getting an error like this:

> matlabpool open
Starting matlabpool using the 'local' configuration ... stopped.
Error using matlabpool (line 136)
Failed to open matlabpool. (For information in addition to the causing error, validate the configuration 'local' in the Configurations Manager.)
Caused by:
    Error using distcomp.interactiveclient/start (line 88)
    Failed to start matlabpool.
    This is caused by:
    You do not have permission to write to the current StorageLocation: /afs/dir/blah
        You should change directory to somewhere where you do have write permission

I do have write privileges to /afs/dir/blah, so I wasn't sure what Matlab was complaining about.  Perhaps it was something to do with afs, I thought.  So, I worked around it by doing this:

sched = findResource('scheduler', 'type', 'local')

Then, everything proceeds as normal:

>> matlabpool open
Starting matlabpool using the 'local' configuration ... connected to 12 labs.

I hope this post saves someone else some time!