Exemplo n.º 1
0
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()
Exemplo n.º 2
0
                    "",  # 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)
                tarfile = tarfile,
                condor_submit_params = {"sites": "UAF"},
                # condor_submit_params = {"sites": "UAF,T2_US_UCSD,UCSB"},
                # condor_submit_params = {"use_xrootd": True},
                publish_to_dis = publish_to_dis,
        )
        ntuple_tasks.append(task)

    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()
Exemplo n.º 4
0
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)
Exemplo n.º 5
0
                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)