Пример #1
0
            raise SystemExit, 1
        
    user = pwd.getpwuid(os.getuid())[0]

    jobspec = {'jobid':int(os.environ["COBALT_JOBID"]), 'user':user, 'true_mpi_args':arglist, 
               'walltime':j['walltime'], 'args':[], 'location':j['location'], 'outputdir':j['outputdir'], }
    for key in io_redirect:
        if io_redirect[key]:
            jobspec.update({key: io_redirect[key]})
               
    try:
        scriptm = ComponentProxy("script-manager", defer=False)
        system = ComponentProxy("system", defer=False)

        # try adding job to queue_manager
        pgid = int(scriptm.invoke_mpi_from_script(jobspec))
        
        # give the process a chance to get started before we check for it
        start = time.time()
        while True:
            r = system.get_process_groups([{'id':pgid, 'state':'*'}])
            if r:
                break
            
            # we'll give it 90 seconds to get started
            if time.time() - start > 90:
                break
            
            time.sleep(5)
        
        while True:
Пример #2
0
            raise SystemExit, 1
        
    user = pwd.getpwuid(os.getuid())[0]

    jobspec = {'jobid':int(os.environ["COBALT_JOBID"]), 'user':user, 'true_mpi_args':arglist, 
               'walltime':j['walltime'], 'args':[], 'location':j['location'], 'outputdir':j['outputdir'], }
    for key in io_redirect:
        if io_redirect[key]:
            jobspec.update({key: io_redirect[key]})
               
    try:
        scriptm = ComponentProxy("script-manager", defer=False)
        system = ComponentProxy("system", defer=False)

        # try adding job to queue_manager
        pgid = int(scriptm.invoke_mpi_from_script(jobspec))
        
        # give the process a chance to get started before we check for it
        start = time.time()
        while True:
            r = system.get_process_groups([{'id':pgid, 'state':'*'}])
            if r:
                break
            
            # we'll give it 90 seconds to get started
            if time.time() - start > 90:
                break
            
            time.sleep(5)
        
        while True: