Exemplo n.º 1
0
    def submit(self):
        
        if self.jobs:
            print 'There is already a run with the name "'+self.jobname+'". Exiting...'
            sys.exit(1)
            
        # uploading input file once, so we don't need to do it for every job again and again
        fm.cp(self.filepath, 'gsiftp://pan.nesi.org.nz/~/inputfiles/'+self.jobname, True)
        
        for i in range(0,self.runs):
            
            # create the job object
            job = JobObject(si);
            # set a unique jobname
            number = str(i+1).zfill(4)
            job.setUniqueJobname(self.jobname+"_run_"+number)
            # set the commandline that needs to be executed
            job.setCommandline(megabeast_path+' '+remote_home_dir+'/inputfiles/'+self.jobname+'/'+self.filename)
            job.setSubmissionLocation('pan:pan.nesi.org.nz')
            
            job.setCpus(self.cpus)

            job.setWalltime(self.walltime)
            
            job.setMemory(self.memory)
            
            job.setApplication('UltraBEAST')
            job.setApplicationVersion('0.1')
            
            #job.addInputFileUrl(self.filepath)
            
            # create the job on the backend and specify the VO to use
            temp_jobname = job.createJob("/nz/nesi")
            print "created job: '"+temp_jobname+"', submitting..."
            # submit the job
            job.submitJob()
            print "submission finished: " + temp_jobname
Exemplo n.º 2
0
%s
"""
if group == '':
    group = DEFAULT_GROUP
if queue == '':
    queue = DEFAULT_QUEUE

for f in sys.argv[8:]:
    input_files.append(f)

try:
    job = JobObject(si) 
    job.setSubmissionLocation(queue)
    job.setTimestampJobname("galaxy_" + galaxy_job_id)

    job.setMemory(DEFAULT_MEMORY)
    job.setWalltimeInSeconds(DEFAULT_WALLTIME)

    # stop annoying stats from being written to stderr
    job.addEnvironmentVariable("SUPPRESS_STATS", "true")

#create the job script#

except:
    print "Cannot setup the job environment"
    sys.exit(-4)

#create nesi job_script
try:
# save jobname for job
    njn = open(jobname_file, "w")