<s> """<STR_LIT>""" <EOL> import os <EOL> import time <EOL> import pdb <EOL> import sys <EOL> sys . path . insert ( <NUM_LIT:0> , os . getcwd ( ) + "<STR_LIT>" ) <EOL> """<STR_LIT>""" <EOL> COORDINATION_URL = "<STR_LIT>" <EOL> from bigjob import bigjob , subjob , description <EOL> NUMBER_JOBS = <NUM_LIT:8> <EOL> def has_finished ( state ) : <EOL> state = state . lower ( ) <EOL> if state == "<STR_LIT>" or state == "<STR_LIT>" or state == "<STR_LIT>" : <EOL> return True <EOL> else : <EOL> return False <EOL> """<STR_LIT>""" <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> starttime = time . time ( ) <EOL> queue = None <EOL> project = None <EOL> walltime = <NUM_LIT:100> <EOL> processes_per_node = <NUM_LIT:4> <EOL> number_of_processes = <NUM_LIT:2> <EOL> workingdirectory = os . path . join ( os . getcwd ( ) , "<STR_LIT>" ) <EOL> userproxy = None <EOL> """<STR_LIT>""" <EOL> lrms_url = "<STR_LIT>" <EOL> print "<STR_LIT>" + lrms_url <EOL> bj = bigjob ( COORDINATION_URL ) <EOL> bj . start_pilot_job ( lrms_url , <EOL> number_of_processes , <EOL> queue , <EOL> project , <EOL> workingdirectory , <EOL> userproxy , <EOL> walltime , <EOL> processes_per_node ) <EOL> print "<STR_LIT>" + bj . get_url ( ) + "<STR_LIT>" + str ( bj . get_state ( ) ) <EOL> jobs = [ ] <EOL> job_start_times = { } <EOL> job_states = { } <EOL> for i in range ( <NUM_LIT:0> , NUMBER_JOBS ) : <EOL> jd = description ( ) <EOL> jd . executable = "<STR_LIT>" <EOL> jd . number_of_processes = "<STR_LIT:1>" <EOL> jd . spmd_variation = "<STR_LIT>" <EOL> jd . arguments = [ "<STR_LIT>" ] <EOL> jd . output = "<STR_LIT>" + str ( i ) + "<STR_LIT>" <EOL> jd . error = "<STR_LIT>" + str ( i ) + "<STR_LIT>" <EOL> sj = subjob ( ) <EOL> sj . submit_job ( bj . pilot_url , jd ) <EOL> jobs . append ( sj ) <EOL> job_start_times [ sj ] = time . time ( ) <EOL> job_states [ sj ] = sj . get_state ( ) <EOL> print "<STR_LIT>" % bj . get_url ( ) </s>
