def test_palmettoSubmit(self): p = pypalmetto.Palmetto(simPBS=True) p.printStatus() def a(): print("Hello World") j = p.createJob(a) j.submit()
def test_palmettoQueue(self): p = pypalmetto.Palmetto() def a(): print("SJFKASJDF!!@#$!SAKDJFA") j = p.createJob(a) print(j.getStatus()) j.submit() print(j.getStatus()) p.runJob(j.runHash)
def test_palmettoQStat(self): p = pypalmetto.Palmetto() jobs = p.getJobsWithName('py_test') if len(jobs) == 0: print 'no jobs!' def blah(): os.system('sleep 30') print "hello world" j = p.createJob(blah, {}, 'py_test') print j print 'submitting...' j.submit() print j else: for j in jobs: print j
def test_palmettoInit(self): p = pypalmetto.Palmetto()
def test_palmettoQStat(self): p = pypalmetto.Palmetto() s = p.getJobStatusFromHash('p+mlAGtSjm//sxFW1N2gHQ==') print(pypalmetto.job.JobStatus.toStr(s))
def test_palmettoRun(self): p = pypalmetto.Palmetto() p.runJob("blksjfaskfj")
def test_palmettoStatus(self): p = pypalmetto.Palmetto() p.printStatus()
import socket import os from sh import git, cp, rm, cmake, make, mkdir, Command try: from sh import qstat except: print "No qstat found..." import argparse import pypalmetto import re palmetto = pypalmetto.Palmetto() def _print_line(line): print line.encode("utf-8") class VTPalmetto(object): def __init__(self): hostname = socket.gethostname() self.isPalmetto = hostname == 'user001' self.isPalmettoNode = 'node' in hostname if self.isPalmetto or self.isPalmettoNode: self.srcDir = '/scratch2/dndawso/vehicleTracking' self.installDir = os.environ['HOME'] + '/usr/local' self.cmakeParams = [ '-DDATA_DIR=/scratch2/dndawso/vehicleTracking/data', '-DCAFFE_DIR='+self.installDir, '-DBOOST_ROOT='+self.installDir, '-DBoost_NO_BOOST_CMAKE=ON', '-DLEVELDB_ROOT='+self.installDir, '-DUSE_MKL=ON',