ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/python/submitThem.py
(Generate patch)

Comparing UserCode/VHbb/python/submitThem.py (file contents):
Revision 1.36 by nmohr, Fri Mar 22 15:19:28 2013 UTC vs.
Revision 1.37 by bortigno, Wed Mar 27 14:29:38 2013 UTC

# Line 83 | Line 83 | print configs
83   config = BetterConfigParser()
84   config.read(configs)
85  
86 + def dump_config(configs,output_file):
87 +    """
88 +    Dump all the configs in a output file
89 +    Args:
90 +        output_file: the file where the log will be dumped
91 +        configs: list of files (string) to be dumped
92 +    Returns:
93 +        nothing
94 +    """
95 +    outf = open(output_file,'w')
96 +    for i in configs:
97 +        try:
98 +            f=open(i,'r')
99 +            outf.write(f.read())
100 +        except: print '@WARNING: Config' + i + ' not found. It will not be used.'
101  
102   def compile_macro(config,macro):
103      """
# Line 135 | Line 150 | def submit(job,repDict):
150          repDict['name'] = '%(job)s_%(en)s%(task)s' %repDict
151      command = 'qsub -V -cwd -q %(queue)s -l h_vmem=6G -N %(name)s -o %(logpath)s/%(timestamp)s_%(job)s_%(en)s_%(task)s.out -e %(logpath)s/%(timestamp)s_%(job)s_%(en)s_%(task)s.err runAll.sh %(job)s %(en)s ' %(repDict) + opts.task + ' ' + repDict['job_id'] + ' ' + repDict['additional']
152      print command
153 +    dump_config(configs,"%(logpath)s/%(timestamp)s_%(job)s_%(en)s_%(task)s.config" %(repDict))
154      subprocess.call([command], shell=True)
155  
156   if opts.task == 'train':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines