예제 #1
0
파일: g_nonmem.py 프로젝트: grisu/nonmem
    for line in open(files_file).readlines():
        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()
예제 #2
0
파일: g_nonmem.py 프로젝트: grisu/nonmem
    files_to_upload = []
    for line in open(files_file).readlines():
        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...'
예제 #3
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()
예제 #4
0
https://code.arcs.org.au/hudson/job/Grisu-SNAPSHOT/javadoc/org/vpac/grisu/frontend/model/job/JobObject.html

@author: Markus Binsteiner
'''

from grisu.jcommons.constants import Constants
from grisu.control.exceptions import NoSuchJobException
from grisu.frontend.control.login import LoginManager, LoginParams
from grisu.frontend.model.job import JobObject, BatchJobObject, \
    JobsException
import sys
import time

# login stuff this uses a local proxy, if there is none, an exception is thrown
loginParams = LoginParams("Local", None, None);
si = LoginManager.login(None, None, None, None, loginParams)

# how many jobs do we want
numberOfJobs = 10

# the (unique) name of the multijob
multiJobName = "10catJobs";

# delete an (possibly existing) old job with the same name
try:
    si.kill(multiJobName, True);
except NoSuchJobException:
    print "No need to kill and clean job" + multiJobName

status = si.getActionStatus(multiJobName)
while not status.isFinished():
예제 #5
0
https://code.arcs.org.au/hudson/job/Grisu-SNAPSHOT/javadoc/org/vpac/grisu/frontend/model/job/JobObject.html

@author: Markus Binsteiner
'''

from grisu.jcommons.constants import Constants
from grisu.control.exceptions import NoSuchJobException
from grisu.frontend.control.login import LoginManager, LoginParams
from grisu.frontend.model.job import JobObject, BatchJobObject, \
    JobsException
import sys
import time

# login stuff this uses a local proxy, if there is none, an exception is thrown
loginParams = LoginParams("Local", None, None)
si = LoginManager.login(None, None, None, None, loginParams)

# how many jobs do we want
numberOfJobs = 10

# the (unique) name of the multijob
multiJobName = "10catJobs"

# delete an (possibly existing) old job with the same name
try:
    si.kill(multiJobName, True)
except NoSuchJobException:
    print "No need to kill and clean job" + multiJobName

status = si.getActionStatus(multiJobName)
while not status.isFinished():
예제 #6
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()