Esempio n. 1
0
    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)
Esempio n. 2
0
    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)
Esempio n. 3
0
        if line:
            if isfile(line):
                files_to_upload.append(line)
            else:
                print 'Not a file: ' + line
                sys.exit(1)
    return files_to_upload


files_to_upload = read_files(files_file)

if not si:
    LoginManager.initEnvironment()
    si = LoginManager.login('bestgrid', True)

filemanager = GrisuRegistryManager.getDefault(si).getFileManager()

job = JobObject(si)
job.setSubmissionLocation('pan:pan.nesi.org.nz')
job.setTimestampJobname(jobname_template)
job.setCommandline(commandline)

# add input files
for file in files_to_upload:
    job.addInputFileUrl(file)

jobname = job.createJob('/nz/nesi')
print 'Submitting job...'
job.submitJob()
print 'Jobname: ' + jobname
Esempio n. 4
0
'''
Created on 16/06/2010

@author: markus
'''


from exampleJobs import *
from grisu.frontend.control.login import LoginManager
from grisu.model import GrisuRegistryManager
import sys

# setup benchmark stuff
submitter = submitter()
si = LoginManager.loginCommandline("Local")
registry = GrisuRegistryManager.getDefault(si)
uem = registry.getUserEnvironmentManager()

uem.setCurrentFqan('/ARCS/NGAdmin')

#actionsGT4 = (simpleSubmitJob(si), simpleSubmitJobWith1SmallInputFile(si), simpleMdsSubmitJob(si), simpleMdsSubmitJobWith1SmallInputFile(si),
 #      simpleSubmitJobWith5SmallInputFiles(si), simpleSubmitJobWith1MediumInputFile(si),simpleSubmitJobWith5MediumInputFiles(si), simpleSubmitJobWith1_46mb_InputFile(si), simpleSubmitJobWith5_46mb_InputFiles(si) )
#actionsGT5 = (simpleSubmitJob(si, 'gt5test:ng1.canterbury.ac.nz'), simpleSubmitJobWith1SmallInputFile(si, 'gt5test:ng1.canterbury.ac.nz'), simpleMdsSubmitJob(si, 'gt5test:ng1.canterbury.ac.nz'), simpleMdsSubmitJobWith1SmallInputFile(si, 'gt5test:ng1.canterbury.ac.nz'),
 #      simpleSubmitJobWith5SmallInputFiles(si, 'gt5test:ng1.canterbury.ac.nz'), simpleSubmitJobWith1MediumInputFile(si, 'gt5test:ng1.canterbury.ac.nz'),simpleSubmitJobWith5MediumInputFiles(si, 'gt5test:ng1.canterbury.ac.nz'), simpleSubmitJobWith1_46mb_InputFile(si, 'gt5test:ng1.canterbury.ac.nz'), simpleSubmitJobWith5_46mb_InputFiles(si, 'gt5test:ng1.canterbury.ac.nz') )

actionsGT4 = (nonMdsJob(si), nonMdsJob5SmallInputFiles(si))
actionsGT5 = (nonMdsJob(si, 'gt5test:ng1.canterbury.ac.nz'), nonMdsJob5SmallInputFiles(si, 'gt5test:ng1.canterbury.ac.nz'))


for index in range(len(actionsGT4)):
Esempio n. 5
0
from grisu.frontend.control.login import LoginManager
from grisu.frontend.model.job import JobObject
from 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()
Esempio n. 6
0
        line = line.strip()
        if line:
            if isfile(line):
                files_to_upload.append(line)
            else: 
                print 'Not a file: '+line
                sys.exit(1)
    return files_to_upload

files_to_upload = read_files(files_file)

if not si:
    LoginManager.initEnvironment()
    si = LoginManager.login('bestgrid', True)

filemanager = GrisuRegistryManager.getDefault(si).getFileManager()

job = JobObject(si)
job.setSubmissionLocation('pan:pan.nesi.org.nz')
job.setTimestampJobname(jobname_template)
job.setCommandline(commandline)

