Commit 77fa3e45 authored by Brad Kennedy's avatar Brad Kennedy
Browse files

Fixed bug in format scheduler for sqsub and updated pop_runhtb for matlab 2015

parent ed48843c
......@@ -61,7 +61,7 @@ function out = format_scheduler(~, job_spec)
if ~isempty(job_spec.timeseconds)
time_span = fix(job_spec.timeseconds);
% Always use hours
hours = time_span / 360;
hours = time_span / 3600;
out = sprintf('%s -r %fh', out, hours);
end
......
......@@ -314,22 +314,38 @@ for hi=1:length(htb_fname)
job_struct = make_job_dir(driver, job_struct);
%% EXECUTE/SUBMIT JOBS...
switch rsub_meth
case 'system'
job_struct = rsub_sys(job_struct, driver);
case 'ssh2'
disp('submitting jobs using sshfrommatlab...')
if isempty(password_sshfm)
password_sshfm = passwordEntryDialog(...
'WindowName', sprintf('Password for %s on %s', ...
context_config.remote_user_name, ...
context_config.remote_exec_host));
end
sshfm_opts.password = password_sshfm;
job_struct = rsub_sys(job_struct, driver, sshfm_opts);
case 'none'
disp('The job files are generated ... finished.');
% try: Matlab 2015 includes libcrypto.so which messes with the
% ssh on the system as it is included in the LD_LIBRARY_PATH on
% startup. We, therefore, remove it and restore afterwards however
% if an error occurs we still want to restore it. Note: If you need
% LD_LIBRARY_PATH here please open a ticket and we will make this
% more specific
try
ld_library_path_store = getenv('LD_LIBRARY_PATH');
setenv('LD_LIBRARY_PATH', '');
switch rsub_meth
case 'system'
job_struct = rsub_sys(job_struct, driver);
case 'ssh2'
disp('submitting jobs using sshfrommatlab...')
if isempty(password_sshfm)
password_sshfm = passwordEntryDialog(...
'WindowName', ...
sprintf('Password for %s on %s', ...
context_config.remote_user_name, ...
context_config.remote_exec_host));
end
sshfm_opts.password = password_sshfm;
job_struct = rsub_sys(job_struct, driver, sshfm_opts);
case 'none'
disp('The job files are generated ... finished.');
end
catch err
setenv('LD_LIBRARY_PATH', ld_library_path_store);
rethrow(err);
end
ld_library_path_store = getenv('LD_LIBRARY_PATH');
end
end
......
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