Esempio n. 1
0
def create_empty_request():
    request = lsf.submit()
    request.options = 0
    request.options2 = 0
    request.options3 = 0

    return request
Esempio n. 2
0
def run_job(command):
    """
    Run a job...
    """
    submitreq = lsf.submit()
    submitreq.command = command
    submitreq.options = 0
    submitreq.options2 = 0

    limits = []
    for i in range(0, lsf.LSF_RLIM_NLIMITS):
        limits.append(lsf.DEFAULT_RLIMIT)

    submitreq.rLimits = limits
 
    submitreq.beginTime = 0
    submitreq.termTime = 0
    submitreq.numProcessors = 1
    submitreq.maxNumProcessors = 1

    submitreply = lsf.submitReply()

    if lsf.lsb_init("test") > 0:
        exit(1)

    job_id = lsf.lsb_submit(submitreq, submitreply)
    return job_id
Esempio n. 3
0
def modify_job(job_id):
    """
    Modify a job...
    """
    submitreq = lsf.submit()
    submitreq.command = str(job_id);
    submitreq.options = 0
    submitreq.resReq = "rusage[mem=3500]"
    submitreq.options |= lsf.SUB_MODIFY
    submitreq.options |= lsf.SUB_RES_REQ
    submitreq.options2 = 0
    submitreq.options3 = 0
    submitreq.options4 = 0

    limits = []
    for _ in range(0, lsf.LSF_RLIM_NLIMITS):
        limits.append(lsf.DEFAULT_RLIMIT)
    submitreq.rLimits = limits

    submitreply = lsf.submitReply()

    if lsf.lsb_init("test") > 0:
        exit(1)

    
    job_id = lsf.lsb_modify(submitreq, submitreply, -1)
    return job_id
def run_job(command):
    """
    Run a job...
    """
    submitreq = lsf.submit()
    submitreq.command = command
    submitreq.options = 0
    submitreq.options2 = 0

    limits = []
    for i in range(0, lsf.LSF_RLIM_NLIMITS):
        limits.append(lsf.DEFAULT_RLIMIT)

    submitreq.rLimits = limits
 
    submitreq.beginTime = 0
    submitreq.termTime = 0
    submitreq.numProcessors = 1
    submitreq.maxNumProcessors = 1

    submitreply = lsf.submitReply()

    if lsf.lsb_init("test") > 0:
        exit(1)

    job_id = lsf.lsb_submit(submitreq, submitreply)
    return job_id
Esempio n. 5
0
def create_empty_request():
    init()
    try:
        request = api.submit()
    except:
        LOG.exception("Failed to create empty request")
        raise LSFBindingException("Caught exception in submit")

    request.options = 0
    request.options2 = 0
    request.options3 = 0

    return request
Esempio n. 6
0
def create_empty_request():
    init()
    try:
        request = api.submit()
    except:
        LOG.exception('Failed to create empty request')
        raise LSFBindingException('Caught exception in submit')

    request.options = 0
    request.options2 = 0
    request.options3 = 0

    return request