Torque Cluster Jobs Submitted, Not Executed

1 view (last 30 days)
Laura
Laura on 3 Jan 2014
Answered: Edric Ellis on 6 Jan 2014
I have a Debian machine with Torque installed (with a Maui scheduler), and I am trying to submit jobs to this cluster from Matlab. Although my jobs are submitted and Torque sees them, by the time they get to Torque they are simple programs that merely open and close Matlab, my scripts are lost somewhere in the process.
My cluster set-up code is as follows:
jm = findResource('scheduler','type','torque');
set(jm,'ClusterMatlabRoot','/usr/local/MATLAB/R2011b');
set(jm,'DataLocation',[homePath 'scratch']);
set(jm, 'RshCommand', 'rsh -o StrictHostKeyChecking=no');
...
job = createJob(jm);
createTask(job, @disp, 0, {'Never Printed'}); //I have tried this with scripts that manipulate files as well, neither are executed
submit(job);
And my Torque output is shown below. As you can see 'Never Printed' is never printed. It's as though I supplied an empty function instead of disp.
Created directory: /tmp/146810.viola108.tch.harvard.edu on cello166
Executing: /usr/local/MATLAB/R2011b/bin/worker
< M A T L A B (R) >
Copyright 1984-2011 The MathWorks, Inc.
R2011b (7.13.0.564) 64-bit (glnxa64)
August 13, 2011
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
2014-01-01 20:44:06 | About to exit MATLAB normally
MATLAB exited with code: 0
Removed /tmp/146810.viola108.tch.harvard.edu

Answers (1)

Edric Ellis
Edric Ellis on 6 Jan 2014
Your message is not expected to be printed in that log file - rather, it should show up in the CommandWindowOutput property of your task. You should say something like this:
task = createTask( ... );
task.CaptureCommandWindowOuput = true;
submit(job); wait(job);
disp(task.CommandWindowOutput)
You might also find the following adds some useful diagnostics to your log file (call this before creating and submitting the job):
setenv('MDCE_DEBUG', 'true');

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!