示例#1
0
def main():
    #jobs = JDLCreator('condocker')  #run jobs on condocker cloude site
    jobs = JDLCreator('condocker')
    jobs.wall_time = 10 * 60
    jobs.memory = 10
    jobs.requirements = "(TARGET.ProvidesCPU) && (TARGET.ProvidesEkpResources)"
    ##################################
    ## submit job to set up CMSSW
    ##################################
    #jobs.SetExecutable("job_setup.sh")  # set job script
    #jobs.SetArguments(' ')              # set arguments
    #jobs.SetFolder('../setup/')         # set subfolder !!! you have to copy your job file into the folder

    ##################################
    # submit job to run combine
    ##################################
    jobs.SetExecutable("job_calc.sh")  # set job script
    #build list of arguments
    arguments = []

    arguments.append(
        "testconfig.xml Summer16/ZprimeToWW_narrow_M-3000_13TeV-madgraph/ZprimeToWW_narrow_M-3000_13TeV-madgraph20170203_signal/170203_123700/0000/ flatTuple_1.root"
    )
    #jobs.SetFolder('/usr/users/dschaefer/job_submission/local/sframe')  # set subfolder !!! you have to copy your job file into the folder
    jobs.SetArguments(
        arguments
    )  # write an JDL file and create folder f            # set arguments
    jobs.WriteJDL()  # write an JDL file and create folder for log files
def writeJDL(arguments,mem,time,name):
    #jobs = JDLCreator('condocker')  #run jobs on condocker cloude site
    jobs = JDLCreator('condocker') # matthias schnepf told me i don't need this after all! (23.01.18)
    jobs.wall_time = time
    jobs.memory = mem 
    jobs.requirements = "(TARGET.ProvidesCPU) && (TARGET.ProvidesEkpResources)"
    jobs.accounting_group = "cms.top"
    ##################################
    ## submit job to set up CMSSW 
    ##################################
    #jobs.SetExecutable("job_setup.sh")  # set job script
    #jobs.SetArguments(' ')              # set arguments
    #jobs.SetFolder('../setup/')         # set subfolder !!! you have to copy your job file into the folder


    ##################################
    # submit job to run combine
    ##################################
    jobs.SetExecutable(name)  # set job script
    #jobs.SetFolder('/usr/users/dschaefer/job_submission/local/sframe')  # set subfolder !!! you have to copy your job file into the folder
    jobs.SetArguments(arguments)              # write an JDL file and create folder f            # set arguments
    jobs.WriteJDL() # write an JDL file and create folder for log files
示例#3
0
def main(args):
    jobs = JDLCreator("ekpsupermachines")

    jobs.executable = "gof/job.sh"
    jobs.wall_time = 1 * 60 * 60
    jobs.memory = 2048
    jobs.accounting_group = "cms.higgs"
    jobs.image = "stwunsch/slc6-condocker:smhtt"

    # Build list of arguments
    arguments = []
    config = yaml.load(open(args.binning))
    for channel in config["gof"]:
        for variable in config["gof"][channel]:
            arguments.append("{} {}".format(channel, variable))
    jobs.arguments = arguments

    # The job requires lots of CPU resources
    # NOTE: This selects the sg machines.
    jobs.requirements = '(Target.ProvidesCPU == True) && (Target.ProvidesEKPResources == True)'
    jobs.job_folder = args.output
    jobs.WriteJDL()
示例#4
0
def main(args):
    jobs = JDLCreator("docker")

    jobs.executable = "gof/job.sh"
    jobs.wall_time = 1 * 60 * 60
    jobs.memory = 2048
    jobs.accounting_group = "cms.higgs"
    jobs.image = "stwunsch/slc6-condocker:smhtt"

    # Build list of arguments
    arguments = []
    binning = yaml.load(open(args.binning))
    variables = yaml.load(open(args.variables))

    # 1D fits
    for channel in binning["gof"]:
        for variable in variables["variables"]:
            arguments.append("{} {} {}".format(args.era, channel, variable))

    # 2D fits
    for channel in binning["gof"]:
        selected_2d_fits = []
        for var1 in variables["selected_variables"][int(args.era)][channel]:
            for var2 in variables["selected_variables"][int(
                    args.era)][channel]:
                selected_2d_fits.append("{}_{}".format(var1, var2))
        for variable in selected_2d_fits:
            if variable in binning["gof"][channel]:
                arguments.append("{} {} {}".format(args.era, channel,
                                                   variable))

    jobs.arguments = arguments

    # The job requires lots of CPU resources
    jobs.requirements = '(Target.ProvidesCPU == True) && (Target.ProvidesEKPResources == True)'
    jobs.job_folder = args.output
    jobs.WriteJDL()
示例#5
0
def main():
    """Submit a simple example job"""
    out_dir = "toymass13_30k_test"
    jobs = JDLCreator(
    )  # Default (no Cloud Site supplied): Docker with SLC6 image
    # Some example sites:
    # site_name='ekpsupermachines'  "Super Machines" IO intesiv jobs

    jobs.executable = "job.sh"  # name of the job script
    jobs.wall_time = 11 * 60 * 60  # job will finish in 10 hours
    jobs.memory = 1900  # Our regular 2048 MB per slot
    jobs.accounting_group = "cms.higgs"
    jobs.input_files = "/usr/users/friese/toymass/pythia_eventgeneration/eventgeneration,/usr/users/friese/toymass/pythia_eventgeneration/job.sh,/usr/users/friese/.globus/proxy.grid"

    arguments = []
    for masses in range(40, 50, 2):
        #for masses in range(40,3200,2):
        for seed in [20]:
            for channel in ["tt", "mt", "et", "em", "mm", "ee"]:
                for invert in ["true", "false"]:
                    arguments.append(" ".join([
                        str(x)
                        for x in [masses, seed, channel, invert, out_dir]
                    ]))
    print len(arguments)
    jobs.arguments = arguments  # set arguments for condor job

    # Our job requires lots of CPU resources and needs access to the local EKP resources
    jobs.requirements = '(TARGET.ProvidesCPU ==True)'

    jobs.job_folder = "condor_jobs_" + out_dir  # set name of the folder, where files and information are stored
    jobs.AddExtraLines('+RemoteJob = True')
    jobs.AddExtraLines('x509userproxy = /usr/users/friese/.globus/proxy.grid')
    jobs.WriteJDL()  # write an JDL file and create folder for log files
    jobs.Submit()
示例#6
0
def main(args):
    jobs = JDLCreator("ekpsupermachines")

    jobs.executable = "ml/job.sh"
    jobs.wall_time = 10 * 60 * 60
    jobs.memory = 2048
    jobs.accounting_group = "cms.higgs"
    jobs.image = "stwunsch/slc6-condocker:smhtt"

    # Build list of arguments
    arguments = []
    for modifier in args.modifiers:
        arguments.append("{} {}".format(args.channel, modifier))
    jobs.arguments = arguments

    # The job requires lots of CPU resources
    # NOTE: This selects the sg machines.
    jobs.requirements = "(Target.ProvidesCPU == True) && (Target.ProvidesEKPResources == True)"
    jobs.job_folder = args.output
    jobs.WriteJDL()