# add input files
for file in files_to_upload:
    job.addInputFileUrl(file)
    

jobname = job.createJob('/nz/nesi')
print 'Submitting job...'
job.submitJob()
print 'Jobname: '+jobname
Esempio n. 7
0
'''
Created on 16/06/2010

@author: markus
'''

from exampleJobs import *
from grisu.frontend.control.login import LoginManager
from grisu.model import GrisuRegistryManager
import sys

# setup benchmark stuff
submitter = submitter()
si = LoginManager.loginCommandline("Local")
registry = GrisuRegistryManager.getDefault(si)
uem = registry.getUserEnvironmentManager()

uem.setCurrentFqan('/ARCS/NGAdmin')

#actionsGT4 = (simpleSubmitJob(si), simpleSubmitJobWith1SmallInputFile(si), simpleMdsSubmitJob(si), simpleMdsSubmitJobWith1SmallInputFile(si),
#      simpleSubmitJobWith5SmallInputFiles(si), simpleSubmitJobWith1MediumInputFile(si),simpleSubmitJobWith5MediumInputFiles(si), simpleSubmitJobWith1_46mb_InputFile(si), simpleSubmitJobWith5_46mb_InputFiles(si) )
#actionsGT5 = (simpleSubmitJob(si, 'gt5test:ng1.canterbury.ac.nz'), simpleSubmitJobWith1SmallInputFile(si, 'gt5test:ng1.canterbury.ac.nz'), simpleMdsSubmitJob(si, 'gt5test:ng1.canterbury.ac.nz'), simpleMdsSubmitJobWith1SmallInputFile(si, 'gt5test:ng1.canterbury.ac.nz'),
#      simpleSubmitJobWith5SmallInputFiles(si, 'gt5test:ng1.canterbury.ac.nz'), simpleSubmitJobWith1MediumInputFile(si, 'gt5test:ng1.canterbury.ac.nz'),simpleSubmitJobWith5MediumInputFiles(si, 'gt5test:ng1.canterbury.ac.nz'), simpleSubmitJobWith1_46mb_InputFile(si, 'gt5test:ng1.canterbury.ac.nz'), simpleSubmitJobWith5_46mb_InputFiles(si, 'gt5test:ng1.canterbury.ac.nz') )

actionsGT4 = (nonMdsJob(si), nonMdsJob5SmallInputFiles(si))
actionsGT5 = (nonMdsJob(si, 'gt5test:ng1.canterbury.ac.nz'),
              nonMdsJob5SmallInputFiles(si, 'gt5test:ng1.canterbury.ac.nz'))

for index in range(len(actionsGT4)):

    action = actionsGT4[index]
Esempio n. 8
0
'''
Created on 11/12/2009

@author: markus
'''
from grisu.frontend.control.login import LoginManager
from 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()
Esempio n. 9
0
'''
Created on 16/12/2011

@author: markus
'''
from grisu.frontend.control.login import LoginManager
from grisu.frontend.model.job import JobObject
from grisu.model import GrisuRegistryManager
import sys

#targetDir = 'gsiftp://df.auckland.ac.nz/BeSTGRID/home/markus.binsteiner2/stagingoutput'
targetDir = 'gsiftp://gram5.ceres.auckland.ac.nz/tmp/'

si = LoginManager.loginCommandline('bestgrid')

uem = GrisuRegistryManager.getDefault(si).getUserEnvironmentManager()
fm = GrisuRegistryManager.getDefault(si).getFileManager()

allJobs = uem.getCurrentJobs(False)

myJobs = []
finishedJobs = []

# getting all the jobs for the run we are interested in
for job in allJobs: 
    
    name = job.jobname()
    if name.startswith('staging_test'):
        tempJob = JobObject(si, name)
        myJobs.append(tempJob)
    
Esempio n. 10
0
"""
Created on 11/12/2009

@author: markus
"""
from grisu.frontend.control.login import LoginManager
from 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()
Esempio n. 11
0
from grisu.frontend.control.login import LoginManager
from grisu.frontend.model.job import JobObject
from 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()