File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import sys
22import commands , os
33
4- def submitJob (cmd ):
5- print "submitting job using : %s" % cmd
4+ def runJob (cmd ):
5+ print "running job using : %s" % cmd
66 status , jobOutput = commands .getstatusoutput (cmd )
77 print ""
88 print "===================="
99 if status == 0 :
10- print "job return value : 0"
11- print "job output :"
10+ print "Job return value : 0"
11+ print "Job output :"
1212 print jobOutput
1313 else :
14- print "job failed"
15- print "job output :"
14+ print "Job failed"
15+ print "Job output :"
1616 print jobOutput
1717
1818 return status , jobOutput
1919
20- def tryJob (job_number ):
20+ def tryJob (sourceDir , targetDir ):
2121
22- sourceDir = "/store/lmfa/fct/hluo/zaurak/caseByGeometry/T/new-mesh/pointwise/postProcessing/1b_mirrorMerge/postProcessing"
23- cmd = "rsync -av newton:%s 1b_mirrorMerge/" % sourceDir
24- status , jobOutput = submitJob (cmd )
22+ #sourceDir="/store/lmfa/fct/hluo/zaurak/caseByGeometry/T/new-mesh/pointwise/postProcessing/1b_mirrorMerge/postProcessing"
23+ #targetDir="1b_mirrorMerge"
24+ cmd = "rsync -av newton:%s %s/" % (sourceDir , targetDir )
25+ status , jobOutput = runJob (cmd )
2526
2627def main ():
27- #queue = sys.argv[1]
28- tryJob (1 )
28+
29+ sourceDir = "/store/lmfa/fct/hluo/zaurak/caseByGeometry/T/new-mesh/pointwise/postProcessing/1b_mirrorMerge/postProcessing"
30+ targetDir = "1b_mirrorMerge"
31+ tryJob (sourceDir , targetDir )
2932
3033main ()
You can’t perform that action at this time.
0 commit comments