Changeset 12952
- Timestamp:
- 08/09/12 10:47:27 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/NightlyRun/runme.py
r12853 r12952 42 42 from parallelrange import parallelrange 43 43 from IdToName import IdToName 44 from MatlabFuncs import * 44 45 45 46 #Get ISSM_DIR variable … … 49 50 #Process options 50 51 #GET benchmark {{{1 51 if not benchmark.lower() in ['all','nightly','ismip','eismint','thermal','mesh','validation','tranforcing']:52 if not ismember(benchmark,['all','nightly','ismip','eismint','thermal','mesh','validation','tranforcing']): 52 53 print "runme warning: benchmark '%s' not supported, defaulting to test 'nightly'." % benchmark 53 54 benchmark='nightly' 54 55 # }}} 55 56 #GET procedure {{{1 56 if not procedure.lower() in ['check','update']:57 if not ismember(procedure,['check','update']): 57 58 print "runme warning: procedure '%s' not supported, defaulting to test 'check'." % procedure 58 59 procedure='check' 59 60 # }}} 60 61 #GET output {{{1 61 if not output.lower() in ['nightly','daily','none']:62 if not ismember(output,['nightly','daily','none']): 62 63 print "runme warning: output '%s' not supported, defaulting to test 'none'." % output 63 64 output='none' … … 107 108 108 109 #Process Ids according to benchmarks {{{1 109 if benchmark.lower() == 'nightly':110 if strcmpi(benchmark,'nightly'): 110 111 test_ids=test_ids.intersection(set(range(1,1000))) 111 elif benchmark.lower() == 'ismip':112 elif strcmpi(benchmark,'ismip'): 112 113 test_ids=test_ids.intersection(set(range(1101,1200))) 113 elif benchmark.lower() == 'eismint':114 elif strcmpi(benchmark,'eismint'): 114 115 test_ids=test_ids.intersection(set(range(1201,1300))) 115 elif benchmark.lower() == 'thermal':116 elif strcmpi(benchmark,'thermal'): 116 117 test_ids=test_ids.intersection(set(range(1301,1400))) 117 elif benchmark.lower() == 'mesh':118 elif strcmpi(benchmark,'mesh'): 118 119 test_ids=test_ids.intersection(set(range(1401,1500))) 119 elif benchmark.lower() == 'validation':120 elif strcmpi(benchmark,'validation'): 120 121 test_ids=test_ids.intersection(set(range(1001,2000))) 121 elif benchmark.lower() == 'tranforcing':122 elif strcmpi(benchmark,'tranforcing'): 122 123 test_ids=test_ids.intersection(set(range(1501,1503))) 123 124 # print 'test_ids after benchmark =',test_ids … … 139 140 #UPDATE ARCHIVE? 140 141 archive_name='Archive'+str(id) 141 if procedure.lower() == 'update':142 143 if not s ocket.gethostname().lower().split('.')[0] == 'larsen':142 if strcmpi(procedure,'update'): 143 144 if not strcmp(socket.gethostname().lower().split('.')[0],'larsen'): 144 145 # raise RuntimeError("Nightly run archives must be saved on 'larsen' (hostname is '"+socket.gethostname()+"').") 145 146 print "Nightly run archives must be saved on 'larsen' (hostname is '"+socket.gethostname()+"')." … … 200 201 directory=os.getcwd().split('/') # not used? 201 202 message=me2 202 if output.lower() == 'nightly':203 if strcmpi(output,'nightly'): 203 204 fid=open(os.path.join(ISSM_DIR,'nightlylog','matlaberror.log'), 'a') 204 205 fid.write('%s' % message) … … 206 207 fid.close() 207 208 print 'FAILURE difference: N/A test id: %i test name: %s field: %s' % (id,id_string,fieldname) 208 elif output.lower() == 'daily':209 elif strcmpi(output,'daily'): 209 210 fid=open(os.path.join(ISSM_DIR,'dailylog','matlaberror.log'), 'a') 210 211 fid.write('%s' % message) … … 223 224 directory=os.getcwd().split('/') # not used? 224 225 message=me 225 if output.lower() == 'nightly':226 if strcmpi(output,'nightly'): 226 227 fid=open(os.path.join(ISSM_DIR+'nightlylog','matlaberror.log'), 'a') 227 228 fid.write('%s' % message) … … 229 230 fid.close() 230 231 print 'FAILURE difference: N/A test id: %i test name: %s field: %s' % (id,id_string,'N/A') 231 elif output.lower() == 'daily':232 elif strcmpi(output,'daily'): 232 233 fid=open(os.path.join(ISSM_DIR+'dailylog','matlaberror.log'), 'a') 233 234 fid.write('%s' % message)
Note:
See TracChangeset
for help on using the changeset viewer.