Changeset 19335
- Timestamp:
- 04/30/15 16:34:55 (10 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/clusters/acenet.m
r19328 r19335 131 131 132 132 end %}}} 133 function LaunchQueueJob(cluster,modelname,dirname,filelist )% {{{133 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart)% {{{ 134 134 135 135 disp('launching solution sequence on remote cluster'); 136 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 137 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 136 if ~isempty(restart) 137 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && qsub ' modelname '.queue ']; 138 else 139 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 140 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 141 end 138 142 issmssh(cluster.name,cluster.login,cluster.port,launchcommand); 139 143 end %}}} -
issm/trunk-jpl/src/m/classes/clusters/castor.m
r19328 r19335 86 86 87 87 end %}}} 88 function LaunchQueueJob(cluster,modelname,dirname,filelist )% {{{88 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart)% {{{ 89 89 90 90 disp('launching solution sequence on remote cluster'); 91 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 92 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 91 if ~isempty(restart) 92 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && qsub ' modelname '.queue ']; 93 else 94 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 95 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 96 end 93 97 issmssh(cluster.name,cluster.login,cluster.port,launchcommand); 94 98 end %}}} -
issm/trunk-jpl/src/m/classes/clusters/cloud.m
r19328 r19335 81 81 82 82 end %}}} 83 function LaunchQueueJob(cluster,modelname,dirname,filelist )% {{{83 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart)% {{{ 84 84 85 85 if cluster.interactive, 86 86 disp('sending files to remote cluster. once done, please log into cluster and launch job'); 87 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 88 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz ']; 87 if ~isempty(restart) 88 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname]; 89 else 90 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 91 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz ']; 92 end 89 93 else 90 94 disp('launching solution sequence on remote cluster'); 91 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 92 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 95 if ~isempty(restart) 96 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && qsub ' modelname '.queue ']; 97 else 98 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 99 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 100 end 93 101 end 94 102 issmstssh(cluster.name,cluster.login,launchcommand); -
issm/trunk-jpl/src/m/classes/clusters/cosmos.m
r19328 r19335 86 86 87 87 end %}}} 88 function LaunchQueueJob(cluster,modelname,dirname,filelist )% {{{88 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart)% {{{ 89 89 90 90 disp('launching solution sequence on remote cluster'); 91 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 92 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 91 if ~isempty(restart) 92 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && qsub ' modelname '.queue ']; 93 else 94 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 95 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 96 end 93 97 issmssh(cluster.name,cluster.login,cluster.port,launchcommand); 94 98 end %}}} -
issm/trunk-jpl/src/m/classes/clusters/discover.m
r19328 r19335 163 163 end 164 164 %}}} 165 function LaunchQueueJob(cluster,modelname,dirname,filelist )% {{{165 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart)% {{{ 166 166 167 167 if ~cluster.interactive, 168 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 169 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 170 else 171 launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive) ' && tar -zxf ' dirname '.tar.gz']; 168 if ~isempty(restart) 169 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && qsub ' modelname '.queue ']; 170 else 171 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 172 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 173 end 174 else 175 if ~isempty(restart) 176 launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive)]; 177 else 178 launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive) ' && tar -zxf ' dirname '.tar.gz']; 179 end 172 180 end 173 181 -
issm/trunk-jpl/src/m/classes/clusters/gemini.m
r19328 r19335 87 87 88 88 end %}}} 89 function LaunchQueueJob(cluster,modelname,dirname,filelist )% {{{89 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart)% {{{ 90 90 91 91 disp('launching solution sequence on remote cluster'); 92 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 93 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 92 if ~isempty(restart) 93 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && qsub ' modelname '.queue ']; 94 else 95 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 96 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 97 end 94 98 issmssh(cluster.name,cluster.login,cluster.port,launchcommand); 95 99 end %}}} -
issm/trunk-jpl/src/m/classes/clusters/generic.m
r19328 r19335 226 226 end 227 227 end %}}} 228 function LaunchQueueJob(cluster,modelname,dirname,filelist )% {{{228 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart)% {{{ 229 229 230 230 if ~ispc, … … 238 238 239 239 if cluster.verbose, disp('launching solution sequence on remote cluster'); end 240 launchcommand=['source ' cluster.etcpath '/environment.' shellext ' && cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 241 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && source ' modelname '.queue ']; 240 241 if ~isempty(restart) 242 launchcommand=['source ' cluster.etcpath '/environment.' shellext ' && cd ' cluster.executionpath ' && cd ' dirname ' && source ' modelname '.queue ']; 243 else 244 launchcommand=['source ' cluster.etcpath '/environment.' shellext ' && cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 245 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && source ' modelname '.queue ']; 246 end 242 247 issmssh(cluster.name,cluster.login,cluster.port,launchcommand); 243 248 else 244 249 system([modelname '.bat']); 245 250 end 251 246 252 end %}}} 247 253 function Download(cluster,dirname,filelist)% {{{ -
issm/trunk-jpl/src/m/classes/clusters/generic.py
r19328 r19335 176 176 177 177 # }}} 178 def LaunchQueueJob(self,modelname,dirname,filelist ): # {{{178 def LaunchQueueJob(self,modelname,dirname,filelist,restart): # {{{ 179 179 180 180 print 'launching solution sequence on remote cluster' 181 launchcommand='cd %s && rm -rf ./%s && mkdir %s && cd %s && mv ../%s.tar.gz ./ && tar -zxf %s.tar.gz && chmod 777 %s.queue && ./%s.queue' % \ 182 (self.executionpath,dirname,dirname,dirname,dirname,dirname,modelname,modelname) 181 if restart: 182 launchcommand='cd %s && cd %s chmod 777 %s.queue && ./%s.queue' % (self.executionpath,dirname,modelname,modelname) 183 else: 184 launchcommand='cd %s && rm -rf ./%s && mkdir %s && cd %s && mv ../%s.tar.gz ./ && tar -zxf %s.tar.gz && chmod 777 %s.queue && ./%s.queue' % \ 185 (self.executionpath,dirname,dirname,dirname,dirname,dirname,modelname,modelname) 183 186 issmssh(self.name,self.login,self.port,launchcommand) 184 187 # }}} -
issm/trunk-jpl/src/m/classes/clusters/generic_static.m
r19328 r19335 66 66 %do nothing 67 67 end %}}} 68 function LaunchQueueJob(cluster,modelname,dirname,filelist )% {{{68 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart)% {{{ 69 69 70 70 if ~ispc, -
issm/trunk-jpl/src/m/classes/clusters/greenplanet.m
r19331 r19335 154 154 155 155 end %}}} 156 function LaunchQueueJob(cluster,modelname,dirname,filelist )% {{{156 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart)% {{{ 157 157 158 158 disp('launching solution sequence on remote cluster'); 159 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 160 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && hostname && qsub ' modelname '.queue ']; 159 if ~isempty(restart) 160 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && hostname && qsub ' modelname '.queue ']; 161 else 162 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 163 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && hostname && qsub ' modelname '.queue ']; 164 end 161 165 issmssh(cluster.name,cluster.login,cluster.port,launchcommand); 162 166 end %}}} -
issm/trunk-jpl/src/m/classes/clusters/hpc.m
r19328 r19335 148 148 149 149 end %}}} 150 function LaunchQueueJob(cluster,modelname,dirname,filelist )% {{{150 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart)% {{{ 151 151 152 152 disp('launching solution sequence on remote cluster'); 153 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 154 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && hostname && qsub ' modelname '.queue ']; 153 if ~isempty(restart) 154 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && hostname && qsub ' modelname '.queue ']; 155 else 156 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 157 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && hostname && qsub ' modelname '.queue ']; 158 end 155 159 issmssh(cluster.name,cluster.login,cluster.port,launchcommand); 156 160 end %}}} -
issm/trunk-jpl/src/m/classes/clusters/pfe.m
r19328 r19335 269 269 end 270 270 %}}} 271 function LaunchQueueJob(cluster,modelname,dirname,filelist )% {{{271 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart)% {{{ 272 272 273 273 %lauch command, to be executed via ssh 274 274 if ~cluster.interactive, 275 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 276 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 277 else 278 launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive) ' && tar -zxf ' dirname '.tar.gz']; 275 if ~isempty(restart) 276 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && qsub ' modelname '.queue ']; 277 else 278 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 279 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 280 end 281 else 282 if ~isempty(restart) 283 launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive)]; 284 else 285 launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive) ' && tar -zxf ' dirname '.tar.gz']; 286 end 279 287 end 280 288 -
issm/trunk-jpl/src/m/classes/clusters/pfe.py
r19328 r19335 169 169 170 170 # }}} 171 def LaunchQueueJob(self,modelname,dirname,filelist ):171 def LaunchQueueJob(self,modelname,dirname,filelist,restart): 172 172 # {{{ 173 173 174 174 print 'launching solution sequence on remote cluster' 175 launchcommand='cd %s && rm -rf ./%s && mkdir %s && cd %s && mv ../%s.tar.gz ./ && tar -zxf %s.tar.gz && qsub %s.queue' % (self.executionpath,dirname,dirname,dirname,dirname,dirname,modelname) 175 if restart: 176 launchcommand='cd %s && cd %s && qsub %s.queue' % (self.executionpath,dirname,modelname) 177 else: 178 launchcommand='cd %s && rm -rf ./%s && mkdir %s && cd %s && mv ../%s.tar.gz ./ && tar -zxf %s.tar.gz && qsub %s.queue' % (self.executionpath,dirname,dirname,dirname,dirname,dirname,modelname) 176 179 issmssh(self.name,self.login,self.port,launchcommand) 177 180 -
issm/trunk-jpl/src/m/classes/clusters/pollux.m
r19328 r19335 70 70 end 71 71 %}}} 72 function LaunchQueueJob(cluster,modelname,dirname,filelist )% {{{72 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart)% {{{ 73 73 74 74 disp('launching solution sequence on remote cluster'); 75 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 76 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 75 if ~isempty(restart) 76 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && qsub ' modelname '.queue ']; 77 else 78 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 79 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 80 end 77 81 issmssh(cluster.name,cluster.login,cluster.port,launchcommand); 78 82 end %}}} -
issm/trunk-jpl/src/m/solve/loadresultsfromcluster.m
r14622 r19335 38 38 delete([md.miscellaneous.name '.errlog']); 39 39 delete([md.miscellaneous.name '.outbin']); 40 if ~ispc(),40 if exist([md.private.runtimename '.tar.gz']) & ~ispc(), 41 41 delete([md.private.runtimename '.tar.gz']); 42 42 end -
issm/trunk-jpl/src/m/solve/solve.m
r19328 r19335 54 54 end 55 55 56 %If we are restarting, actually use the provided runtime name: 57 restart=getfieldvalue(options,'restart',''); 56 58 %First, build a runtime name that is unique 57 if getfieldvalue(options,'runtimename',true), 58 c=clock; 59 md.private.runtimename=sprintf('%s-%02i-%02i-%04i-%02i-%02i-%02i-%i',md.miscellaneous.name,c(2),c(3),c(1),c(4),c(5),floor(c(6)),feature('GetPid')); 59 if restart==1 60 %Leave the runtimename as is 60 61 else 61 md.private.runtimename=md.miscellaneous.name; 62 end 63 64 %If we are restarting, actually use the provided runtime name: 65 restart=getfieldvalue(options,'restart',''); 66 if ~isempty(restart), 67 md.private.runtimename=restart; 62 if ~isempty(restart), 63 md.private.runtimename=restart; 64 elseif getfieldvalue(options,'runtimename',true), 65 c=clock; 66 md.private.runtimename=sprintf('%s-%02i-%02i-%04i-%02i-%02i-%02i-%i',md.miscellaneous.name,c(2),c(3),c(1),c(4),c(5),floor(c(6)),feature('GetPid')); 67 else 68 md.private.runtimename=md.miscellaneous.name; 69 end 68 70 end 69 71 … … 107 109 108 110 %Upload all required files 111 modelname = md.miscellaneous.name; 112 filelist = {[modelname '.bin '] [modelname '.toolkits ']}; 113 if ispc, 114 filelist{end+1}=[modelname '.bat ']; 115 else 116 filelist{end+1}=[modelname '.queue ']; 117 end 118 119 if md.qmu.isdakota, 120 filelist{end+1} = [modelname '.qmu.in']; 121 end 122 109 123 if isempty(restart), 110 modelname = md.miscellaneous.name;111 filelist = {[modelname '.bin '] [modelname '.toolkits ']};112 if ispc,113 filelist{end+1}=[modelname '.bat '];114 else115 filelist{end+1}=[modelname '.queue '];116 end117 118 if md.qmu.isdakota,119 filelist{end+1} = [modelname '.qmu.in'];120 end121 124 UploadQueueJob(cluster,md.miscellaneous.name,md.private.runtimename,filelist); 122 125 end 123 126 124 127 %launch queue job: 125 LaunchQueueJob(cluster,md.miscellaneous.name,md.private.runtimename,filelist );128 LaunchQueueJob(cluster,md.miscellaneous.name,md.private.runtimename,filelist,restart); 126 129 127 130 %wait on lock -
issm/trunk-jpl/src/m/solve/solve.py
r19328 r19335 62 62 63 63 #First, build a runtime name that is unique 64 if options.getfieldvalue('runtimename',True):65 c=datetime.datetime.now()66 md.private.runtimename="%s-%02i-%02i-%04i-%02i-%02i-%02i-%i" % (md.miscellaneous.name,c.month,c.day,c.year,c.hour,c.minute,c.second,os.getpid())64 restart=options.getfieldvalue('restart','') 65 if restart == 1: 66 pass #do nothing 67 67 else: 68 md.private.runtimename=md.miscellaneous.name 69 70 #If we are restarting, actually use the provided runtime name: 71 restart=options.getfieldvalue('restart','') 72 if restart: 73 md.private.runtimename=restart 74 68 if restart: 69 md.private.runtimename=restart 70 else: 71 if options.getfieldvalue('runtimename',True): 72 c=datetime.datetime.now() 73 md.private.runtimename="%s-%02i-%02i-%04i-%02i-%02i-%02i-%i" % (md.miscellaneous.name,c.month,c.day,c.year,c.hour,c.minute,c.second,os.getpid()) 74 else: 75 md.private.runtimename=md.miscellaneous.name 76 75 77 #if running qmu analysis, some preprocessing of dakota files using models 76 78 #fields needs to be carried out. … … 102 104 103 105 #Upload all required files: 106 modelname = md.miscellaneous.name 107 filelist = [modelname+'.bin ',modelname+'.toolkits ',modelname+'.queue '] 108 if md.qmu.isdakota: 109 filelist.append(modelname+'.qmu.in') 110 104 111 if not restart: 105 modelname = md.miscellaneous.name106 filelist = [modelname+'.bin ',modelname+'.toolkits ',modelname+'.queue ']107 if md.qmu.isdakota:108 filelist.append(modelname+'.qmu.in')109 112 cluster.UploadQueueJob(md.miscellaneous.name,md.private.runtimename,filelist) 110 113 111 114 #Launch job 112 cluster.LaunchQueueJob(md.miscellaneous.name,md.private.runtimename,filelist )115 cluster.LaunchQueueJob(md.miscellaneous.name,md.private.runtimename,filelist,restart) 113 116 114 117 #wait on lock
Note:
See TracChangeset
for help on using the changeset viewer.