MATLAB: Parallel computing on a cluster

clustermatlab 2014aParallel Computing Toolboxparforsubmat

I have a script test.m that includes parfor-loops.
In MATLAB 2014a on my personal computer it runs the parallel job perfectly.
On a huge Linux computer cluster it runs test.m perfectly if I have started MATLAB 2014a graphically through X on the frontend.
However, when submitting test.m to the queue it discards the parallelness and runs everything as in for-loops — on a single core on the given node.
What I write:
>> submat -q q12 test.m
q12 is the queue name.
Anyone with a clue??

Best Answer

My guess is that when you queue it, it launches MATLAB without Java. Java is required to use PCT. That also explains why it works fine when you X11 forward MATLAB. See below:
"The client session of MATLAB must be running the Java® Virtual Machine (JVM™) to use Parallel Computing Toolbox software."