Changeset 12369
- Timestamp:
- 06/05/12 10:28:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/clusters/pfe.m
r12363 r12369 145 145 end 146 146 end %}}} 147 function LaunchQueueJob(cluster,md,options)% {{{ 148 147 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{ 148 149 %compress the files into one zip. 150 compressstring=['tar -zcf ' dirname '.tar.gz ' modelname '.bin ' modelname '.queue ' modelname '.petsc ']; 151 for i=1:numel(filelist), 152 compressstring = [compressstring ' ' filelist{i}]; 153 end 154 if cluster.interactive, 155 compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog ']; 156 end 157 system(compressstring); 158 159 disp('uploading input file and queueing script'); 160 if cluster.interactive, 161 directory=[cluster.executionpath '/Interactive' num2str(cluster.interactive)]; 162 else 163 directory=cluster.executionpath; 164 end 165 166 if ~cluster.bbftp, 167 issmscpout(cluster.name,directory,cluster.login,cluster.port,{[dirname '.tar.gz']}); 168 else 169 issmbbftpout(cluster.name,directory,cluster.login,cluster.port,cluster.numstreams,{[dirname '.tar.gz']}); 170 end 171 149 172 %lauch command, to be executed via ssh 150 173 if ~cluster.interactive, 151 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' md.private.runtimename ' && mkdir ' md.private.runtimename ... 152 ' && cd ' md.private.runtimename ' && mv ../' md.private.runtimename '.tar.gz ./ && tar -zxf ' md.private.runtimename '.tar.gz && qsub ' md.miscellaneous.name '.queue ']; 153 else 154 launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive) ' && tar -zxf ' md.private.runtimename '.tar.gz']; 155 end 156 157 if ~strcmpi(options.batch,'yes'), 158 159 %compress the files into one zip. 160 compressstring=['tar -zcf ' md.private.runtimename '.tar.gz ' md.miscellaneous.name '.bin ' md.miscellaneous.name '.queue ' md.miscellaneous.name '.petsc ']; 161 if md.qmu.isdakota, 162 compressstring=[compressstring md.miscellaneous.name '.qmu.in ']; 163 end 164 if cluster.interactive, 165 compressstring=[compressstring md.miscellaneous.name '.run ' md.miscellaneous.name '.errlog ' md.miscellaneous.name '.outlog ']; 166 end 167 system(compressstring); 168 169 disp('uploading input file and queueing script'); 170 if cluster.interactive, 171 directory=[cluster.executionpath '/Interactive' num2str(cluster.interactive)]; 172 else 173 directory=cluster.executionpath; 174 end 175 176 if ~cluster.bbftp, 177 issmscpout(cluster.name,directory,cluster.login,cluster.port,{[md.private.runtimename '.tar.gz']}); 178 else 179 issmbbftpout(cluster.name,directory,cluster.login,cluster.port,cluster.numstreams,{[md.private.runtimename '.tar.gz']}); 180 end 181 182 disp('launching solution sequence on remote cluster'); 183 issmssh(cluster.name,cluster.login,cluster.port,launchcommand); 184 185 else 186 disp('batch mode requested: not launching job interactively'); 187 disp('launch solution sequence on remote cluster by hand'); 188 end 174 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 175 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 176 else 177 launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive) ' && tar -zxf ' dirname '.tar.gz']; 178 end 179 180 disp('launching solution sequence on remote cluster'); 181 issmssh(cluster.name,cluster.login,cluster.port,launchcommand); 189 182 end 190 183 %}}}
Note:
See TracChangeset
for help on using the changeset viewer.