Changeset 1584
- Timestamp:
- 08/05/09 13:58:13 (16 years ago)
- Location:
- issm/trunk/src/m/classes/public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/LaunchQueueJobGeneric.m
r1464 r1584 14 14 end 15 15 16 if ispc,17 SCP='winscp';18 else19 SCP='scp';20 end21 22 16 if ~strcmpi(options.batch,'yes'), 23 17 24 %if we are running locally, no need to call ssh to launch the job. We figure out by comparing the 25 %hostname to the cluster name 26 [result,hostname]=system('hostname -s');hostname=hostname(1:end-1); 27 disp('uploading input file and queueing script'); 28 if strcmpi(hostname,md.cluster), 29 if md.qmu_analysis, 30 system(['cp ' md.name '.bin' ' ' md.name '.queue ' md.name '.qmu.in ' ' ' executionpath]); 31 else 32 system(['cp ' md.name '.bin' ' ' md.name '.queue' ' ' executionpath]); 33 end 34 else 35 if md.qmu_analysis, 36 system([SCP ' -v ' md.name '.bin' ' ' md.name '.queue ' md.name '.qmu.in ' ' ' md.cluster ':' executionpath]); 37 else 38 system([SCP ' -v ' md.name '.bin' ' ' md.name '.queue' ' ' md.cluster ':' executionpath]); 39 end 18 %what files are we sending? 19 packages={[md.name '.bin'],[md.name '.queue']}; 20 if md.qmu_analysis, 21 packages{end+1}=[md.name '.qmu.in ']; 40 22 end 41 23 24 disp('uploading input file and queueing script'); 25 scpout(md.cluster,executionpath,packages); 26 42 27 disp('launching solution sequence on remote cluster'); 43 %now call the queuing script to launch the job. 44 if strcmpi(hostname,md.cluster), 45 system(['cd ' executionpath ' && source ' md.name '.queue ']); 46 else 47 system(['ssh ' md.cluster ' ''cd ' executionpath ' && source ' md.name '.queue ''']); 28 issmssh(md.cluster,['cd ' executionpath ' && source ' md.name '.queue ']); 29 30 %waitonlock will work if the lock is on the same machine only: 31 if ~strcmpi(hostname,md.cluster), 32 disp('solution launched on remote cluster. log in to detect job completion, then run md=loadresultsfromcluster(md)'); 33 md.waitonlock=0; 48 34 end 49 35 … … 54 40 md.waitonlock=0; 55 41 end 56 57 -
issm/trunk/src/m/classes/public/loadresultsfromcluster.m
r1111 r1584 11 11 [codepath,executionpath]=ClusterParameters(md.cluster,cluster_rc_location); 12 12 13 %if we are running locally, no need to call ssh to recover the logs and results. We figure out by comparing the 14 %hostname to the cluster name 15 [result,hostname]=system('hostname -s');hostname=hostname(1:end-1); 13 %What packages are we picking up from remote cluster 14 packages={[md.name '.outlog'],[md.name '.errlog'], [md.name '.outbin']}; 15 if md.qmu_analysis, 16 packages{end+1}=[md.name '.qmu.err']; 17 packages{end+1}=[md.name '.qmu.out']; 18 packages{end+1}='dakota_tabular.dat'; 19 end 16 20 17 %Go pickup output file and logs on cluster 18 if strcmpi(hostname,md.cluster), 19 if md.qmu_analysis, 20 system(['cp ' executionpath '/' md.name '.outlog ' executionpath '/' md.name '.errlog ' executionpath '/' md.name '.outbin ' executionpath '/' md.name '.qmu.err ' executionpath '/' md.name '.qmu.out ' executionpath '/dakota_tabular.dat ./']); %get outlog, errlog and outbin files 21 else 22 system(['cp ' executionpath '/' md.name '.outlog ' executionpath '/' md.name '.errlog ' executionpath '/' md.name '.outbin ./']); %get outlog, errlog and outbin files 23 end 24 else 25 if md.qmu_analysis, 26 system(['scp ' md.cluster ':' executionpath '/' md.name '.outlog ' md.cluster ':' executionpath '/' md.name '.errlog ' md.cluster ':' executionpath '/' md.name '.outbin ' md.cluster ':' executionpath '/' md.name '.qmu.err ' md.cluster ':' executionpath '/' md.name '.qmu.out ' md.cluster ':' executionpath '/dakota_tabular.dat ./']); %get outlog, errlog and outbin files 27 else 28 system(['scp ' md.cluster ':' executionpath '/' md.name '.outlog ' md.cluster ':' executionpath '/' md.name '.errlog ' md.cluster ':' executionpath '/' md.name '.outbin ./']); %get outlog, errlog and outbin files 29 end 30 end 21 %copy files from cluster to present directory 22 scpin(md.cluster, executionpath, packages); 31 23 32 24 %read log files onto fields
Note:
See TracChangeset
for help on using the changeset viewer.