ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/Configuration/scripts/submitToCondor.py
Revision: 1.6
Committed: Thu Apr 25 18:15:52 2013 UTC (12 years ago) by ahart
Content type: text/x-python
Branch: MAIN
CVS Tags: V02-02-00, V02-01-01, V02-01-00, V01-01-00, V01-00-00, V02-00-00, V00-01-00
Changes since 1.5: +2 -2 lines
Log Message:
Pass composite_dataset_definitions to split_composite_datasets as an argument and pass the dataset label to osusub as an option needed when there are multiple dataset labels for a given dataset in the database.

File Contents

# User Rev Content
1 lantonel 1.1 #!/usr/bin/env python
2     import os
3     import sys
4     import datetime
5 lantonel 1.5 from optparse import OptionParser
6 lantonel 1.1
7 lantonel 1.2 from OSUT3Analysis.Configuration.configurationOptions import *
8     from OSUT3Analysis.Configuration.processingUtilities import *
9 lantonel 1.1
10 lantonel 1.5 parser = OptionParser()
11 lantonel 1.1 parser = set_commandline_arguments(parser)
12 lantonel 1.5 (arguments, args) = parser.parse_args()
13 lantonel 1.1
14 lantonel 1.4 if arguments.localConfig:
15 lantonel 1.1 sys.path.append(os.getcwd())
16 lantonel 1.4 exec("from " + arguments.localConfig.rstrip('.py') + " import *")
17 lantonel 1.1
18 lantonel 1.4 condor_dir = set_condor_submit_dir(arguments)
19 lantonel 1.1
20     os.system("mkdir %s" % (condor_dir))
21    
22 ahart 1.6 split_datasets = split_composite_datasets(datasets, composite_dataset_definitions)
23 lantonel 1.1
24     for dataset in split_datasets:
25     output_dir = "%s/%s" % (condor_dir, dataset)
26 ahart 1.6 command = "osusub -l %s -m %d %s %s %s %s" % (dataset, maxEvents[dataset], dataset_names[dataset], config_file, output_dir, nJobs[dataset])
27 lantonel 1.1 print command
28     os.system(command)