I am running a code which includes a loop where I am splitting my task and sending it using qsub as different jobs. For eg I am calling:
function searchweights()
startup
distrJobs('UseMAR',false);
distrJobs('UseMAR',true);
end;
function distrJobs(varargin)
fprintf('entered distrJobs');
UseMAR = false;
w = {[0,3.^(-9:0)],[0,2.^(-7:1)]}; % grids
for i = 1:2:numel(varargin)
if strcmp(varargin{i},'wgrid'), w = varargin{i+1}; end
if strcmp(varargin{i},'UseMAR'), UseMAR = varargin{i+1}; end
end
fprintf(' get cross validation accuracy for each grid point');
[w1,w2] = ndgrid(w{1},w{2});
n = numel(w1);
for i = 1%:n
command = sprintf('qsub optionFile "crossvalid([%f,%f],''Xpred.mat'',''/data5/natraj/SWeight/SWeight_%d_%d.mat'',%d)"', w1(i), w2(i), UseMAR, i, UseMAR)
system(command);
end;
end;
and my crossvalid function goes like:
function crossvalid(w,infile,outfile, UseMAR)
startup
load(infile);
[A,R] = sbu.ClothParser.cross_validation(X, 'weights',[w(1),w(2)], 'UseMAR', UseMAR);
save( outfile, 'A', 'R');
end;
But after I run my searchweights function, the qsub command doesn't seem to run at all i.e it doesn't go into the "crossvalid" function. It gives this error in the error file: /data5/natraj/matlab2012a/bin/matlab: No match.
*(/data5/natraj/matlab2012a/bin/matlab is my matlab executable)
I am not getting what is really causing this error and how can I rule this out?
The operating system is Linux.
EDIT: The problem seems to be with qsub. When I run the same for loop using parfor, it is running.