def prepare(self): job = JobObject(self.si); job.setUniqueJobname("echo_job1") job.setCommandline("echo \"Hello World\"") job.createJob() self.job = job
def prepare(self): job = JobObject(self.si); job.setUniqueJobname("echo_job1") job.setCommandline("echo \"Hello World\"") job.addInputFileUrl("/home/markus/tmp/text0.txt"); job.createJob() self.job = job
def prepare(self): job = JobObject(self.si); job.setUniqueJobname("echo_job1") job.setCommandline("echo \"Hello World\"") job.addInputFileUrl("/home/markus/tmp/46mbInput0.bin"); job.setApplication(Constants.GENERIC_APPLICATION_NAME) job.setSubmissionLocation(self.subLoc) job.createJob() self.job = job
def prepare(self): job = JobObject(self.si); job.setUniqueJobname("echo_job1") job.setCommandline("echo \"Hello World\"") job.addInputFileUrl("gsiftp://ng2.canterbury.ac.nz/home/gridcloud061/tmp/text0.txt"); job.addInputFileUrl("gsiftp://ng2.canterbury.ac.nz/home/gridcloud061/tmp/text1.txt"); job.addInputFileUrl("gsiftp://ng2.canterbury.ac.nz/home/gridcloud061/tmp/text2.txt"); job.addInputFileUrl("gsiftp://ng2.canterbury.ac.nz/home/gridcloud061/tmp/text3.txt"); job.addInputFileUrl("gsiftp://ng2.canterbury.ac.nz/home/gridcloud061/tmp/text4.txt"); job.setApplication(Constants.GENERIC_APPLICATION_NAME) job.setSubmissionLocation(self.subLoc) job.createJob() self.job = job
class simpleStageJob(action): def __init__(self, si, subLoc=defaultSubLoc): super(simpleStageJob, self).__init__(si, subLoc) self.job = JobObject(self.si) self.job.setCommandline("echo \"hello world\"") self.job.setApplication(Constants.GENERIC_APPLICATION_NAME) self.job.setSubmissionLocation(self.subLoc) def prepare(self): self.job.setUniqueJobname(self.name()) self.job.createJob() def execute(self): self.job.submitJob()
job = JobObject(si); # set a unique jobname job.setTimestampJobname("diff_job") print 'Set jobname to: '+ job.getJobname() # setting the application. this means that grisu can figure out the submission location and # you don't have to do that manually job.setApplication("UnixCommands") # set the commandline that needs to be executed job.setCommandline('diff ' + file1Name+ ' ' + file2Name) job.addInputFileUrl(file1url); job.addInputFileUrl(file2url); # create the job on the backend and specify the VO to use job.createJob("/ARCS/StartUp") print 'Submitting job...' # submit the job job.submitJob() print 'Waiting for the job to finish...' # this waits until the job is finished. Checks every 10 seconds (which would be too often for a real job) finished = job.waitForJobToFinish(10) if not finished: print "not finished yet." # kill the job on the backend anyway job.kill(True); else: print 'Job finished. Status: '+job.getStatusString(False) # download and cache the jobs' stdout and display it's content
from org.vpac.grisu.frontend.control.login import LoginManager from org.vpac.grisu.frontend.model.job import JobObject si = LoginManager.loginCommandline("BeSTGRID") job = JobObject(si); job.setUniqueJobname("cat_job") job.setCommandline("cat singleJobFile_0.txt") job.addInputFileUrl('/home/markus/test/singleJobFile_0.txt'); job.createJob("/ARCS/BeSTGRID") job.submitJob() job.waitForJobToFinish(10) print 'Job finished. Status: '+job.getStatusString(False) print "Stdout: " + job.getStdOutContent() print "Stderr: " + job.getStdErrContent() job.kill(True)
from org.vpac.grisu.frontend.model.job import JobObject import sys si = LoginManager.loginCommandline("ARCS") # create the job object job = JobObject(si); # set a unique jobname job.setUniqueJobname("echo_job1") # set the commandline that needs to be executed job.setCommandline("echo \"Hello World\"") # create the job on the backend and specify the VO to use job.createJob("/ACC") # submit the job job.submitJob() # this waits until the job is finished. Checks every 10 seconds (which would be too often for a real job) finished = job.waitForJobToFinish(10) if not finished: print "not finished yet." # kill the job on the backend anyway job.kill(True); else: # download and cache the jobs' stdout and display it's content print "Stdout: " + job.getStdOutContent() # download and cache the jobs' stderr and display it's content print "Stderr: " + job.getStdErrContent()
job = JobObject(si); # set a unique jobname job.setUniqueJobname("echo_job1") print 'Set jobname to: '+ job.getJobname() # set the name of the application like it is published in mds. "generic" means not to use mds for the lookup. job.setApplication("generic") # since we are using a "generic" job, we need to specify a submission location. I'll make that easier later on... job.setSubmissionLocation("dque@edda-m:ng2.vpac.org") # set the commandline that needs to be executed job.setCommandline("echo \"Hello World\"") job.addInputFileUrl('/home/markus/test/singleJobFile_0.txt'); # create the job on the backend and specify the VO to use job.createJob("/ARCS/NGAdmin") print 'Submitting job...' # submit the job job.submitJob() print 'Waiting for the job to finish...' # this waits until the job is finished. Checks every 10 seconds (which would be too often for a real job) finished = job.waitForJobToFinish(10) if not finished: print "not finished yet." # kill the job on the backend anyway job.kill(True); else: print 'Job finished. Status: '+job.getStatusString(False) # download and cache the jobs' stdout and display it's content