-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjobDownload.m
More file actions
35 lines (33 loc) · 1.38 KB
/
Copy pathjobDownload.m
File metadata and controls
35 lines (33 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% Download your data
% Just enter your JobID which was given to you after running jobStart.m.
% Philipp Kortmann, 2018/04/17
% (C) Institut für Mechatronische Systeme, Leibniz Universität Hannover
function jobDownload(jobid)
if nargin == 0
jobid = 0;
end
assert(isa(jobid, 'double') && size(jobid,1)==1, ...
'jobid has to be 1xN double array of Job IDs');
% set up workspace
tbpath = fileparts(which('cluster_transfer_toolbox_path_init.m'));
addpath(fullfile(tbpath, 'functions')); % add subfunctions
addpath(fullfile(tbpath, 'functions', 'matlab-ssh'));
for jid = jobid(:)' % loop for downloading multiple jobs
%% general settings
[personalSettings, batchSettings] = userSettings(); % load user settings
personalSettings = jobAuthentication(personalSettings); % load personal authentication data
personalSettings = jobSettings(personalSettings, batchSettings); % load personal settings
setUpBasics(); % unzip external functions, etc.
%% download data
personalSettings.jobID = jid;
% get bool whether job has been completed yet
[jobDone, personalSettings, batchSettings] = checkIfJobIsDone(personalSettings, batchSettings);
if jobDone
downloadUserData(personalSettings, batchSettings);
else
disp('Job is not ready yet or has been aborted.');
end
end
%% clean up workspace
rmpath(fullfile(tbpath, 'functions'));
rmpath(fullfile(tbpath, 'functions', 'matlab-ssh'));