Example #1
0
from org.vpac.grisu.frontend.control.login import LoginManager
from org.vpac.grisu.frontend.model.job import BatchJobObject, JobObject
import sys

batchJobName  =  sys.argv[1]

# display commandline login menu if no local proxy exists
si = LoginManager.loginCommandline()

batchJob = BatchJobObject(si, batchJobName, False)

start = 30
end = 40

pathToInputFiles = batchJob.pathToInputFiles()

inputFile1relPath = pathToInputFiles+'inputFile1.txt ' 
inputFile2relPath = pathToInputFiles+'inputFile2.txt' 

for i in range(start, end):
    # create a unique jobname for every job
    jobname = batchJobName+"_"+ str(i)
    
    print 'Creating job: '+jobname
    
    # create the single job
    job = JobObject(si)
    job.setJobname(jobname)
    # better to set the application to use explicitely because in that case we don't need to use mds (faster)
    job.setApplication('UnixCommands')
    job.setCommandline('cat '+ inputFile1relPath + ' ' + inputFile2relPath)
Example #2
0
'''

from au.org.arcs.jcommons.constants import Constants
from org.vpac.grisu.control import ResubmitPolicy, ResubmitPolicy, \
    DefaultResubmitPolicy
from org.vpac.grisu.control.exceptions import NoSuchJobException
from org.vpac.grisu.frontend.control.login import LoginManager, LoginParams
from org.vpac.grisu.frontend.model.job import JobObject, BatchJobObject, \
    JobsException
from org.vpac.grisu.frontend.view.swing.jobmonitoring.batch import \
    BatchJobDialog
from org.vpac.grisu.model import GrisuRegistryManager
import sys
import time

si = LoginManager.loginCommandline("ARCS")

# how many jobs do we want
numberOfJobs = 34

# the (unique) name of the multijob
multiJobName = "34javaResubmitTest";

# delete an (possibly existing) old job with the same name
try:
    si.kill(multiJobName, True);
    
    status = si.getActionStatus(multiJobName)
    while not status.isFinished():
        percentage = status.getCurrentElements() * 100 / status.getTotalElements()
        print "Deletion "+str(percentage)+"% finished."
Example #3
0
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)

Example #4
0



# setup benchmark stuff
submitter = submitter()

#siNames = ["ARCS", "BeSTGRID"]
siNames = ["Local"]

serviceInterfaces = []

for siName in siNames:
    
    with timer:   
        temp = LoginManager.loginCommandline(siName)
         
    print 'Login '+siName+': '+str(timer.duration_in_seconds())
    serviceInterfaces.append(temp)
    GrisuRegistryManager.getDefault(temp).getUserEnvironmentManager().setCurrentFqan("/ARCS/NGAdmin")

print
print

#actionClasses = (simpleSubmitJob, simpleSubmitJobWith1SmallInputFile,  simpleSubmitJobWith5SmallInputFiles,
  #               simpleSubmitJobWith1MediumInputFile, simpleSubmitJobWith5MediumInputFiles, simpleSubmitJobWith1_46mb_InputFile, simpleSubmitJobWith5_46mb_InputFiles)

actionClasses = {dynamicStageJob : [True, 1,0,0], dynamicStageJob : [True, 5,0,0], dynamicStageJob : [True, 0,1,0], dynamicStageJob : [True, 0,5,0]}

actions = []
    
Example #5
0
'''
Created on 16/06/2010

@author: markus
'''


from exampleJobs import *
from org.vpac.grisu.frontend.control.login import LoginManager
from org.vpac.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)):
Example #6
0
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()