def test_j_Queues(self): from Ganga.GPI import queues, Job, GenericSplitter queues # -- QUEUES EXAMPLE START for i in range(1, 10): j = Job() queues.add(j.submit) # -- QUEUES EXAMPLE STOP # -- QUEUES FUNCTION START def f(x): print x queues.add(f, args=(123,)) # -- QUEUES FUNCTION STOP # -- QUEUES SPLIT START j = Job() j.splitter = GenericSplitter() j.splitter.attribute = 'application.args' j.splitter.values = [i for i in range(0, 10)] j.parallel_submit = True j.submit()
def test_j_Queues(self): from Ganga.GPI import queues, Job, GenericSplitter queues # -- QUEUES EXAMPLE START for i in range(1, 10): j = Job() queues.add(j.submit) # -- QUEUES EXAMPLE STOP # -- QUEUES FUNCTION START def f(x): print x queues.add(f, args=(123, )) # -- QUEUES FUNCTION STOP # -- QUEUES SPLIT START j = Job() j.splitter = GenericSplitter() j.splitter.attribute = 'application.args' j.splitter.values = [i for i in range(0, 10)] j.parallel_submit = True j.submit()
def test_CondorConfigDefaults(self): # A test with sequential submission from Ganga.GPI import Job, TestSplitter, TestSubmitter j = Job() j.splitter = TestSplitter() j.splitter.backs = [TestSubmitter(),TestSubmitter(),TestSubmitter()] j.backend= TestSubmitter() b = j.splitter.backs[1] b.fail = 'submit' j.parallel_submit = False assert j.status == 'new' with pytest.raises(IncompleteJobSubmissionError): j.submit(keep_going=True) assert j.subjobs[0].status in ['submitted', 'running'] assert j.subjobs[1].status == 'new' assert j.subjobs[2].status == 'new'
def test_CondorConfigDefaults(self): # A test with sequential submission from Ganga.GPI import Job, TestSplitter, TestSubmitter j = Job() j.splitter = TestSplitter() j.splitter.backs = [TestSubmitter(), TestSubmitter(), TestSubmitter()] j.backend = TestSubmitter() b = j.splitter.backs[1] b.fail = 'submit' j.parallel_submit = False assert j.status == 'new' with pytest.raises(IncompleteJobSubmissionError): j.submit(keep_going=True) assert j.subjobs[0].status in ['submitted', 'running'] assert j.subjobs[1].status == 'new' assert j.subjobs[2].status == 'new'