Changeset 12901 for fact/tools/pyscripts
- Timestamp:
- 02/17/12 14:34:56 (13 years ago)
- Location:
- fact/tools/pyscripts/tools
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/tools/fbsl.py
r12820 r12901 6 6 import numpy as np 7 7 8 import pyfact 8 import pyfact_rename 9 9 from myhisto import * 10 10 from hist import * … … 34 34 # rd.ReadBaseline( 'histo.root', 'bls_sum/hplt_mean' ) 35 35 36 rd.NEvents = 7 2536 rd.NEvents = 70 37 37 print 'processing N events ', rd.NEvents 38 38 step = 500 -
fact/tools/pyscripts/tools/submit.py
r12898 r12901 39 39 40 40 if len( options.fname ) == 0: 41 42 43 44 41 para_list = [ [ 'f12_1', 'f12_2', 'f12_3' ], 42 [ 'f13_1', 'f13_2', 'f13_3' ], 43 [ 'f14_1', 'f14_2', 'f14_3' ] 44 ] 45 45 else: 46 47 46 print 'read para list from file: ', options.fname 47 para_list = [] 48 48 49 49 job_fname = options.script + '_' + options.job + '.py' 50 50 51 for run in para_list: 52 """ loop over all runs 53 54 - create the program text 55 - save it to disk 56 - submit the job 51 57 52 for run in para_list: 53 """ loop over all runs 54 - create the program text 55 - save it to disk 56 - submit the job 57 """ 58 pl = '' 59 for opt in run: 60 pl += '\'' + opt + '\',' 58 """ 59 60 pl = '' 61 for opt in run: 62 pl += '\'' + opt + '\',' 61 63 #pl = pl[:-1] # remove the last comma 62 64 63 65 cmd = 'ana = ' + options.job + '( ' + pl + ')' 64 66 65 67 # compose the text of the program script 66 68 prg_text = """ … … 75 77 # end of script""" 76 78 77 # print 'program:' 78 # print prg_text 79 # print 79 # print 'program:' 80 # print prg_text 81 # print 82 83 # save the program to disk 84 file = open( job_fname, 'w' ) 85 file.write( prg_text ) 86 file.close() 87 88 # submit the program script 89 shell_cmd = 'qsub -S/usr/bin/python -V -q ' + options.queue + ' ', options.job 90 print 'shell_cmd: ', shell_cmd 91 os.system( 'python ' + job_fname ) 80 92 81 # save the program to disk82 file = open( job_fname, 'w' )83 file.write( prg_text )84 file.close()85 86 # submit the program script87 shell_cmd = 'qsub -S/usr/bin/python -V -q ' + options.queue + ' ', options.job88 print 'shell_cmd: ', shell_cmd89 os.system( 'python ' + job_fname )90
Note:
See TracChangeset
for help on using the changeset viewer.