[Swift-commit] r8325 - SwiftApps/dsp-swift/galaxy
ketan at ci.uchicago.edu
ketan at ci.uchicago.edu
Wed Dec 10 21:21:32 CST 2014
Author: ketan
Date: 2014-12-10 21:21:32 -0600 (Wed, 10 Dec 2014)
New Revision: 8325
Modified:
SwiftApps/dsp-swift/galaxy/setup.py
SwiftApps/dsp-swift/galaxy/swiftjumpdsp.py
Log:
adapt to dsp
Modified: SwiftApps/dsp-swift/galaxy/setup.py
===================================================================
--- SwiftApps/dsp-swift/galaxy/setup.py 2014-12-11 02:47:54 UTC (rev 8324)
+++ SwiftApps/dsp-swift/galaxy/setup.py 2014-12-11 03:21:32 UTC (rev 8325)
@@ -19,19 +19,7 @@
galaxyloc=sys.argv[1]
#step 0. Download swift-galaxy.tgz and swift-rel.tgz untar and set path
-if not os.path.isfile("/tmp/swift-galaxy.tgz"):
- urllib.urlretrieve("http://mcs.anl.gov/~ketan/swift-galaxy.tgz", filename="/tmp/swift-galaxy.tgz")
- swiftgaltar = tarfile.open("/tmp/swift-galaxy.tgz")
- swiftgaltar.extractall(path="/tmp")
- swiftgaltar.close()
-if not os.path.isfile("/tmp/swift-0.94.1-RC3.tar.gz"):
- urllib.urlretrieve("http://swift-lang.org/packages/swift-0.94.1-RC3.tar.gz", filename="/tmp/swift-0.94.1-RC3.tar.gz")
- swiftar = tarfile.open("/tmp/swift-0.94.1-RC3.tar.gz")
- swiftar.extractall(path="/tmp")
- swiftar.close()
- os.environ["PATH"] = os.environ["PATH"] + ":/tmp/swift-0.94.1-RC3/bin"
-
#step 1. Create symlink to the swift directory from the tools directory of galaxyloc if not already present
if os.path.lexists(galaxyloc+"/tools/swift"):
os.remove(galaxyloc+"/tools/swift")
Modified: SwiftApps/dsp-swift/galaxy/swiftjumpdsp.py
===================================================================
--- SwiftApps/dsp-swift/galaxy/swiftjumpdsp.py 2014-12-11 02:47:54 UTC (rev 8324)
+++ SwiftApps/dsp-swift/galaxy/swiftjumpdsp.py 2014-12-11 03:21:32 UTC (rev 8325)
@@ -187,58 +187,10 @@
f.close()
#Invocation
- if k_or_t == "swiftK":
-
- with open(logfile,"wb") as errfile:
- exitcode=subprocess.check_call([swift, "-sites.file", wdir+"/sites.xml", "-tc.file", wdir+"/tc", "-config", wdir+"/cf", wdir+"/script.swift", swiftargs],stderr=errfile)
- print exitcode
-
- else:
-
- #print "Invoking T"
- stc=distutils.spawn.find_executable("stc")
- java=distutils.spawn.find_executable("java")
- turbine= distutils.spawn.find_executable("turbine")
-
- if sites == "localhost":
-
- print "localhost"
- with open(logfile, "wb") as errfile:
- exitcode=subprocess.check_call([stc, "-j", java, wdir+"/script.swift"], stderr=errfile)
+ with open(logfile,"wb") as errfile:
+ exitcode=subprocess.check_call([swift, "-sites.file", wdir+"/sites.xml", "-tc.file", wdir+"/tc", "-config", wdir+"/cf", wdir+"/script.swift", swiftargs],stderr=errfile)
+ print exitcode
- if exitcode == 0:
- with open(logfile, "wb") as errfile, open("/dev/null", "r") as infile:
- exitcode=subprocess.check_call([turbine, "-n", str(n), wdir+"/script.tcl", swiftargs], stdin=infile, stderr=errfile)
-
- elif sites == "Vesta":
-
- print "vesta"
- pwd=os.path.getcwd()
- turbine_home="/home/wozniak/Public/sfw/turbine"
- with open(logfile, "wb") as errfile:
- exitcode=subprocess.check_call([stc, "-t", "checkpointing", "-r", pwd, "-j", java, wdir+"/script.swift"], stderr=errfile)
-
- if exitcode == 0:
- with open(logfile, "wb") as errfile, open("/dev/null", "r") as infile:
- exitcode=subprocess.check_call([turbine_home+"/scripts/submit/cobalt/turbine-cobalt-run.zsh", "-n", str(n), wdir+"/script.tcl"], stdin=infile, stderr=errfile)
-
- elif sites == "Mira":
-
- print "mira"
- pwd=os.path.getcwd()
- turbine_home="/home/wozniak/Public/sfw/ppc64/turbine"
- stc="/home/wozniak/Public/sfw/ppc64/stc/bin/stc"
- with open(logfile, "wb") as errfile:
- exitcode=subprocess.check_call([stc, "-t", "checkpointing", "-r", pwd, "-j", java, wdir+"/script.swift"], stderr=errfile)
-
- if exitcode == 0:
- with open(logfile, "wb") as errfile, open("/dev/null", "r") as infile:
- exitcode=subprocess.check_call([turbine_home+"/scripts/submit/cobalt/turbine-cobalt-run.zsh", "-n", str(n), wdir+"/script.tcl"], stdin=infile, stderr=errfile)
-
- else:
-
- print "Site not recognized."
-
#Populate output file
outlist=subprocess.check_output(["find", outloc, "-type", "f", "-iname", "*.out"])
f=open(outlistfile, "w")
More information about the Swift-commit
mailing list