示例#1
0
 def start_bigjob(self, nodes):
     """start pilot jobs (advert_job.py) at every unique machine specified in RE_info"""  
     start = time.time()
     self.bj = bigjob_azure()
     self.bj.start_pilot_job(number_nodes=nodes)
     logging.debug("BigJob Azure Initiation Time: " + str(time.time()-start))
     return self.bj
示例#2
0
NUMBER_JOBS=5


""" Test Job Submission via Azure BigJob """
if __name__ == "__main__":

    ##########################################################################################
    # Start BigJob
    # Parameter for BigJob 
    nodes = 2 # number nodes for agent
    # current_directory=os.getcwd() +"/agent"  # working directory for agent
    pdb.set_trace();  
    # start pilot job (bigjob_agent)
    print "Start Pilot Job/BigJob in the cloud. "
    start = time.time()
    bj = bigjob_azure()
    bj.start_pilot_job(number_nodes=nodes)
    print "Pilot Job/BigJob URL: " + bj.pilot_url + " State: " + str(bj.get_state())\
        + " Launch Time: " + str(time.time()-start) + " sec"    
    if(bj.get_state()=="Failed"):
        print "Start of BigJob failed."
        sys.exit(-1)

    ##########################################################################################
    # Submit SubJob through BigJob
    jd = description() #TODO: move to SAGA JD
    jd.executable = "approot\\resources\\namd\\namd2"
    jd.number_of_processes = "1"
    jd.spmd_variation = "single"
    jd.arguments = ["+p1", "NPT.conf"]
    jd.working_directory = "approot\\resources\\namd\\"