Commit 45c9de42 authored by Tyler Collins's avatar Tyler Collins
Browse files

Special case for job format with -'s

parent 724807e9
......@@ -40,7 +40,7 @@ function out = format_scheduler(~, job_spec)
%if ~isempty(job_spec.job_init)
% out = [out job_spec.job_init];
%end
out = sprintf('%s sbatch', out);
out = sprintf('%ssbatch', out);
if ~isempty(job_spec.name)
out = sprintf('%s --job-name=%s', out, job_spec.name);
end
......@@ -110,6 +110,16 @@ function out = format_scheduler(~, job_spec)
'UniformOutput', false);
poptions_string = [poptions_string{:}];
% The '-' in the mfile_name were changed to '_' earlier...
% the following lines ensurethat we have the correct mfile_name
[mpath,mname,ext] = fileparts(job_spec.mfile_name);
mname = strrep(mname,'-','_'); % only replace the '-' from the filename, not the path
job_spec.mfile_name = [mpath,'/',mname,ext];
if job_spec.is_octave
out = sprintf('%s <(echo -e ''#!/bin/bash%s%s %s%s %s'')\n', ...
out, '\n', job_spec.program, poptions_string, wrapper, job_spec.mfile_name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment