def prepare(self): job = JobSubmissionObjectImpl() job.setTimestampJobname("gt4_5_bench") job.setCommandline("echo hello") job.setApplication(Constants.GENERIC_APPLICATION_NAME) job.setSubmissionLocation(self.subLoc) fqan = GrisuRegistryManager.getDefault(self.si).getUserEnvironmentManager().getCurrentFqan() self.jobname = self.si.createJob(job.getJobDescriptionDocumentAsString(), fqan, Constants.FORCE_NAME_METHOD)
''' Created on 11/12/2009 @author: markus ''' from org.vpac.grisu.frontend.control.login import LoginManager from org.vpac.grisu.model import GrisuRegistryManager import sys si = LoginManager.login() resource = GrisuRegistryManager.getDefault(si) subLocs = resource.getResourceInformation().getAllSubmissionLocations() for subLoc in subLocs: print subLoc # don't forget to exit properly. this cleans up possible existing threads/executors sys.exit()
''' Created on 11/12/2009 @author: markus ''' from org.vpac.grisu.frontend.control.login import LoginManager from org.vpac.grisu.model import GrisuRegistryManager import sys si = LoginManager.loginCommandline() registry = GrisuRegistryManager.getDefault(si) for app in sys.argv: info = registry.getApplicationInformation(app) print 'Application: '+app info = registry.getApplicationInformation(app) for subLoc in info.getAvailableAllSubmissionLocations(): print("\tSubmissionLocation: "+subLoc) print("\tVersions: ") for version in info.getAvailableVersions(subLoc): print "\t\t" + version print "\t\t\tDetails:"
from org.vpac.grisu.frontend.control.login import LoginManager from org.vpac.grisu.frontend.model.job import JobObject from org.vpac.grisu.model import GrisuRegistryManager si = LoginManager.loginCommandline("LOCAL") appInfo = GrisuRegistryManager.getDefault(si).getApplicationInformation("ImageJ") print 'app: '+appInfo.getApplicationName() for subloc in appInfo.getAvailableAllSubmissionLocations(): print subloc job = JobObject(si); job.setTimestampJobname("imageJ"); job.setApplication("java"); job.setApplication("ImageJ"); job.setCommandline("echo Hello"); job.setSubmissionLocation("normal:ng2.ivec.org"); job.createJob("/ARCS/StartUp"); job.submitJob(); job.waitForJobToFinish(3); print "Stdout: "+job.getStdOutContent() print "Stderr: "+job.getStdErrContent()