0001 function LaunchQueueJobcosmos(md,executionpath)
0002
0003
0004
0005
0006
0007
0008 if ~exist([ md.name '.bin'],'file'),
0009 error('LaunchQueueJobcosmos error message: Binary input file missing, cannot go forward');
0010 end
0011
0012 if ~exist([ md.name '.queue'],'file'),
0013 error('LaunchQueueJobcosmos error message: queueing script issing, cannot go forward');
0014 end
0015
0016
0017
0018
0019
0020
0021
0022 cosmosvariableslocation=which('cosmosvariables.sh');
0023 if isempty(cosmosvariableslocation),
0024 error('LaunchQueueJobcosmos error message: could not find environment variables for cosmos cluster!');
0025 end
0026
0027
0028 disp('uploading input file, queueing script and variables script');
0029 eval(['!scp ' md.name '.bin' ' ' md.name '.queue ' cosmosvariableslocation ' ' md.cluster ':' executionpath]);
0030
0031 disp('launching solution sequence on remote cluster');
0032
0033 system(['ssh ' md.cluster ' ''cd ' executionpath ' && source ./cosmosvariables.sh && bsub < ' md.name '.queue && rm cosmosvariables.sh ''']);