def submit(which): total_summary = {} tag = "ZMuMuSkim_v0" task = CMSSWTask( sample = DBSSample(dataset="/SingleMuon/Run2017F-ZMu-17Nov2017-v1/RAW-RECO"), events_per_output = 10000, pset = "/home/users/mcitron/CMSSW_9_4_17/src/cms_lpc_llp/llp_ntupler/python/displacedJetMuon_ntupler_Data_2017_RAWRECO.py", cmssw_version = "CMSSW_9_4_17", scram_arch = "slc6_amd64_gcc700", tag = tag, # dont_check_tree = True, executable = "/home/users/mcitron/exeForMetis/condor_genprod_exe.sh", condor_submit_params = { "container": "/cvmfs/singularity.opensciencegrid.org/cmssw/cms:rhel6-m202006", }, recopy_inputs=True ) task.process() total_summary[task.get_sample().get_datasetname()] = task.get_task_summary() StatsParser(data=total_summary, webdir="~/public_html/dump/metis_test/").do()
"", # if global tag blank, one from DBS is used ## NOT USED FOR PRIVATE pset=job["pset"], pset_args=pset_args, cmssw_version=cmsswver, tarfile=tarfile, special_dir=job["special_dir"], publish_to_dis=False, condor_submit_params={"sites": "T2_US_UCSD"} if isinstance( job["sample"], DirectorySample) else {"use_xrootd": True}, files_per_output=60 if isinstance(job["sample"], DirectorySample) else -1, events_per_output=50e3 if isinstance( job["sample"], DBSSample) else -1, min_completion_fraction=0.98 if isinstance( job["sample"], DBSSample) else 1.0, ) task.process() except: traceback_string = traceback.format_exc() print "Runtime error:\n{0}".format(traceback_string) total_summary[ job["sample"].get_datasetname()] = task.get_task_summary() StatsParser(data=total_summary, webdir="~/public_html/dump/metis_private/").do() time.sleep(60. * 20)
output_name="merged_ntuple.root", tag="CMS4_V10-02-01_allPfCands", #tag = "CMS4_V00-00-06_allPfCands", global_tag="", # if global tag blank, one from DBS is used #pset = "/home/users/sjmay/Commissioning2017/Commissioning2017_MET/BabyMaker/CMSSW_10_1_0/src/CMS3/NtupleMaker/test/main_pset.py", pset=cmsswver + "/src/CMS3/NtupleMaker/test/main_pset.py", pset_args="data=False prompt=False relval=True" if "RelVal" in dsname else "data=False prompt=False", cmssw_version=cmsswver, publish_to_dis=False, tarfile=tarfile, is_data=False, ) task.process() total_summary[dsname] = task.get_task_summary() for dsname in dataset_names: if "DoubleMuon" in dsname and "Run2018D-PromptReco-v1" in dsname: continue open_dataset = False task = CMSSWTask( sample=DBSSample(dataset=dsname), open_dataset=open_dataset, flush=((i + 1) % 48 == 0), # flush = ((i)%48==0), events_per_output=100e3, output_name="merged_ntuple.root", tag="CMS4_V10-02-01_allPfCands", #tag = "CMS4_V00-00-06_allPfCands", global_tag="", # if global tag blank, one from DBS is used
from metis.CMSSWTask import CMSSWTask from metis.Sample import DBSSample from metis.StatsParser import StatsParser import time if __name__ == "__main__": total_summary = {} for _ in range(10000): nano = CMSSWTask( sample=DBSSample( dataset= "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v1/MINIAODSIM", ), events_per_output=150e3, output_name="output.root", tag="v1", pset="../scratch/pset_nano.py", cmssw_version="CMSSW_10_2_11", scram_arch="slc6_amd64_gcc700", ) nano.process() total_summary[ nano.get_sample().get_datasetname()] = nano.get_task_summary() StatsParser(data=total_summary, webdir="~/public_html/dump/metis_nano/").do() time.sleep(30 * 60)
for i in range(100): total_summary = {} # for dsname in dataset_names: for task in ntuple_tasks: try: task.process() except: traceback_string = traceback.format_exc() print "Runtime error:\n{0}".format(traceback_string) # send_email(subject="metis error", body=traceback_string) # if not task.complete(): # f = open("unfinished.txt","a+") # print "" # for output in task.get_uncompleted_outputs(): # f.write("for ouput file <"+output.get_name()+">:\n") # for inp in task.get_inputs_for_output(output): # f.write(inp.get_name()+'\n') # f.write("\n\n") # f.close() total_summary[task.get_sample().get_datasetname()] = task.get_task_summary() StatsParser(data=total_summary, webdir="~/public_html/dump/metis_80XTopTag/").do() time.sleep(60.*30)
special_dir = "elemva/ProjectMetis", open_dataset = False, events_per_output = 700000, output_name = "output.root", output_is_tree = False, check_expectedevents = True, tag = tag, pset = pset, cmssw_version = cmsswver, tarfile = tarfile, pset_args = pset_args, publish_to_dis = False, ) cmssw_tasks.append(cmssw_task) for i in range(100): total_summary = {} for cmssw_task in cmssw_tasks: cmssw_task.process() total_summary[cmssw_task.get_sample().get_datasetname()] = cmssw_task.get_task_summary() # parse the total summary and write out the dashboard StatsParser(data=total_summary, webdir="~/public_html/dump/metis/").do() # 1 hr power nap time.sleep(10.*60)