From swift at ci.uchicago.edu Sun Sep 1 14:35:02 2013
From: swift at ci.uchicago.edu (swift at ci.uchicago.edu)
Date: Sun, 1 Sep 2013 14:35:02 -0500 (CDT)
Subject: [Swift-commit] cog r3768
Message-ID: <20130901193502.E66D68D000C8@bridled.ci.uchicago.edu>
------------------------------------------------------------------------
r3768 | hategan | 2013-09-01 14:34:09 -0500 (Sun, 01 Sep 2013) | 1 line
make sure things are logged before a forced shutdown
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/LocalTCPService.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/LocalTCPService.java (revision 3767)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/LocalTCPService.java (working copy)
@@ -208,7 +208,7 @@
}
public void irrecoverableChannelError(KarajanChannel channel, Exception e) {
- System.err.println("Irrecoverable channel exception: " + e.getMessage());
+ logger.error("Irrecoverable channel exception: " + e.getMessage(), e);
System.exit(2);
}
From swift at ci.uchicago.edu Mon Sep 2 03:30:05 2013
From: swift at ci.uchicago.edu (swift at ci.uchicago.edu)
Date: Mon, 2 Sep 2013 03:30:05 -0500 (CDT)
Subject: [Swift-commit] cog r3769
Message-ID: <20130902083005.1139C8D000C8@bridled.ci.uchicago.edu>
------------------------------------------------------------------------
r3769 | hategan | 2013-09-02 03:27:46 -0500 (Mon, 02 Sep 2013) | 1 line
only use auto CA if no standard proxy is present (expired or not)
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java (revision 3768)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java (working copy)
@@ -54,6 +54,7 @@
import org.globus.cog.karajan.workflow.service.channels.KarajanChannel;
import org.globus.cog.karajan.workflow.service.commands.Command;
import org.globus.cog.karajan.workflow.service.commands.Command.Callback;
+import org.globus.common.CoGProperties;
import org.ietf.jgss.GSSCredential;
public class ServiceManager implements StatusListener {
@@ -222,11 +223,27 @@
}
private void setupGSIProxy() throws IOException, GeneralSecurityException {
- AutoCA.Info result = AutoCA.getInstance().createProxy();
- System.setProperty("X509_USER_PROXY", result.proxyPath);
- System.setProperty("X509_CERT_DIR", result.caCertPath);
+ if (!checkStandardProxy()) {
+ /*
+ * only do the automatic CA if a standard proxy file does not exist
+ * to allow using things like GridFTP from the coaster service through
+ * delegation (which won't work with the auto-generated proxy).
+ */
+ logger.info("No standard proxy found. Using AutoCA.");
+ AutoCA.Info result = AutoCA.getInstance().createProxy();
+ System.setProperty("X509_USER_PROXY", result.proxyPath);
+ System.setProperty("X509_CERT_DIR", result.caCertPath);
+ }
+ else {
+ logger.info("Standard proxy file found. Disabling AutoCA.");
+ }
}
+ private boolean checkStandardProxy() {
+ File proxy = new File(CoGProperties.getDefault().getProxyFile());
+ return proxy.exists();
+ }
+
private void setSecurityContext(Task t, SecurityContext sc, String provider)
throws InvalidProviderException, ProviderMethodException {
t.getService(0).setSecurityContext(AbstractionFactory.getSecurityContext(provider, t.getService(0).getServiceContact()));
From swift at ci.uchicago.edu Mon Sep 2 03:40:04 2013
From: swift at ci.uchicago.edu (swift at ci.uchicago.edu)
Date: Mon, 2 Sep 2013 03:40:04 -0500 (CDT)
Subject: [Swift-commit] cog r3770
Message-ID: <20130902084004.59C028D000C8@bridled.ci.uchicago.edu>
------------------------------------------------------------------------
r3770 | hategan | 2013-09-02 03:36:43 -0500 (Mon, 02 Sep 2013) | 1 line
only use auto CA if no standard proxy is present (expired or not) (port from 0.94)
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java (revision 3769)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java (working copy)
@@ -55,6 +55,7 @@
import org.globus.cog.coaster.commands.Command;
import org.globus.cog.coaster.commands.Command.Callback;
import org.globus.common.CoGProperties;
+import org.globus.common.CoGProperties;
import org.ietf.jgss.GSSCredential;
public class ServiceManager implements StatusListener {
@@ -224,11 +225,27 @@
}
private void setupGSIProxy() throws IOException, GeneralSecurityException {
- AutoCA.Info result = AutoCA.getInstance().createProxy();
- System.setProperty("X509_USER_PROXY", result.proxyPath);
- System.setProperty("X509_CERT_DIR", result.caCertPath);
+ if (!checkStandardProxy()) {
+ /*
+ * only do the automatic CA if a standard proxy file does not exist
+ * to allow using things like GridFTP from the coaster service through
+ * delegation (which won't work with the auto-generated proxy).
+ */
+ logger.info("No standard proxy found. Using AutoCA.");
+ AutoCA.Info result = AutoCA.getInstance().createProxy();
+ System.setProperty("X509_USER_PROXY", result.proxyPath);
+ System.setProperty("X509_CERT_DIR", result.caCertPath);
+ }
+ else {
+ logger.info("Standard proxy file found. Disabling AutoCA.");
+ }
}
+ private boolean checkStandardProxy() {
+ File proxy = new File(CoGProperties.getDefault().getProxyFile());
+ return proxy.exists();
+ }
+
private void setSecurityContext(Task t, SecurityContext sc, String provider)
throws InvalidProviderException, ProviderMethodException {
t.getService(0).setSecurityContext(AbstractionFactory.getSecurityContext(provider, t.getService(0).getServiceContact()));
From yadunandb at ci.uchicago.edu Tue Sep 3 11:01:05 2013
From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu)
Date: Tue, 3 Sep 2013 11:01:05 -0500 (CDT)
Subject: [Swift-commit] r7025 - in
branches/release-0.94/tests/stress/patterns/pi_diamond: . quickstart
Message-ID: <20130903160105.AF0629CC9A@svn.ci.uchicago.edu>
Author: yadunandb
Date: 2013-09-03 11:01:05 -0500 (Tue, 03 Sep 2013)
New Revision: 7025
Added:
branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/
branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/README
branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/push
branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/quickstart.html
branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/quickstart.txt
branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/quickstart.txt.html
Log:
Adding the draft for quickstart to the pi example.
Added: branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/README
===================================================================
--- branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/README (rev 0)
+++ branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/README 2013-09-03 16:01:05 UTC (rev 7025)
@@ -0,0 +1,5 @@
+The push script will convert the asciidoc text to html and copy the html
+generated to the publish folder on CI login machine. The push script must
+be run on the ci login, or must be modified.
+
+
Added: branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/push
===================================================================
--- branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/push (rev 0)
+++ branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/push 2013-09-03 16:01:05 UTC (rev 7025)
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+~davidk/asciidoc-8.6.4/asciidoc -a toplevels=2 -a stylesheet=~davidk/swift-0.94/cog/modules/swift/docs/stylesheets/asciidoc.css -a max-width=800px -o quickstart.html quickstart.txt
+
+cp quickstart.html ~/public_html/
\ No newline at end of file
Property changes on: branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/push
___________________________________________________________________
Added: svn:executable
+ *
Added: branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/quickstart.html
===================================================================
--- branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/quickstart.html (rev 0)
+++ branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/quickstart.html 2013-09-03 16:01:05 UTC (rev 7025)
@@ -0,0 +1,623 @@
+
+
+
+
+
+Swift Quickstart
+
+
+
+
+
+
+
+
Download and Install
+
+
This section will get swift into your environment.
+
+
Get Java
+
Since Swift is written in Java, Java Runtime Environment 1.5 or greater is a required by Swift.
+We recommend Oracle Java, which can be downloaded from the Oracle website .
+
+
+
Get stable Swift
+
Download the latest packaged binaries from the swift downloads page .
+Untar the file, and export the path. Bash users could append their .bashrc
+file with the export statement to have swift in their path over multiple sessions.
+
+
+
wget http://swift-lang.org/packages/swift-latest.tar.gz ~
+tar -xzf ~/swift-latest.tar.gz
+export PATH=~/swift-<version>/bin:$PATH
+swift -version
+
+
+
+
+
+
Running the examples
+
+
There is an examples directory in your swift-<version> folder.
+We will go over a montecarlo simulation style workflow which finally gives us the value of pi.
+
+
These examples gets you to run a simple swift program.
+
+
+
cd examples/tutorial
+swift hello.swift
+
+
+
+
+
+
+
+
+
Added: branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/quickstart.txt
===================================================================
--- branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/quickstart.txt (rev 0)
+++ branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/quickstart.txt 2013-09-03 16:01:05 UTC (rev 7025)
@@ -0,0 +1,45 @@
+Swift Quickstart
+================
+
+Download and Install
+--------------------
+// This statment sounds bad.
+This section will get swift into your environment.
+
+Get Java
+~~~~~~~~
+Since Swift is written in Java, Java Runtime Environment 1.5 or greater is a required by Swift.
+We recommend Oracle Java, which can be downloaded from the Oracle http://www.oracle.com/technetwork/java/javase/downloads/index.html[website].
+
+
+Get stable Swift
+~~~~~~~~~~~~~~~~
+Download the latest packaged binaries from the swift downloads http://swift-lang.org/downloads/index.php[page].
+Untar the file, and export the path. Bash users could append their .bashrc
+file with the export statement to have swift in their path over multiple sessions.
+
+-----
+wget http://swift-lang.org/packages/swift-latest.tar.gz ~
+tar -xzf ~/swift-latest.tar.gz
+export PATH=~/swift-/bin:$PATH
+swift -version
+-----
+
+Running the examples
+--------------------
+
+There is an examples directory in your swift- folder.
+We will go over a montecarlo simulation style workflow which finally gives us the value of pi.
+
+In the swift-
+
+These examples gets you to run a simple swift program.
+
+-----
+cd examples/tutorial
+swift hello.swift
+-----
+
+
+More documentation on how to run Swift can be found at
+http://www.ci.uchicago.edu/swift/docs/index.php.
Added: branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/quickstart.txt.html
===================================================================
--- branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/quickstart.txt.html (rev 0)
+++ branches/release-0.94/tests/stress/patterns/pi_diamond/quickstart/quickstart.txt.html 2013-09-03 16:01:05 UTC (rev 7025)
@@ -0,0 +1,649 @@
+
+
+
+
+
+Swift Quickstart
+
+
+
+
+
+
+
+
Download & Install
+
+
+
+
Get stable Swift (Recommended)
+
Download the latest packaged binaries from the swift downloads page <Link>
+Untar the file, and export the path. Bash users could append their .bashrc
+file with the export statement to have swift in their path over multiple sessions.
+
+
+
wget http://swift-lang.org/packages/swift-latest.tar.gz ~
+tar -xzf ~/swift-latest.tar.gz
+export PATH=~/swift-<version>/bin:$PATH
+swift -version
+
+
+
+
Installing latest Swift from source
+
For the more adventurous, get the latest source code and build.
+
+
+
mkdir ~/swift-devel
+cd ~/swift-devel
+svn co https://svn.code.sf.net/p/cogkit/svn/trunk/src/cog
+cd cog/modules
+svn co https://svn.ci.uchicago.edu/svn/vdl2/trunk swift
+cd swift
+ant redist
+# TODO: THE NEXT STEP IS UGLY
+export PATH=~/swift-devel/cog/modules/swift/dist/swift-svn/bin:$PATH
+
+
+
+
+
+
Running the examples
+
+
If you downloaded the stable release, there is example directory in your swift-<version>
+folder. The same examples are present in the swift-devel/cog/modules/swift/examples directory
+if you built swift from the latest sources.
+
These examples gets you to run a simple swift program.
+
+
+
cd examples/tutorial
+swift hello.swift
+
+
When you run this application, it should create a file called hello.txt.
+If this file gets created, you have successfully ran your first
+Swift script!
+
+
+
+
+
+
+
+
From wilde at ci.uchicago.edu Tue Sep 3 13:19:10 2013
From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu)
Date: Tue, 3 Sep 2013 13:19:10 -0500 (CDT)
Subject: [Swift-commit] r7026 -
branches/release-0.94/tests/stress/patterns/pi_diamond
Message-ID: <20130903181910.B6519178884@svn.ci.uchicago.edu>
Author: wilde
Date: 2013-09-03 13:19:10 -0500 (Tue, 03 Sep 2013)
New Revision: 7026
Added:
branches/release-0.94/tests/stress/patterns/pi_diamond/analyze.sh
branches/release-0.94/tests/stress/patterns/pi_diamond/random_points.sh
Modified:
branches/release-0.94/tests/stress/patterns/pi_diamond/analyse.sh
Log:
Proposed simpler versions of the apps. Suggest these be listed in apps rather than passed as scripts.
Modified: branches/release-0.94/tests/stress/patterns/pi_diamond/analyse.sh
===================================================================
--- branches/release-0.94/tests/stress/patterns/pi_diamond/analyse.sh 2013-09-03 16:01:05 UTC (rev 7025)
+++ branches/release-0.94/tests/stress/patterns/pi_diamond/analyse.sh 2013-09-03 18:19:10 UTC (rev 7026)
@@ -14,4 +14,4 @@
echo "TOTAL OUT: $OUT"
# PI = (IN * 4)/ (IN+OUT)
echo -n "PI :"
-echo "scale=10; ($IN * 4)/($IN+$OUT)" | bc
\ No newline at end of file
+echo "scale=10; ($IN * 4)/($IN+$OUT)" | bc
Added: branches/release-0.94/tests/stress/patterns/pi_diamond/analyze.sh
===================================================================
--- branches/release-0.94/tests/stress/patterns/pi_diamond/analyze.sh (rev 0)
+++ branches/release-0.94/tests/stress/patterns/pi_diamond/analyze.sh 2013-09-03 18:19:10 UTC (rev 7026)
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+awk '
+$3 < 1.0 { inCircle++; }
+ { n++ }
+END {
+ print inCircle * 4.0 / n
+}' $*
Property changes on: branches/release-0.94/tests/stress/patterns/pi_diamond/analyze.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: branches/release-0.94/tests/stress/patterns/pi_diamond/random_points.sh
===================================================================
--- branches/release-0.94/tests/stress/patterns/pi_diamond/random_points.sh (rev 0)
+++ branches/release-0.94/tests/stress/patterns/pi_diamond/random_points.sh 2013-09-03 18:19:10 UTC (rev 7026)
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+NPOINTS=${1:-100}
+
+awk "
+BEGIN {
+ srand($RANDOM)
+ for (i=0;i<$NPOINTS;i++) {
+ x=rand()
+ y=rand()
+ radius=sqrt((x*x)+(y*y))
+ print x, y, radius
+ }
+}"
Property changes on: branches/release-0.94/tests/stress/patterns/pi_diamond/random_points.sh
___________________________________________________________________
Added: svn:executable
+ *
From davidk at ci.uchicago.edu Tue Sep 3 15:37:36 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Tue, 3 Sep 2013 15:37:36 -0500 (CDT)
Subject: [Swift-commit] r7027 - SwiftTutorials
Message-ID: <20130903203736.601109CC9A@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-03 15:37:36 -0500 (Tue, 03 Sep 2013)
New Revision: 7027
Added:
SwiftTutorials/tutorial-0.94.1/
Log:
Tutorial directory for 0.94.1 - multiple site tutorials to be combined here
From hategan at ci.uchicago.edu Tue Sep 3 17:25:46 2013
From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu)
Date: Tue, 3 Sep 2013 17:25:46 -0500 (CDT)
Subject: [Swift-commit] r7029 -
trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http
Message-ID: <20130903222546.4BC6B9CC9A@svn.ci.uchicago.edu>
Author: hategan
Date: 2013-09-03 17:25:46 -0500 (Tue, 03 Sep 2013)
New Revision: 7029
Modified:
trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/HTTPServer.java
Log:
fixed missing resource with http monitor
Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/HTTPServer.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/HTTPServer.java 2013-09-03 20:41:03 UTC (rev 7028)
+++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/HTTPServer.java 2013-09-03 22:25:46 UTC (rev 7029)
@@ -46,7 +46,7 @@
public class HTTPServer implements Runnable {
public static final Logger logger = Logger.getLogger(HTTPServer.class);
- public static final String WEB_DIR = "httpmonitor/";
+ public static final String WEB_DIR = "httpmonitor";
private ServerSocketChannel channel;
private ConnectionProcessor connectionProcessor;
From hategan at ci.uchicago.edu Tue Sep 3 23:26:29 2013
From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu)
Date: Tue, 3 Sep 2013 23:26:29 -0500 (CDT)
Subject: [Swift-commit] r7030 - in trunk/resources/httpmonitor: . js
Message-ID: <20130904042629.8A05A178884@svn.ci.uchicago.edu>
Author: hategan
Date: 2013-09-03 23:26:29 -0500 (Tue, 03 Sep 2013)
New Revision: 7030
Modified:
trunk/resources/httpmonitor/index.html
trunk/resources/httpmonitor/js/plots.js
Log:
http monitor: removed debugging text at bottom of screen; minumum plot area size for plots page resize plot area when a plot is created
Modified: trunk/resources/httpmonitor/index.html
===================================================================
--- trunk/resources/httpmonitor/index.html 2013-09-03 22:25:46 UTC (rev 7029)
+++ trunk/resources/httpmonitor/index.html 2013-09-04 04:26:29 UTC (rev 7030)
@@ -118,8 +118,6 @@
$("#pbi-main").progressbar("option", "max", parseInt(data["total"]));
$("#pbi-main").progressbar("option", "value", parseInt(data["completed"]));
$(".pbl", "#pbi-main").text(data["progressString"]);
-
- $("#error-text").html(s);
}
}
Modified: trunk/resources/httpmonitor/js/plots.js
===================================================================
--- trunk/resources/httpmonitor/js/plots.js 2013-09-03 22:25:46 UTC (rev 7029)
+++ trunk/resources/httpmonitor/js/plots.js 2013-09-04 04:26:29 UTC (rev 7030)
@@ -1,6 +1,9 @@
var DEFAULT_PLOT_COLORS = ["#bf5b17", "#33a02c", "#386cb0", "#f0027f", "#ffff99", "#fdc086",
"#beaed4", "#666666", "#7fc97f", "#ff7f00", "#fdbf6f", "#e31a1c"];
+var MIN_AREA_WIDTH = 640;
+var MIN_AREA_HEIGHT = 200;
+
function addPlot() {
var index = document.currentPlotIndex++;
$("#plots").append('\
@@ -190,6 +193,8 @@
document.plots[index] = plot;
plot.setupGrid();
plot.draw();
+
+ resizePlotsContainer();
}
function removePlot(index) {
@@ -704,6 +709,13 @@
}
}
+ if (w < MIN_AREA_WIDTH) {
+ w = MIN_AREA_WIDTH;
+ }
+ if (h < MIN_AREA_HEIGHT) {
+ h = MIN_AREA_HEIGHT;
+ }
+
$("#tabs").css("width", (w + 8) + "px");
$("#tabs").css("height", (h + 8) + "px");
}
From davidk at ci.uchicago.edu Wed Sep 4 11:27:21 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Wed, 4 Sep 2013 11:27:21 -0500 (CDT)
Subject: [Swift-commit] r7031 - in branches/release-0.94/tests: .
sites/blues sites/fusion sites/raven sites/stampede
Message-ID: <20130904162721.3C0399CCB4@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-04 11:27:20 -0500 (Wed, 04 Sep 2013)
New Revision: 7031
Modified:
branches/release-0.94/tests/sites/blues/sites.template.xml
branches/release-0.94/tests/sites/fusion/sanity.setup.sh
branches/release-0.94/tests/sites/raven/sanity.setup.sh
branches/release-0.94/tests/sites/stampede/sanity.setup.sh
branches/release-0.94/tests/user_env.sh
Log:
Add ability to override usernames for more machines
Modified: branches/release-0.94/tests/sites/blues/sites.template.xml
===================================================================
--- branches/release-0.94/tests/sites/blues/sites.template.xml 2013-09-04 04:26:29 UTC (rev 7030)
+++ branches/release-0.94/tests/sites/blues/sites.template.xml 2013-09-04 16:27:20 UTC (rev 7031)
@@ -1,6 +1,6 @@
-
+
3600
2
@@ -13,6 +13,6 @@
10000
1000
1000
- {env.HOME}/swiftwork
+ /home/{env.USER}/swiftwork
Modified: branches/release-0.94/tests/sites/fusion/sanity.setup.sh
===================================================================
--- branches/release-0.94/tests/sites/fusion/sanity.setup.sh 2013-09-04 04:26:29 UTC (rev 7030)
+++ branches/release-0.94/tests/sites/fusion/sanity.setup.sh 2013-09-04 16:27:20 UTC (rev 7031)
@@ -1,6 +1,6 @@
#!/bin/bash
-USERNAME=$BLUES_USERNAME
+USERNAME=$FUSION_USERNAME
if [[ -z $USERNAME ]]
then
Modified: branches/release-0.94/tests/sites/raven/sanity.setup.sh
===================================================================
--- branches/release-0.94/tests/sites/raven/sanity.setup.sh 2013-09-04 04:26:29 UTC (rev 7030)
+++ branches/release-0.94/tests/sites/raven/sanity.setup.sh 2013-09-04 16:27:20 UTC (rev 7031)
@@ -1,6 +1,6 @@
#!/bin/bash
-USERNAME=$BLUES_USERNAME
+USERNAME=$RAVEN_USERNAME
if [[ -z $USERNAME ]]
then
Modified: branches/release-0.94/tests/sites/stampede/sanity.setup.sh
===================================================================
--- branches/release-0.94/tests/sites/stampede/sanity.setup.sh 2013-09-04 04:26:29 UTC (rev 7030)
+++ branches/release-0.94/tests/sites/stampede/sanity.setup.sh 2013-09-04 16:27:20 UTC (rev 7031)
@@ -1,6 +1,6 @@
#!/bin/bash
-USERNAME=$BLUES_USERNAME
+USERNAME=$STAMPEDE_USERNAME
if [[ -z $USERNAME ]]
then
Modified: branches/release-0.94/tests/user_env.sh
===================================================================
--- branches/release-0.94/tests/user_env.sh 2013-09-04 04:26:29 UTC (rev 7030)
+++ branches/release-0.94/tests/user_env.sh 2013-09-04 16:27:20 UTC (rev 7031)
@@ -1,6 +1,10 @@
export BEAGLE_USERNAME=""
+export BLUES_USERNAME=""
+export FUSION_USERNAME=""
+export MCS_USERNAME=""
export MIDWAY_USERNAME=""
-export MCS_USERNAME=""
+export RAVEN_USERNAME=""
+export STAMPEDE_USERNAME=""
export UC3_USERNAME=""
if [ $( hostname ) == "midway001" ]
From davidk at ci.uchicago.edu Wed Sep 4 12:55:20 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Wed, 4 Sep 2013 12:55:20 -0500 (CDT)
Subject: [Swift-commit] r7032 - in branches/release-0.94/tests: .
sites/blues sites/fusion
Message-ID: <20130904175520.CF7319CC90@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-04 12:55:20 -0500 (Wed, 04 Sep 2013)
New Revision: 7032
Modified:
branches/release-0.94/tests/sites/blues/sites.template.xml
branches/release-0.94/tests/sites/fusion/sites.template.xml
branches/release-0.94/tests/suite.sh
Log:
Some updates to templates for blues and fusion, and ignore ifconfig warnings when setting globus hostname in suite.sh
Modified: branches/release-0.94/tests/sites/blues/sites.template.xml
===================================================================
--- branches/release-0.94/tests/sites/blues/sites.template.xml 2013-09-04 16:27:20 UTC (rev 7031)
+++ branches/release-0.94/tests/sites/blues/sites.template.xml 2013-09-04 17:55:20 UTC (rev 7032)
@@ -2,7 +2,7 @@
- 3600
+ 00:00:30
2
8
route
@@ -11,8 +11,6 @@
2
2.20
10000
- 1000
- 1000
/home/{env.USER}/swiftwork
Modified: branches/release-0.94/tests/sites/fusion/sites.template.xml
===================================================================
--- branches/release-0.94/tests/sites/fusion/sites.template.xml 2013-09-04 16:27:20 UTC (rev 7031)
+++ branches/release-0.94/tests/sites/fusion/sites.template.xml 2013-09-04 17:55:20 UTC (rev 7032)
@@ -1,8 +1,8 @@
-
+
- 3600
+ 00:00:30
2
1
2
@@ -10,9 +10,7 @@
shared
5.99
10000
- 1000
- 1000
- /homes/davidk/test4
+ /homes/{env.USER}/swiftwork
Modified: branches/release-0.94/tests/suite.sh
===================================================================
--- branches/release-0.94/tests/suite.sh 2013-09-04 16:27:20 UTC (rev 7031)
+++ branches/release-0.94/tests/suite.sh 2013-09-04 17:55:20 UTC (rev 7032)
@@ -979,7 +979,7 @@
IFCONFIG=/sbin/ifconfig
fi
$IFCONFIG > /dev/null 2>&1 || crash "Cannot run ifconfig!"
-export GLOBUS_HOSTNAME=$( $IFCONFIG | grep inet | head -1 | cut -d ':' -f 2 | \
+export GLOBUS_HOSTNAME=$( $IFCONFIG 2>/dev/null | grep inet | head -1 | cut -d ':' -f 2 | \
awk '{print $1}' )
[ $? != 0 ] && crash "Could not obtain GLOBUS_HOSTNAME!"
From davidk at ci.uchicago.edu Wed Sep 4 13:02:47 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Wed, 4 Sep 2013 13:02:47 -0500 (CDT)
Subject: [Swift-commit] r7033 - tags
Message-ID: <20130904180247.4C6B79CC90@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-04 13:02:47 -0500 (Wed, 04 Sep 2013)
New Revision: 7033
Added:
tags/swift-0.94.1-RC3/
Log:
0.94.1-RC3
From davidk at ci.uchicago.edu Wed Sep 4 13:14:59 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Wed, 4 Sep 2013 13:14:59 -0500 (CDT)
Subject: [Swift-commit] r7034 - tags/swift-0.94.1-RC3/libexec
Message-ID: <20130904181459.939A89CC90@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-04 13:14:59 -0500 (Wed, 04 Sep 2013)
New Revision: 7034
Modified:
tags/swift-0.94.1-RC3/libexec/release.txt
Log:
Release name
Modified: tags/swift-0.94.1-RC3/libexec/release.txt
===================================================================
--- tags/swift-0.94.1-RC3/libexec/release.txt 2013-09-04 18:02:47 UTC (rev 7033)
+++ tags/swift-0.94.1-RC3/libexec/release.txt 2013-09-04 18:14:59 UTC (rev 7034)
@@ -1 +1 @@
-0.94
+0.94.1 RC3
From davidk at ci.uchicago.edu Wed Sep 4 13:34:12 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Wed, 4 Sep 2013 13:34:12 -0500 (CDT)
Subject: [Swift-commit] r7035 - in www: downloads inc main
Message-ID: <20130904183412.053909CC90@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-04 13:34:11 -0500 (Wed, 04 Sep 2013)
New Revision: 7035
Modified:
www/downloads/index.php
www/inc/downloads_sidebar.php
www/main/index.php
Log:
RC3
Modified: www/downloads/index.php
===================================================================
--- www/downloads/index.php 2013-09-04 18:14:59 UTC (rev 7034)
+++ www/downloads/index.php 2013-09-04 18:34:11 UTC (rev 7035)
@@ -35,17 +35,17 @@
Swift Usage Tracking Policy .
-Latest Release
+
-
Swift 0.94.1 RC2 - 2013/08/20
+
Swift 0.94.1 RC3 - 2013/09/04
For the majority of users, this is the version you will want to download. This package
contains the latest Stable release of Swift. Since Swift is written in Java, this
package will run on all supported platforms with Java Runtime Environment 1.6 or greater.
Precompiled binary distribution
-[swift-0.94.1-RC2.tar.gz ]
+[swift-0.94.1-RC3.tar.gz ]
Source Code
Modified: www/inc/downloads_sidebar.php
===================================================================
--- www/inc/downloads_sidebar.php 2013-09-04 18:14:59 UTC (rev 7034)
+++ www/inc/downloads_sidebar.php 2013-09-04 18:34:11 UTC (rev 7035)
@@ -1,7 +1,7 @@
-
-
0.94.1 RC2 current version
2013/08/20
+
+
0.94.1 RC3 current version
2013/09/04
Modified: www/main/index.php
===================================================================
--- www/main/index.php 2013-09-04 18:14:59 UTC (rev 7034)
+++ www/main/index.php 2013-09-04 18:34:11 UTC (rev 7035)
@@ -62,7 +62,8 @@
-
0.94.1 RC2 current version
2013/08/20
+
0.94.1 RC3 current version
2013/09/04
+u
Read our Quick Start Guide
and start using Swift today!
From davidk at ci.uchicago.edu Wed Sep 4 13:59:33 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Wed, 4 Sep 2013 13:59:33 -0500 (CDT)
Subject: [Swift-commit] r7036 - branches/release-0.94/tests/sites/stampede
Message-ID: <20130904185933.CD6A59CCB4@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-04 13:59:33 -0500 (Wed, 04 Sep 2013)
New Revision: 7036
Modified:
branches/release-0.94/tests/sites/stampede/sites.template.xml
Log:
Stampede site test (gt2/gridftp)
Modified: branches/release-0.94/tests/sites/stampede/sites.template.xml
===================================================================
--- branches/release-0.94/tests/sites/stampede/sites.template.xml 2013-09-04 18:34:11 UTC (rev 7035)
+++ branches/release-0.94/tests/sites/stampede/sites.template.xml 2013-09-04 18:59:33 UTC (rev 7036)
@@ -1,6 +1,22 @@
+
-
+
+
+ 16
+ 16
+ 00:00:30
+ normal
+ 1
+ 1
+ TG-MCA94P017
+ .3199
+ 10000
+ /scratch/01503/{env.USER}/work
+
+
+
+
16
16
@@ -11,7 +27,8 @@
TG-MCA94P017
2
10000
- {env.SCRATCH}
+ /scratch/01503/{env.USER}/work
+
From swift at ci.uchicago.edu Thu Sep 5 14:40:03 2013
From: swift at ci.uchicago.edu (swift at ci.uchicago.edu)
Date: Thu, 5 Sep 2013 14:40:03 -0500 (CDT)
Subject: [Swift-commit] cog r3776
Message-ID: <20130905194003.9BB8B8D000C8@bridled.ci.uchicago.edu>
------------------------------------------------------------------------
r3776 | hategan | 2013-09-05 14:39:16 -0500 (Thu, 05 Sep 2013) | 1 line
set a limit of 10 seconds to wait for services to acknowledge shutdown
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java (revision 3775)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java (working copy)
@@ -67,6 +67,11 @@
public static final String TASK_ATTR_ID = "coaster:serviceid";
public static final String ATTR_USER_HOME_OVERRIDE = "userHomeOverride";
+
+ /**
+ * Maximum time to wait for services to acknowledge shutdown
+ */
+ public static final int REAPER_MAX_WAIT_TIME = 10 * 1000;
private static ServiceManager defaultManager;
@@ -474,6 +479,7 @@
public void run() {
logger.info("Cleaning up...");
count = services.size();
+ int waited = 0;
for (String url : services.values()) {
Object cred = credentials.get(url);
try {
@@ -491,9 +497,10 @@
}
}
synchronized (this) {
- while (count > 0) {
+ while (count > 0 && waited < REAPER_MAX_WAIT_TIME) {
try {
wait(100);
+ waited += 100;
}
catch (InterruptedException e) {
return;
From swift at ci.uchicago.edu Thu Sep 5 14:55:03 2013
From: swift at ci.uchicago.edu (swift at ci.uchicago.edu)
Date: Thu, 5 Sep 2013 14:55:03 -0500 (CDT)
Subject: [Swift-commit] cog r3777
Message-ID: <20130905195504.04C4B8D000C8@bridled.ci.uchicago.edu>
------------------------------------------------------------------------
r3777 | hategan | 2013-09-05 14:51:12 -0500 (Thu, 05 Sep 2013) | 1 line
don't keep planning blocks if shutting down
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java (revision 3776)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java (working copy)
@@ -79,7 +79,7 @@
private ChannelContext clientChannelContext;
- private boolean done, planning;
+ private boolean done, planning, shuttingDown;
private final Metric metric;
@@ -131,7 +131,7 @@
try {
script = ScriptManager.writeScript();
int planTimeMillis = 1;
- while (!done) {
+ while (!done && !shuttingDown) {
if (logger.isDebugEnabled()) {
logger.debug("Holding queue job count: " +
holding.size());
@@ -149,6 +149,9 @@
incoming.wait(Math.min(planTimeMillis * 20, 10000) + 1000);
}
}
+ if (shuttingDown) {
+ logger.info("Service shutting down. Exiting planning loop.");
+ }
}
catch (Exception e) {
CoasterService.error(13, "Exception caught in block processor", e);
@@ -787,6 +790,9 @@
@Override
public void shutdown() {
+ synchronized(holding) {
+ shuttingDown = true;
+ }
shutdownBlocks();
done = true;
}
From swift at ci.uchicago.edu Fri Sep 6 17:00:05 2013
From: swift at ci.uchicago.edu (swift at ci.uchicago.edu)
Date: Fri, 6 Sep 2013 17:00:05 -0500 (CDT)
Subject: [Swift-commit] cog r3778
Message-ID: <20130906220005.7F4E98D000C8@bridled.ci.uchicago.edu>
------------------------------------------------------------------------
r3778 | hategan | 2013-09-06 16:55:40 -0500 (Fri, 06 Sep 2013) | 1 line
bulk old proxy delete operations
------------------------------------------------------------------------
Index: modules/provider-ssh/src/org/globus/cog/abstraction/impl/sshcl/execution/SSHCLProxyForwarder.java
===================================================================
--- modules/provider-ssh/src/org/globus/cog/abstraction/impl/sshcl/execution/SSHCLProxyForwarder.java (revision 3777)
+++ modules/provider-ssh/src/org/globus/cog/abstraction/impl/sshcl/execution/SSHCLProxyForwarder.java (working copy)
@@ -44,6 +44,8 @@
public class SSHCLProxyForwarder extends ProxyForwarder {
public static final Logger logger = Logger.getLogger(SSHCLProxyForwarder.class);
+ public static final int DELETE_BULK_SIZE = 10;
+
private String host;
private int port;
private Properties properties;
@@ -150,6 +152,7 @@
logger.info("Cleaning up old proxies");
String output = runSSH(new String[] {"ls", "-1", globusDir + "/ssh*-*-*"});
String[] files = output.split("\\n");
+ List
deleteQueue = new ArrayList();
long nowSecs = System.currentTimeMillis() / 1000;
for (String f : files) {
f = f.substring(f.lastIndexOf('/') + 1);
@@ -157,11 +160,16 @@
if (m.matches()) {
long expirationTime = Long.parseLong(m.group(3));
if (expirationTime < nowSecs) {
- logger.info("Removing " + f);
- runSSH(new String[] {"rm", "-f", globusDir + "/" + f});
+ deleteQueue.add(globusDir + "/" + f);
+ if (deleteQueue.size() == DELETE_BULK_SIZE) {
+ deleteFiles(deleteQueue);
+ }
}
}
}
+ // delete remaining files
+ deleteFiles(deleteQueue);
+
}
catch (IOException e) {
if (e.getMessage() == null
@@ -175,6 +183,21 @@
}
}
+ private void deleteFiles(List l) throws IOException {
+ if (l.isEmpty()) {
+ return;
+ }
+
+ logger.info("Removing " + l);
+ String[] cmdline = new String[l.size() + 2];
+ cmdline[0] = "rm";
+ cmdline[1] = "-f";
+ for (int i = 0; i < l.size(); i++) {
+ cmdline[i + 2] = l.get(i);
+ }
+ runSSH(cmdline);
+ }
+
private String makeGlobusDir() throws IOException {
String h = runSSH(new String[] {"mkdir", "-p", "~/.globus", ";", "ls", "-d", "~"});
return h.trim() + "/.globus";
From hategan at ci.uchicago.edu Fri Sep 6 18:22:27 2013
From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu)
Date: Fri, 6 Sep 2013 18:22:27 -0500 (CDT)
Subject: [Swift-commit] r7037 - trunk/src/org/griphyn/vdl/karajan
Message-ID: <20130906232227.A1C419CCB4@svn.ci.uchicago.edu>
Author: hategan
Date: 2013-09-06 18:22:27 -0500 (Fri, 06 Sep 2013)
New Revision: 7037
Modified:
trunk/src/org/griphyn/vdl/karajan/Loader.java
Log:
nicer error messages if run fails to start
Modified: trunk/src/org/griphyn/vdl/karajan/Loader.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/Loader.java 2013-09-04 18:59:33 UTC (rev 7036)
+++ trunk/src/org/griphyn/vdl/karajan/Loader.java 2013-09-06 23:22:27 UTC (rev 7037)
@@ -169,7 +169,6 @@
}
}
catch (Exception e) {
- e.printStackTrace();
logger.debug("Detailed exception:", e);
error("Could not start execution" + getMessages(e));
}
@@ -256,7 +255,12 @@
StringBuilder sb = new StringBuilder();
while (e != null) {
sb.append(":\n\t");
- sb.append(e.toString());
+ if (e.getMessage() != null) {
+ sb.append(e.getMessage());
+ }
+ else {
+ sb.append(e.toString());
+ }
e = e.getCause();
}
return sb.toString();
From hategan at ci.uchicago.edu Fri Sep 6 18:23:21 2013
From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu)
Date: Fri, 6 Sep 2013 18:23:21 -0500 (CDT)
Subject: [Swift-commit] r7038 - trunk/src/org/griphyn/vdl/util
Message-ID: <20130906232321.87D899CCB4@svn.ci.uchicago.edu>
Author: hategan
Date: 2013-09-06 18:23:21 -0500 (Fri, 06 Sep 2013)
New Revision: 7038
Added:
trunk/src/org/griphyn/vdl/util/ConfigPropertyType.java
Modified:
trunk/src/org/griphyn/vdl/util/VDL2Config.java
Log:
validate entries in swift.properties when loading
Added: trunk/src/org/griphyn/vdl/util/ConfigPropertyType.java
===================================================================
--- trunk/src/org/griphyn/vdl/util/ConfigPropertyType.java (rev 0)
+++ trunk/src/org/griphyn/vdl/util/ConfigPropertyType.java 2013-09-06 23:23:21 UTC (rev 7038)
@@ -0,0 +1,108 @@
+//----------------------------------------------------------------------
+//This code is developed as part of the Java CoG Kit project
+//The terms of the license can be found at http://www.cogkit.org/license
+//This message may not be removed or altered.
+//----------------------------------------------------------------------
+
+/*
+ * Created on Sep 6, 2013
+ */
+package org.griphyn.vdl.util;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+public abstract class ConfigPropertyType {
+ public static final ConfigPropertyType BOOLEAN = choices("true", "false");
+ public static final ConfigPropertyType ONOFF = choices("on", "off");
+ public static final ConfigPropertyType STRING = new CPTString();
+ public static final ConfigPropertyType INT = new Int();
+ public static final ConfigPropertyType FLOAT = new CPTFloat();
+ public static final ConfigPropertyType FILE = new CPTFile();
+
+ public static ConfigPropertyType choices(String... values) {
+ return new Choices(values);
+ }
+
+ public abstract void checkValue(String propName, String value);
+
+ private static String pp(Collection c) {
+ StringBuilder sb = new StringBuilder();
+ Iterator i = c.iterator();
+ while (i.hasNext()) {
+ sb.append('\'');
+ sb.append(i.next());
+ sb.append('\'');
+ if (i.hasNext()) {
+ sb.append(", ");
+ }
+ }
+ return sb.toString();
+ }
+
+ private static class Choices extends ConfigPropertyType {
+ private SortedSet choices;
+
+ public Choices(String... values) {
+ choices = new TreeSet();
+ for (String value : values) {
+ choices.add(value);
+ }
+ }
+
+ @Override
+ public void checkValue(String propName, String value) {
+ if (!choices.contains(value)) {
+ throw new IllegalArgumentException("Invalid value '" + value + "' for property '" +
+ propName + "'. Valid values are: " + pp(choices));
+ }
+ }
+ }
+
+ private static class CPTString extends ConfigPropertyType {
+ @Override
+ public void checkValue(String propName, String value) {
+ // all values accepted
+ }
+ }
+
+ private static class Int extends ConfigPropertyType {
+ @Override
+ public void checkValue(String propName, String value) {
+ try {
+ Integer.parseInt(value);
+ }
+ catch (NumberFormatException e) {
+ throw new IllegalArgumentException("Invalid value '" + value + "' for property '" +
+ propName + "'. Must be an integer");
+ }
+ }
+ }
+
+ private static class CPTFloat extends ConfigPropertyType {
+ @Override
+ public void checkValue(String propName, String value) {
+ try {
+ Double.parseDouble(value);
+ }
+ catch (NumberFormatException e) {
+ throw new IllegalArgumentException("Invalid value '" + value + "' for property '" +
+ propName + "'. Must be a floating point number.");
+ }
+ }
+ }
+
+ private static class CPTFile extends ConfigPropertyType {
+ @Override
+ public void checkValue(String propName, String value) {
+ File f = new File(value);
+ if (!f.exists()) {
+ throw new IllegalArgumentException("Invalid value '" + value + "' for property '" +
+ propName + "'. File does not exist.");
+ }
+ }
+ }
+}
Modified: trunk/src/org/griphyn/vdl/util/VDL2Config.java
===================================================================
--- trunk/src/org/griphyn/vdl/util/VDL2Config.java 2013-09-06 23:22:27 UTC (rev 7037)
+++ trunk/src/org/griphyn/vdl/util/VDL2Config.java 2013-09-06 23:23:21 UTC (rev 7038)
@@ -24,12 +24,13 @@
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
import java.util.Properties;
import org.apache.log4j.Logger;
-
import org.globus.cog.karajan.util.BoundContact;
import org.globus.common.CoGProperties;
@@ -82,44 +83,47 @@
}
private List files, tried;
+ private Map types;
private VDL2Config() {
files = new LinkedList();
tried = new LinkedList();
- put(VDL2ConfigProperties.POOL_FILE, "${vds.home}/etc/sites.xml");
- put(VDL2ConfigProperties.TC_FILE, "${vds.home}/var/tc.data");
- put(VDL2ConfigProperties.LAZY_ERRORS, "false");
- put(VDL2ConfigProperties.CACHING_ALGORITHM, "LRU");
- put(VDL2ConfigProperties.PGRAPH, "false");
- put(VDL2ConfigProperties.PGRAPH_GRAPH_OPTIONS, "splines=\"compound\", rankdir=\"TB\"");
- put(VDL2ConfigProperties.PGRAPH_NODE_OPTIONS, "color=\"seagreen\", style=\"filled\"");
- put(VDL2ConfigProperties.CLUSTERING_ENABLED, "false");
- put(VDL2ConfigProperties.CLUSTERING_QUEUE_DELAY, "4");
- put(VDL2ConfigProperties.CLUSTERING_MIN_TIME, "60");
- put(VDL2ConfigProperties.KICKSTART_ENABLED, "maybe");
- put(VDL2ConfigProperties.KICKSTART_ALWAYS_TRANSFER, "false");
- put("throttle.submit", "4");
- put("throttle.host.submit", "2");
- put("throttle.transfers", "4");
- put("throttle.file.operations", "8");
- put("throttle.score.job.factor", "4");
- put(VDL2ConfigProperties.SITEDIR_KEEP, "false");
- put(VDL2ConfigProperties.PROVENANCE_LOG, "false");
+ types = new HashMap();
+ put(VDL2ConfigProperties.POOL_FILE, "${swift.home}/etc/sites.xml", ConfigPropertyType.FILE);
+ put(VDL2ConfigProperties.TC_FILE, "${swift.home}/etc/tc.data", ConfigPropertyType.FILE);
+ put(VDL2ConfigProperties.LAZY_ERRORS, "false", ConfigPropertyType.BOOLEAN);
+ put(VDL2ConfigProperties.CACHING_ALGORITHM, "LRU", ConfigPropertyType.STRING);
+ put(VDL2ConfigProperties.PGRAPH, "false", ConfigPropertyType.BOOLEAN);
+ put(VDL2ConfigProperties.PGRAPH_GRAPH_OPTIONS, "splines=\"compound\", rankdir=\"TB\"", ConfigPropertyType.STRING);
+ put(VDL2ConfigProperties.PGRAPH_NODE_OPTIONS, "color=\"seagreen\", style=\"filled\"", ConfigPropertyType.STRING);
+ put(VDL2ConfigProperties.CLUSTERING_ENABLED, "false", ConfigPropertyType.BOOLEAN);
+ put(VDL2ConfigProperties.CLUSTERING_QUEUE_DELAY, "4", ConfigPropertyType.INT);
+ put(VDL2ConfigProperties.CLUSTERING_MIN_TIME, "60", ConfigPropertyType.INT);
+ put(VDL2ConfigProperties.KICKSTART_ENABLED, "maybe", ConfigPropertyType.choices("true", "false", "maybe"));
+ put(VDL2ConfigProperties.KICKSTART_ALWAYS_TRANSFER, "false", ConfigPropertyType.BOOLEAN);
+ put("throttle.submit", "4", ConfigPropertyType.INT);
+ put("throttle.host.submit", "2", ConfigPropertyType.INT);
+ put("throttle.transfers", "4", ConfigPropertyType.INT);
+ put("throttle.file.operations", "8", ConfigPropertyType.INT);
+ put("throttle.score.job.factor", "4", ConfigPropertyType.FLOAT);
+ put(VDL2ConfigProperties.SITEDIR_KEEP, "false", ConfigPropertyType.BOOLEAN);
+ put(VDL2ConfigProperties.PROVENANCE_LOG, "false", ConfigPropertyType.BOOLEAN);
- put("replication.enabled", "false");
- put("replication.min.queue.time", "60");
- put("replication.limit", "3");
- put("status.mode", "files");
- put("wrapper.parameter.mode", "args");
- put("wrapper.invocation.mode", "absolute");
+ put("replication.enabled", "false", ConfigPropertyType.BOOLEAN);
+ put("replication.min.queue.time", "60", ConfigPropertyType.INT);
+ put("replication.limit", "3", ConfigPropertyType.INT);
+ put("status.mode", "files", ConfigPropertyType.choices("files", "provider"));
+ put("wrapper.parameter.mode", "args", ConfigPropertyType.choices("args", "files"));
+ put("wrapper.invocation.mode", "absolute", ConfigPropertyType.choices("absolute", "relative"));
+ // TODO what are the valid values here?
put("cdm.broadcast.mode", "file");
- put("use.provider.staging", "false");
- put("ticker.date.format", "");
- put("ticker.prefix", "Progress: time:");
+ put("use.provider.staging", "false", ConfigPropertyType.BOOLEAN);
+ put("ticker.date.format", "", ConfigPropertyType.STRING);
+ put("ticker.prefix", "Progress: time:", ConfigPropertyType.STRING);
- put(VDL2ConfigProperties.FILE_GC_ENABLED, "true");
- put(VDL2ConfigProperties.DM_CHECKER, "on");
+ put(VDL2ConfigProperties.FILE_GC_ENABLED, "true", ConfigPropertyType.BOOLEAN);
+ put(VDL2ConfigProperties.DM_CHECKER, "on", ConfigPropertyType.ONOFF);
}
private VDL2Config(VDL2Config other) {
@@ -156,6 +160,11 @@
return this;
}
}
+
+ public synchronized Object put(Object key, Object value, ConfigPropertyType type) {
+ types.put(key, type);
+ return put(key, value);
+ }
/**
* Overridden to do variable expansion. Variables will be expanded if there
@@ -165,6 +174,7 @@
public synchronized Object put(Object key, Object value) {
String svalue = (String) value;
if (svalue.indexOf("${") == -1) {
+ checkType(key, value);
return super.put(key, value);
}
else {
@@ -197,11 +207,20 @@
}
}
sb.append(svalue.substring(last));
- return super.put(key, sb.toString());
+ value = sb.toString();
+ checkType(key, value);
+ return super.put(key, value);
}
}
- public String getPoolFile() {
+ private void checkType(Object key, Object value) {
+ ConfigPropertyType type = types.get(key);
+ if (type != null) {
+ type.checkValue((String) key, (String) value);
+ }
+ }
+
+ public String getPoolFile() {
return getProperty(VDL2ConfigProperties.POOL_FILE);
}
From ketan at ci.uchicago.edu Sat Sep 7 09:33:45 2013
From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu)
Date: Sat, 7 Sep 2013 09:33:45 -0500 (CDT)
Subject: [Swift-commit] r7039 - SwiftApps/Swift-MapRed/Paper
Message-ID: <20130907143345.E1852178884@svn.ci.uchicago.edu>
Author: ketan
Date: 2013-09-07 09:33:45 -0500 (Sat, 07 Sep 2013)
New Revision: 7039
Modified:
SwiftApps/Swift-MapRed/Paper/swifthadoop.tex
Log:
small comment
Modified: SwiftApps/Swift-MapRed/Paper/swifthadoop.tex
===================================================================
--- SwiftApps/Swift-MapRed/Paper/swifthadoop.tex 2013-09-06 23:23:21 UTC (rev 7038)
+++ SwiftApps/Swift-MapRed/Paper/swifthadoop.tex 2013-09-07 14:33:45 UTC (rev 7039)
@@ -475,5 +475,7 @@
-- Portability of solution
+-- Parallel find is a nice example
+
What is HDFS?
HDFS, inspired by Google's GFS.%TODO: citation
From ketan at ci.uchicago.edu Sat Sep 7 11:25:38 2013
From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu)
Date: Sat, 7 Sep 2013 11:25:38 -0500 (CDT)
Subject: [Swift-commit] r7040 - in SwiftApps: . gocat
Message-ID: <20130907162538.BD39D178884@svn.ci.uchicago.edu>
Author: ketan
Date: 2013-09-07 11:25:38 -0500 (Sat, 07 Sep 2013)
New Revision: 7040
Added:
SwiftApps/gocat/
SwiftApps/gocat/apps.swift
Log:
GO catalog apps
Added: SwiftApps/gocat/apps.swift
===================================================================
--- SwiftApps/gocat/apps.swift (rev 0)
+++ SwiftApps/gocat/apps.swift 2013-09-07 16:25:38 UTC (rev 7040)
@@ -0,0 +1,4 @@
+type file;
+
+app () get_tags (){
+}
From hategan at ci.uchicago.edu Sun Sep 8 01:11:52 2013
From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu)
Date: Sun, 8 Sep 2013 01:11:52 -0500 (CDT)
Subject: [Swift-commit] r7041 - trunk/resources
Message-ID: <20130908061152.E5F0D9CCEB@svn.ci.uchicago.edu>
Author: hategan
Date: 2013-09-08 01:11:52 -0500 (Sun, 08 Sep 2013)
New Revision: 7041
Modified:
trunk/resources/Karajan.stg
Log:
fixed some of the provenance problems
Modified: trunk/resources/Karajan.stg
===================================================================
--- trunk/resources/Karajan.stg 2013-09-07 16:25:38 UTC (rev 7040)
+++ trunk/resources/Karajan.stg 2013-09-08 06:11:52 UTC (rev 7041)
@@ -369,14 +369,14 @@
sequential(
tmp := swift:range($from$, $to$$if(step)$, step = $step$$endif$)
tmp
- $range_log(from=from, to=to, step=step, out=tmp)$
-)
+ $range_log(from=from, to=to, step=step, out="tmp")$
+)
>>
range_log(from, to, step, out) ::= <<
- swift:log(INFO, str:concat("ARRAYRANGE thread=", currentThread(), " array=", getDatasetProvenanceId($out$),
- " from=", getDatasetProvenanceId($from$), "to=", getDatasetProvenanceId($to$)
- $if(step)$", step=", getDatasetProvenanceId($step$)$else$, "step=none"$endif$))
+ swift:log(LOG:INFO, k:concat("ARRAYRANGE thread=", currentThread(), " array=", getDatasetProvenanceID($out$),
+ " from=", getDatasetProvenanceID($from$), "to=", getDatasetProvenanceID($to$),
+ $if(step)$"step=", getDatasetProvenanceID($step$)$else$"step=none"$endif$))
>>
if(condition,vthen,velse,line,trace) ::= <<
@@ -505,7 +505,7 @@
>>
logSliceArray(memberchild, array, slice) ::= <<
- swift:log(DEBUG, str:concat("SLICEARRAY thread=", currentThread(), " slice=", swift:getDatasetProvenanceID($slice$),
+ swift:log(LOG:DEBUG, k:concat("SLICEARRAY thread=", currentThread(), " slice=", swift:getDatasetProvenanceID($slice$),
" member=$member$ array=", swift:getDatasetProvenanceID($array$))
>>
From hategan at ci.uchicago.edu Sun Sep 8 02:51:01 2013
From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu)
Date: Sun, 8 Sep 2013 02:51:01 -0500 (CDT)
Subject: [Swift-commit] r7042 - trunk/libexec
Message-ID: <20130908075101.9D7229CC84@svn.ci.uchicago.edu>
Author: hategan
Date: 2013-09-08 02:51:00 -0500 (Sun, 08 Sep 2013)
New Revision: 7042
Modified:
trunk/libexec/
trunk/libexec/swift.k
Log:
fixed error when provenance is enabled
Property changes on: trunk/libexec
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/release-0.93/libexec:4761-5122
/branches/release-0.94/libexec:6283-6619,6998-7002,7019
/trunk/libexec:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255-6258,6263,6272,6274-6618
Modified: trunk/libexec/swift.k
===================================================================
--- trunk/libexec/swift.k 2013-09-08 06:11:52 UTC (rev 7041)
+++ trunk/libexec/swift.k 2013-09-08 07:51:00 UTC (rev 7042)
@@ -24,9 +24,10 @@
export(stageOut, def("org.griphyn.vdl.karajan.lib.Stageout"))
export(parameterLog,
- function(direction, variable, id, thread) {
+ function(direction, variable, id) {
if (configProperty("provenance.log") == "true") {
- log("info","PARAM thread={thread} direction={direction} variable={variable} provenanceid={id}")
+ thread := currentThread()
+ log("info", "PARAM thread={thread} direction={direction} variable={variable} provenanceid={id}")
}
}
)
From ketan at ci.uchicago.edu Sun Sep 8 19:31:55 2013
From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu)
Date: Sun, 8 Sep 2013 19:31:55 -0500 (CDT)
Subject: [Swift-commit] r7043 - SwiftApps/gocat
Message-ID: <20130909003155.6325E9CC84@svn.ci.uchicago.edu>
Author: ketan
Date: 2013-09-08 19:31:54 -0500 (Sun, 08 Sep 2013)
New Revision: 7043
Modified:
SwiftApps/gocat/apps.swift
Log:
app defs
Modified: SwiftApps/gocat/apps.swift
===================================================================
--- SwiftApps/gocat/apps.swift 2013-09-08 07:51:00 UTC (rev 7042)
+++ SwiftApps/gocat/apps.swift 2013-09-09 00:31:54 UTC (rev 7043)
@@ -1,4 +1,19 @@
type file;
-app () get_tags (){
+app (file catalogs, file err) get_all_catalogs (){
+ get_catalogs stdout=@catalogs stderr=@err;
}
+
+app (file datasets, file err) get_all_datasets (string catalogid){
+ get_datasets catalogid stdout=@datasets stderr=@err;
+}
+
+app (file dataset_members, file err) get_dataset_members (string catalog_id, string dataset_id){
+ get_dataset_members catalog_id dataset_id stdout=@dataset_members stderr=@err;
+}
+
+app (file tags, file err) get_tags (string catalog_id, string dataset_id){
+ get_tags catalog_id dataset_id stdout=@tags stderr=@err;
+}
+
+
From ketan at ci.uchicago.edu Sun Sep 8 22:12:11 2013
From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu)
Date: Sun, 8 Sep 2013 22:12:11 -0500 (CDT)
Subject: [Swift-commit] r7044 - SwiftApps/gocat
Message-ID: <20130909031211.B7D11178884@svn.ci.uchicago.edu>
Author: ketan
Date: 2013-09-08 22:12:11 -0500 (Sun, 08 Sep 2013)
New Revision: 7044
Added:
SwiftApps/gocat/apps
Log:
app catalog
Added: SwiftApps/gocat/apps
===================================================================
--- SwiftApps/gocat/apps (rev 0)
+++ SwiftApps/gocat/apps 2013-09-09 03:12:11 UTC (rev 7044)
@@ -0,0 +1,4 @@
+get_all_catalogs /scratch/local/ketan/catalog-client/globusonline/catalog/client/examples/catalog.py
+get_all_datasets /scratch/local/ketan/catalog-client/globusonline/catalog/client/examples/catalog.py
+get_dataset_members /scratch/local/ketan/catalog-client/globusonline/catalog/client/examples/catalog.py
+get_tags /scratch/local/ketan/catalog-client/globusonline/catalog/client/examples/catalog.py
From ketan at ci.uchicago.edu Sun Sep 8 22:14:35 2013
From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu)
Date: Sun, 8 Sep 2013 22:14:35 -0500 (CDT)
Subject: [Swift-commit] r7045 - SwiftApps/gocat
Message-ID: <20130909031435.8B5BB178884@svn.ci.uchicago.edu>
Author: ketan
Date: 2013-09-08 22:14:35 -0500 (Sun, 08 Sep 2013)
New Revision: 7045
Added:
SwiftApps/gocat/catalog.swift
Removed:
SwiftApps/gocat/apps.swift
Log:
rename
Deleted: SwiftApps/gocat/apps.swift
===================================================================
--- SwiftApps/gocat/apps.swift 2013-09-09 03:12:11 UTC (rev 7044)
+++ SwiftApps/gocat/apps.swift 2013-09-09 03:14:35 UTC (rev 7045)
@@ -1,19 +0,0 @@
-type file;
-
-app (file catalogs, file err) get_all_catalogs (){
- get_catalogs stdout=@catalogs stderr=@err;
-}
-
-app (file datasets, file err) get_all_datasets (string catalogid){
- get_datasets catalogid stdout=@datasets stderr=@err;
-}
-
-app (file dataset_members, file err) get_dataset_members (string catalog_id, string dataset_id){
- get_dataset_members catalog_id dataset_id stdout=@dataset_members stderr=@err;
-}
-
-app (file tags, file err) get_tags (string catalog_id, string dataset_id){
- get_tags catalog_id dataset_id stdout=@tags stderr=@err;
-}
-
-
Copied: SwiftApps/gocat/catalog.swift (from rev 7043, SwiftApps/gocat/apps.swift)
===================================================================
--- SwiftApps/gocat/catalog.swift (rev 0)
+++ SwiftApps/gocat/catalog.swift 2013-09-09 03:14:35 UTC (rev 7045)
@@ -0,0 +1,19 @@
+type file;
+
+app (file catalogs, file err) get_all_catalogs (){
+ get_catalogs stdout=@catalogs stderr=@err;
+}
+
+app (file datasets, file err) get_all_datasets (string catalogid){
+ get_datasets catalogid stdout=@datasets stderr=@err;
+}
+
+app (file dataset_members, file err) get_dataset_members (string catalog_id, string dataset_id){
+ get_dataset_members catalog_id dataset_id stdout=@dataset_members stderr=@err;
+}
+
+app (file tags, file err) get_tags (string catalog_id, string dataset_id){
+ get_tags catalog_id dataset_id stdout=@tags stderr=@err;
+}
+
+
From ketan at ci.uchicago.edu Mon Sep 9 13:37:36 2013
From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu)
Date: Mon, 9 Sep 2013 13:37:36 -0500 (CDT)
Subject: [Swift-commit] r7046 - SwiftApps/gocat
Message-ID: <20130909183736.0D3CF9CC78@svn.ci.uchicago.edu>
Author: ketan
Date: 2013-09-09 13:37:35 -0500 (Mon, 09 Sep 2013)
New Revision: 7046
Modified:
SwiftApps/gocat/apps
SwiftApps/gocat/catalog.swift
Log:
simplified swift
Modified: SwiftApps/gocat/apps
===================================================================
--- SwiftApps/gocat/apps 2013-09-09 03:14:35 UTC (rev 7045)
+++ SwiftApps/gocat/apps 2013-09-09 18:37:35 UTC (rev 7046)
@@ -1,4 +1,5 @@
-get_all_catalogs /scratch/local/ketan/catalog-client/globusonline/catalog/client/examples/catalog.py
-get_all_datasets /scratch/local/ketan/catalog-client/globusonline/catalog/client/examples/catalog.py
-get_dataset_members /scratch/local/ketan/catalog-client/globusonline/catalog/client/examples/catalog.py
-get_tags /scratch/local/ketan/catalog-client/globusonline/catalog/client/examples/catalog.py
+localhost tag_go /scratch/local/ketan/catalog-client/globusonline/catalog/client/examples/catalog.py
+localhost locate_go /scratch/local/ketan/catalog-client/globusonline/catalog/client/examples/catalog.py
+
+localhost tag_cmd tag
+localhost locate_cmd locate
Modified: SwiftApps/gocat/catalog.swift
===================================================================
--- SwiftApps/gocat/catalog.swift 2013-09-09 03:14:35 UTC (rev 7045)
+++ SwiftApps/gocat/catalog.swift 2013-09-09 18:37:35 UTC (rev 7046)
@@ -1,19 +1,17 @@
type file;
-app (file catalogs, file err) get_all_catalogs (){
- get_catalogs stdout=@catalogs stderr=@err;
+app (file out, file err) tag_go (string tag_args){
+ tag_go tag_args stdout=@out stderr=@err;
}
-app (file datasets, file err) get_all_datasets (string catalogid){
- get_datasets catalogid stdout=@datasets stderr=@err;
+app (file tags, file err) locate_go (string catalog_id, string dataset_id, string tag_args){
+ get_tags catalog_id dataset_id tag_args stdout=@tags stderr=@err;
}
-app (file dataset_members, file err) get_dataset_members (string catalog_id, string dataset_id){
- get_dataset_members catalog_id dataset_id stdout=@dataset_members stderr=@err;
+app (file datasets, file err) tag_cmd (string catalogid){
+ get_datasets catalogid stdout=@datasets stderr=@err;
}
-app (file tags, file err) get_tags (string catalog_id, string dataset_id){
- get_tags catalog_id dataset_id stdout=@tags stderr=@err;
+app (file tags, file err) locate_cmd (string tag_args){
+ get_tags tag_args stdout=@tags stderr=@err;
}
-
-
From ketan at ci.uchicago.edu Mon Sep 9 13:59:36 2013
From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu)
Date: Mon, 9 Sep 2013 13:59:36 -0500 (CDT)
Subject: [Swift-commit] r7047 - SwiftApps/gocat
Message-ID: <20130909185936.AD4B89CC78@svn.ci.uchicago.edu>
Author: ketan
Date: 2013-09-09 13:59:36 -0500 (Mon, 09 Sep 2013)
New Revision: 7047
Added:
SwiftApps/gocat/sites.local.xml
SwiftApps/gocat/sites.multiple.xml
Log:
sites
Added: SwiftApps/gocat/sites.local.xml
===================================================================
--- SwiftApps/gocat/sites.local.xml (rev 0)
+++ SwiftApps/gocat/sites.local.xml 2013-09-09 18:59:36 UTC (rev 7047)
@@ -0,0 +1,9 @@
+
+
+
+
+ 0.01
+ /tmp/swift.work
+
+
+
Added: SwiftApps/gocat/sites.multiple.xml
===================================================================
--- SwiftApps/gocat/sites.multiple.xml (rev 0)
+++ SwiftApps/gocat/sites.multiple.xml 2013-09-09 18:59:36 UTC (rev 7047)
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+ 1
+ single
+ 16
+ TG-EAR130015
+ normal
+ ketancmaheshwari at gmail.com
+ ALL
+ 07:00:00
+ 26000
+ 100
+ 100
+ 50
+ 1
+ 1
+ .49
+ 10000
+ /scratch/01739/ketan/swift.work
+
+
+
+
+ .01
+ 10000
+
+ /tmp
+
+
+
+
+ 26000
+ 07:00:00
+ 1
+ 1
+ 1
+ 16
+ 1
+ 100
+ 100
+ .00
+ 10000
+
+ /home/ketan/swift.work
+
+
+
+
+ 58000
+ 8:00:00
+ 1
+ single
+ 1
+ 10
+ 8
+ 1
+ .09
+ 10000
+
+ /tmp
+
+
+
From ketan at ci.uchicago.edu Mon Sep 9 15:16:06 2013
From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu)
Date: Mon, 9 Sep 2013 15:16:06 -0500 (CDT)
Subject: [Swift-commit] r7048 - SwiftApps/gocat
Message-ID: <20130909201606.2E823178884@svn.ci.uchicago.edu>
Author: ketan
Date: 2013-09-09 15:16:06 -0500 (Mon, 09 Sep 2013)
New Revision: 7048
Added:
SwiftApps/gocat/cleanup
SwiftApps/gocat/test.sh
Modified:
SwiftApps/gocat/apps
SwiftApps/gocat/catalog.swift
Log:
test and cleanup
Modified: SwiftApps/gocat/apps
===================================================================
--- SwiftApps/gocat/apps 2013-09-09 18:59:36 UTC (rev 7047)
+++ SwiftApps/gocat/apps 2013-09-09 20:16:06 UTC (rev 7048)
@@ -1,5 +1,5 @@
localhost tag_go /scratch/local/ketan/catalog-client/globusonline/catalog/client/examples/catalog.py
localhost locate_go /scratch/local/ketan/catalog-client/globusonline/catalog/client/examples/catalog.py
-localhost tag_cmd tag
-localhost locate_cmd locate
+localhost tag_dataset tag
+localhost locate_dataset locate
Modified: SwiftApps/gocat/catalog.swift
===================================================================
--- SwiftApps/gocat/catalog.swift 2013-09-09 18:59:36 UTC (rev 7047)
+++ SwiftApps/gocat/catalog.swift 2013-09-09 20:16:06 UTC (rev 7048)
@@ -9,9 +9,19 @@
}
app (file datasets, file err) tag_cmd (string catalogid){
- get_datasets catalogid stdout=@datasets stderr=@err;
+ tag_dataset catalogid stdout=@datasets stderr=@err;
}
-app (file tags, file err) locate_cmd (string tag_args){
- get_tags tag_args stdout=@tags stderr=@err;
+app (file tags) locate_cmd (string tag_args){
+ locate_dataset tag_args stdout=@tags;
}
+
+string q = arg("ds","");
+
+string flist[] = readData(locate_cmd(q));
+file d[];
+
+foreach f,i in d {
+ tracef("f[%i]: mapped to: %s\n", i, @f);
+ }
+
Added: SwiftApps/gocat/cleanup
===================================================================
--- SwiftApps/gocat/cleanup (rev 0)
+++ SwiftApps/gocat/cleanup 2013-09-09 20:16:06 UTC (rev 7048)
@@ -0,0 +1,2 @@
+rm -rf *.log *.rlog *.d p?-*-*-* *.kml *.swiftx *.out output outdir logs hi.* _concurrent .swift/tmp
+
Property changes on: SwiftApps/gocat/cleanup
___________________________________________________________________
Added: svn:executable
+ *
Added: SwiftApps/gocat/test.sh
===================================================================
--- SwiftApps/gocat/test.sh (rev 0)
+++ SwiftApps/gocat/test.sh 2013-09-09 20:16:06 UTC (rev 7048)
@@ -0,0 +1 @@
+swift -tc.file apps -sites.file sites.local.xml catalog.swift -ds='run like 3'
Property changes on: SwiftApps/gocat/test.sh
___________________________________________________________________
Added: svn:executable
+ *
From ketan at ci.uchicago.edu Tue Sep 10 10:19:57 2013
From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu)
Date: Tue, 10 Sep 2013 10:19:57 -0500 (CDT)
Subject: [Swift-commit] r7049 - SwiftApps/gocat
Message-ID: <20130910151957.B0BAA9CC73@svn.ci.uchicago.edu>
Author: ketan
Date: 2013-09-10 10:19:56 -0500 (Tue, 10 Sep 2013)
New Revision: 7049
Added:
SwiftApps/gocat/psql.txt
SwiftApps/gocat/taglocate.README
Modified:
SwiftApps/gocat/catalog.swift
SwiftApps/gocat/test.sh
Log:
add readme, psql
Modified: SwiftApps/gocat/catalog.swift
===================================================================
--- SwiftApps/gocat/catalog.swift 2013-09-09 20:16:06 UTC (rev 7048)
+++ SwiftApps/gocat/catalog.swift 2013-09-10 15:19:56 UTC (rev 7049)
@@ -8,8 +8,8 @@
get_tags catalog_id dataset_id tag_args stdout=@tags stderr=@err;
}
-app (file datasets, file err) tag_cmd (string catalogid){
- tag_dataset catalogid stdout=@datasets stderr=@err;
+app (file out, file err) tag_cmd (string tagargs){
+ tag_dataset tagargs stdout=@out stderr=@err;
}
app (file tags) locate_cmd (string tag_args){
@@ -25,3 +25,8 @@
tracef("f[%i]: mapped to: %s\n", i, @f);
}
+file tagout<"tagout.txt">;
+file tagerr<"tagerr.txt">;
+
+(tagout, tagerr)=tag_cmd("/home/maheshwari/gocat owner=maheshwari group=swift create-date=2013.0910.10:45:12:211");
+
Added: SwiftApps/gocat/psql.txt
===================================================================
--- SwiftApps/gocat/psql.txt (rev 0)
+++ SwiftApps/gocat/psql.txt 2013-09-10 15:19:56 UTC (rev 7049)
@@ -0,0 +1,2 @@
+psql -U provdb -h swift.rcc.uchicago.edu provdb -c "\d+ annot_dataset_text"
+psql -U provdb -h swift.rcc.uchicago.edu provdb -c "select dataset_id from annot_dataset_text"
Added: SwiftApps/gocat/taglocate.README
===================================================================
--- SwiftApps/gocat/taglocate.README (rev 0)
+++ SwiftApps/gocat/taglocate.README 2013-09-10 15:19:56 UTC (rev 7049)
@@ -0,0 +1,701 @@
+
+*** Metadata/Provenance prototype
+
+A prototype/testbed database is now running (on swift.rcc.uchicago.edu) for metadata and provenance.
+
+====
+
+To access the metadata database:
+
+module load postresql # Using 9.2 but earlier versions will likelik work for metadata
+PATH=/home/wilde/swift/provenancedb:/home/wilde/swift/provwork:/home/wilde/pgsql/bin:$PATH
+
+
+# create a file "$HOME/.pgpass" set to mode 600, with these 2 lines:
+
+swift.rcc.uchicago.edu:5432:provdb:provdb:sesame
+db:5432:provdb:provdb:sesame
+
+
+====
+
+Below are some example queries.
+
+I suspect you can try this shortly if you have time and interest.
+
+- Mike
+
+
+At the moment you add metadata like so:
+
+tag /d1/d2/f3 owner=asinitskiy group=cmts-chem create-date=2013.0415.12:20:29.456 type=trajectory-namd \
+ state=pubished note="trajectory for case 1" molecule=1ubq domain=loop7 bead=px
+...
+tag /d1/d2/f0 owner=jdama group=cmts-chem create-date=2013.0412.12:20:29.456 type=trajectory-namd \
+ state=pubished note="trajectory for case 1" molecule=4ubq domain=loop1 bead=px
+
+...and query like this:
+
+mid$ ./locate-test01.sh
+
+ Query ==> owner=wilde
+
+
+ dataset_id | name | value
+------------+-------------+--------------------------------------------------
+
+ /d1/d2/f1 | owner | wilde
+ | group | cmts-cyber
+ | create-date | 2013.0123.23:07:29.123
+ | type | pdb
+ | state | unverified
+ | note | Initial structure prediction from loop model. mw
+
+ /d1/d2/f7 | owner | wilde
+ | group | cmts-chem
+ | create-date | 2013.0419.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 1ubq
+ | domain | loop3
+ | bead | px
+
+ /d1/d2/f8 | owner | wilde
+ | group | cmts-chem
+ | create-date | 2013.0410.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 2ubq
+ | domain | loop3
+ | bead | px
+
+(24 rows)
+
+
+
+ Query ==> (owner=asinitskiy) or (owner=msaunders)
+
+
+ dataset_id | name | value
+------------+-------------+------------------------
+
+ /d1/d2/f2 | owner | asinitskiy
+ | group | cmts-chem
+ | create-date | 2013.0414.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 1ubq
+ | domain | loop7
+ | bead | px
+
+ /d1/d2/f3 | owner | asinitskiy
+ | group | cmts-chem
+ | create-date | 2013.0415.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 1ubq
+ | domain | loop7
+ | bead | px
+
+ /d1/d2/f4 | owner | asinitskiy
+ | group | cmts-chem
+ | create-date | 2013.0416.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 2ubq
+ | domain | loop7
+ | bead | dt
+
+ /d1/d2/f6 | owner | msaunders
+ | group | cmts-chem
+ | create-date | 2013.0418.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 2ubq
+ | domain | loop7
+ | bead | an
+
+(36 rows)
+
+
+
+ Query ==> (owner=asinitskiy) and (molecule=2ubq)
+
+
+ dataset_id | name | value
+------------+-------------+------------------------
+
+ /d1/d2/f4 | owner | asinitskiy
+ | group | cmts-chem
+ | create-date | 2013.0416.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 2ubq
+ | domain | loop7
+ | bead | dt
+
+(9 rows)
+
+
+mid$
+
+mid$ locate '*'
+
+ dataset_id | name | value
+------------+-------------+--------------------------------------------------
+
+ /d1/d2/f1 | owner | wilde
+ | group | cmts-cyber
+ | create-date | 2013.0123.23:07:29.123
+ | type | pdb
+ | state | unverified
+ | note | Initial structure prediction from loop model. mw
+
+ /d1/d2/f2 | owner | asinitskiy
+ | group | cmts-chem
+ | create-date | 2013.0414.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 1ubq
+ | domain | loop7
+ | bead | px
+
+ /d1/d2/f3 | owner | asinitskiy
+ | group | cmts-chem
+ | create-date | 2013.0415.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 1ubq
+ | domain | loop7
+ | bead | px
+
+ /d1/d2/f4 | owner | asinitskiy
+ | group | cmts-chem
+ | create-date | 2013.0416.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 2ubq
+ | domain | loop7
+ | bead | dt
+
+ /d1/d2/f5 | owner | jgrime
+ | group | cmts-chem
+ | create-date | 2013.0417.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 1ubq
+ | domain | loop7
+ | bead | xy
+
+ /d1/d2/f6 | owner | msaunders
+ | group | cmts-chem
+ | create-date | 2013.0418.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 2ubq
+ | domain | loop7
+ | bead | an
+
+ /d1/d2/f7 | owner | wilde
+ | group | cmts-chem
+ | create-date | 2013.0419.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 1ubq
+ | domain | loop3
+ | bead | px
+
+ /d1/d2/f8 | owner | wilde
+ | group | cmts-chem
+ | create-date | 2013.0410.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 2ubq
+ | domain | loop3
+ | bead | px
+
+ /d1/d2/f9 | owner | fvazquez
+ | group | cmts-chem
+ | create-date | 2013.0411.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 3ubq
+ | domain | loop2
+ | bead | px
+
+ /d1/d2/f0 | owner | jdama
+ | group | cmts-chem
+ | create-date | 2013.0412.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 4ubq
+ | domain | loop1
+ | bead | px
+
+(87 rows)
+
+###
+
+The commands have no provision yet for changing data or adding data thats already there. Just try queries (locate) for now.
+
+I almost have ready a script that will take a csv version of your dataset spreadsheet (firsttab) and add records.
+
+====
+
+Hi Anton,
+
+The first worksheet (only) is in the database now, with a few adjustments:
+
+- I used the folder name as the dataset key
+
+- I omitted the replica location field for now: need to adjust a few things to add the same tag twice on an object
+
+- I used all lower case tag names; I need to work on upper-loca case issues. For now, case of both keys and values must, I think, match, unless you use "like" instead of = in the locate query.
+
+- I broke up the dataset location into a servername, "collection name", and folder name.
+
+- The machine name field got goofed up as you will see in the database; dont use it till I fix it.
+
+- I omitted commas and hence quotes from the comment fields.
+
+Check the field names: I might have made a few other changes.
+
+you should be able to see all the data by using the query:
+
+ locate '*' # must use ' ' around the * !
+
+I also paste the data below but it might get chopped up by email.
+
+- Mike
+
+====
+
+expect that you will get some errors from your queries, in part because my parser is still quite crude and not robust.
+
+Use parens () as in the examples. Send me any errors that you encounter, including the input query, the echoed SQL, and the error message.
+
+- Mike
+
+ps I think I will try to soon make the "tag" command contain all the needed query and update interfaces:
+
+tag add
+tag update
+tag remove
+tag find
+tag ...etc
+
+===
+
+
+mid$ locate '*'
+
+select * from annot_dataset_text where dataset_id in ((select distinct dataset_id from annot_dataset_text));
+
+ dataset_id | name | value
+--------------------------------------------------------------+--------------------------+----------------------------------------------------------------------------------------------------------------
+
+ /d1/d2/f1 | owner | wilde
+ | group | cmts-cyber
+ | create-date | 2013.0123.23:07:29.123
+ | type | pdb
+ | state | unverified
+ | note | Initial structure prediction from loop model. mw
+
+ /d1/d2/f2 | owner | asinitskiy
+ | group | cmts-chem
+ | create-date | 2013.0414.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 1ubq
+ | domain | loop7
+ | bead | px
+
+ /d1/d2/f3 | owner | asinitskiy
+ | group | cmts-chem
+ | create-date | 2013.0415.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 1ubq
+ | domain | loop7
+ | bead | px
+
+ /d1/d2/f4 | owner | asinitskiy
+ | group | cmts-chem
+ | create-date | 2013.0416.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 2ubq
+ | domain | loop7
+ | bead | dt
+
+ /d1/d2/f5 | owner | jgrime
+ | group | cmts-chem
+ | create-date | 2013.0417.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 1ubq
+ | domain | loop7
+ | bead | xy
+
+ /d1/d2/f6 | owner | msaunders
+ | group | cmts-chem
+ | create-date | 2013.0418.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 2ubq
+ | domain | loop7
+ | bead | an
+
+ /d1/d2/f7 | owner | wilde
+ | group | cmts-chem
+ | create-date | 2013.0419.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 1ubq
+ | domain | loop3
+ | bead | px
+
+ /d1/d2/f8 | owner | wilde
+ | group | cmts-chem
+ | create-date | 2013.0410.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 2ubq
+ | domain | loop3
+ | bead | px
+
+ /d1/d2/f9 | owner | fvazquez
+ | group | cmts-chem
+ | create-date | 2013.0411.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 3ubq
+ | domain | loop2
+ | bead | px
+
+ /d1/d2/f0 | owner | jdama
+ | group | cmts-chem
+ | create-date | 2013.0412.12:20:29.456
+ | type | trajectory-namd
+ | state | pubished
+ | note | trajectory for case 1
+ | molecule | 4ubq
+ | domain | loop1
+ | bead | px
+
+ /sinitskiy/home/Ribosome.tar.gz | title | ribosome
+ | author | sinitskiy
+ | datestart | 3/21/11
+ | dateend | 3/22/11
+ | machinemakena |
+ | software | bash
+ | script |
+ | softwareversion | included
+ | in |
+ | the |
+ | folder |
+ | sizemb | 42984
+ | server | makena
+ | collection | /project/votharchive
+ | standardformatsubfolders | no
+ | pdbcode | n/a
+ | straightforwardmd | no
+ | cgsimulations | no
+ | forcefield | n/a
+ | monomersnumber | n/a
+ | replicasnumber | 1
+ | totallengthns | 100
+ | papers | SSV12
+ | comment | brute force MD trajectory of E. Coli ribosome from K. Sanbonmatsu converted to xyz format with only CA/P atoms
+
+ /sinitskiy/junction_actin.tar.gz | title | Arp2/3
+ | junction |
+ | author | sinitskiy
+ | datestart | 5/9/11
+ | dateend | 7/7/11
+ | machinemakena |
+ | software | edcg-space
+ | softwareversion | n/a
+ | sizemb | 1299
+ | server | makena
+ | collection | /project/votharchive
+ | folder | /sinitskiy/junction_actin.tar.gz
+ | standardformatsubfolders | no
+ | pdbcode | n/a
+ | straightforwardmd | no
+ | cgsimulations | no
+ | forcefield | n/a
+ | monomersnumber | n/a
+ | replicasnumber | 1
+ | totallengthns | 100
+ | papers | SSV12
+ | comment | number of CG sites in different parts of Arp2/3 junction
+
+ /sinitskiy/ribosome.tar.gz | title | ribosome
+ | author | sinitskiy
+ | datestart | 3/22/11
+ | dateend | 8/5/11
+ | machinemakena |
+ | software | edcg-space
+ | softwareversion | n/a
+ | sizemb | 6966
+ | server | makena
+ | collection | /project/votharchive
+ | folder | /sinitskiy/ribosome.tar.gz
+ | standardformatsubfolders | no
+ | pdbcode | n/a
+ | straightforwardmd | no
+ | cgsimulations | no
+ | forcefield | n/a
+ | monomersnumber | n/a
+ | replicasnumber | 1
+ | totallengthns | 100
+ | papers | SSV12
+ | comment | number of CG sites in different parts of E. Coli ribosome
+
+ /sinitskiy/actin.tar.gz | title | G-actin
+ | author | sinitskiy
+ | datestart | 7/11/11
+ | dateend | 8/25/11
+ | machinemakena |
+ | software | edcg-space
+ | softwareversion | n/a
+ | sizemb | 274
+ | server | makena
+ | collection | /project/votharchive
+ | folder | /sinitskiy/actin.tar.gz
+ | standardformatsubfolders | no
+ | pdbcode | n/a
+ | straightforwardmd | no
+ | cgsimulations | no
+ | forcefield | n/a
+ | monomersnumber | 1
+ | replicasnumber | 6
+ | totallengthns | 42
+ | papers | SSV12
+ | comment | number of CG sites in G-actin - chi2 vs N_CG
+
+ /sinitskiy/ubiquitin_allatom.tar.gz | title | ubiquitin
+ | author | sinitskiy
+ | datestart | 7/31/11
+ | dateend | 8/15/11
+ | machinemakena |
+ | software | edcg-space
+ | softwareversion | n/a
+ | sizemb | 207
+ | server | makena
+ | collection | /project/votharchive
+ | folder | /sinitskiy/ubiquitin_allatom.tar.gz
+ | standardformatsubfolders | no
+ | pdbcode | 1UBQ
+ | straightforwardmd | no
+ | cgsimulations | no
+ | forcefield | n/a
+ | monomersnumber | 1
+ | replicasnumber | 3
+ | totallengthns | 100
+ | papers | SSV12
+ | comment | Number of CG sites in ubiquitin - chi2 vs N_CG
+
+ /sinitskiy/lysozyme.tar.gz | title | lysozyme
+ | author | sinitskiy
+ | datestart | 7/9/11
+ | dateend | 7/10/11
+ | machinemakena |
+ | software | edcg-space
+ | softwareversion | n/a
+ | sizemb | 6166
+ | server | makena
+ | collection | /project/votharchive
+ | folder | /sinitskiy/lysozyme.tar.gz
+ | standardformatsubfolders | no
+ | pdbcode | 3LZT
+ | straightforwardmd | no
+ | cgsimulations | no
+ | forcefield | n/a
+ | monomersnumber | 1
+ | replicasnumber | 3
+ | totallengthns | 100
+ | papers | SSV12
+ | comment | Nnumber of CG sites in lysozyme - chi2 vs N_CG; also includes some preparatory data for SV_CP13
+
+ /sinitskiy/pyruvatekinase.tar.gz | title | pyruvate
+ | kinase |
+ | author | sinitskiy
+ | datestart | 7/10/11
+ | dateend | 8/23/11
+ | machinemakena |
+ | software | edcg-space
+ | softwareversion | n/a
+ | sizemb | 280
+ | server | makena
+ | collection | /project/votharchive
+ | folder | /sinitskiy/pyruvatekinase.tar.gz
+ | standardformatsubfolders | no
+ | pdbcode | 1PKL
+ | straightforwardmd | no
+ | cgsimulations | no
+ | forcefield | n/a
+ | monomersnumber | 1
+ | replicasnumber | 3
+ | totallengthns | 100
+ | papers | SSV12
+ | comment | Number of CG sites in pyruvate kinase - chi2 vs N_CG
+
+ /sinitskiy/lysozyme_namd/kraken5 | title | lysozyme
+ | author | sinitskiy
+ | datestart | 2/17/12
+ | dateend | 3/12/12
+ | machinekraken |
+ | software | NAMD
+ | softwareversion | 2.8
+ | sizemb | 446605
+ | server | makena
+ | collection | /project/votharchive
+ | folder | /sinitskiy/lysozyme_namd/kraken5
+ | standardformatsubfolders | no
+ | pdbcode | 3LZT
+ | straightforwardmd | yes
+ | cgsimulations | no
+ | forcefield | par_all27_prot_lipid.inp
+ | monomersnumber | 1
+ | replicasnumber | 1
+ | totallengthns | 64
+ | papers | SV_CP13
+ | comment |
+
+ /sinitskiy/lysozyme_namd/kraken6 | title | lysozyme
+ | author | sinitskiy
+ | datestart | 2/18/12
+ | dateend | 3/12/12
+ | machinekraken |
+ | software | NAMD
+ | softwareversion | 2.8
+ | sizemb | 446910
+ | server | makena
+ | collection | /project/votharchive
+ | folder | /sinitskiy/lysozyme_namd/kraken6
+ | standardformatsubfolders | no
+ | pdbcode | 3LZT
+ | straightforwardmd | yes
+ | cgsimulations | no
+ | forcefield | par_all27_prot_lipid.inp
+ | monomersnumber | 1
+ | replicasnumber | 1
+ | totallengthns | 64
+ | papers | SV_CP13
+ | comment |
+
+ /jlbaker/from_pads/research/data/3i5g_am_system/prod/ | title | actomyosin
+ | author | jlbaker
+ | datestart | 6/18/12
+ | dateend | 6/25/12
+ | machinebeagle |
+ | software | NAMD
+ | softwareversion | 2.8
+ | sizemb | 284108
+ | server | makena
+ | collection | /project/votharchive
+ | folder | /jlbaker/from_pads/research/data/3i5g_am_system/prod/
+ | standardformatsubfolders | no
+ | pdbcode | n/a
+ | straightforwardmd | yes
+ | cgsimulations | no
+ | forcefield | par_CMAP.inpf
+ | monomersnumber | n/a
+ | replicasnumber | 1
+ | totallengthns | 24
+ | papers | BV13
+ | comment | 3i5g actomyosin
+
+ /jlbaker/from_pads/research/data/3i5g_am_system/prod_beagle/ | title | actomyosin
+ | author | jlbaker
+ | datestart | 6/15/12
+ | dateend | 7/11/12
+ | machinebeagle |
+ | software | NAMD
+ | softwareversion | 2.8
+ | sizemb | 410151
+ | server | makena
+ | collection | /project/votharchive
+ | folder | /jlbaker/from_pads/research/data/3i5g_am_system/prod_beagle/
+ | standardformatsubfolders | no
+ | pdbcode | n/a
+ | straightforwardmd | yes
+ | cgsimulations | no
+ | forcefield | par_CMAP.inpf
+ | monomersnumber | n/a
+ | replicasnumber | 1
+ | totallengthns | 80
+ | papers | BV14
+ | comment | 3i5g actomyosin
+
+ /jlbaker/from_pads/research/data/3i5g_myosinS1_model/prod/ | title | actomyosin
+ | author | jlbaker
+ | datestart | 6/18/12
+ | dateend | 7/11/12
+ | machinegrotthuss |
+ | software | NAMD
+ | softwareversion | 2.9
+ | sizemb | 249601
+ | server | makena
+ | collection | /project/votharchive
+ | folder | /jlbaker/from_pads/research/data/3i5g_myosinS1_model/prod/
+ | standardformatsubfolders | no
+ | pdbcode | n/a
+ | straightforwardmd | yes
+ | cgsimulations | no
+ | forcefield | par_CMAP.inpf
+ | monomersnumber | n/a
+ | replicasnumber | 1
+ | totallengthns | 70
+ | papers | BV14
+ | comment | 3i5g actomyosin
+
+ /jlbaker/from_pads/research/data/3i5f_myosinS1_model/prod/ | title | actomyosin
+ | author | jlbaker
+ | datestart | 6/18/12
+ | dateend | 7/11/12
+ | machinegrotthuss |
+ | software | NAMD
+ | softwareversion | 2.9
+ | sizemb | 277334
+ | server | makena
+ | collection | /project/votharchive
+ | folder | /jlbaker/from_pads/research/data/3i5f_myosinS1_model/prod/
+ | standardformatsubfolders | no
+ | pdbcode | n/a
+ | straightforwardmd | yes
+ | cgsimulations | no
+ | forcefield | par_CMAP.inpf
+ | monomersnumber | n/a
+ | replicasnumber | 1
+ | totallengthns | 80
+ | papers | BV14
+ | comment | 3i5g actomyosin
+
+
Modified: SwiftApps/gocat/test.sh
===================================================================
--- SwiftApps/gocat/test.sh 2013-09-09 20:16:06 UTC (rev 7048)
+++ SwiftApps/gocat/test.sh 2013-09-10 15:19:56 UTC (rev 7049)
@@ -1 +1,2 @@
swift -tc.file apps -sites.file sites.local.xml catalog.swift -ds='run like 3'
+swift -tc.file apps -sites.file sites.local.xml catalog.swift -ds='owner=wilde'
From davidk at ci.uchicago.edu Tue Sep 10 10:35:44 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Tue, 10 Sep 2013 10:35:44 -0500 (CDT)
Subject: [Swift-commit] r7050 - branches/release-0.94/tests
Message-ID: <20130910153544.8299A9CC73@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-10 10:35:44 -0500 (Tue, 10 Sep 2013)
New Revision: 7050
Modified:
branches/release-0.94/tests/suite.sh
Log:
Various fixes to the test suite script
The current suite.sh does not kill all processes correctly. When a swift script exceeds its time limit, the parent bash script gets a kill signal, but the children processes do not, which leaves many swift/java instances running after the suite is over. This should be fixed now.
Previously suite.sh would attempt to determine the IP address of the local machine via ifconfig and set GLOBUS_HOSTNAME. It's not easy to determine which IP address is the correct one to use. On macs it fails completely and sets it to "inet". It's probably better to let the user define it, either globally via .bashrc, or within the user environment script (-z user_env.sh).
Replace readlink command for determining directory structures - it failed on macs and caused the suite to not run. The test suite should be runnable on macs now.
The repeat file was not being read correctly. This should be working now for repeating tests.
Modified: branches/release-0.94/tests/suite.sh
===================================================================
--- branches/release-0.94/tests/suite.sh 2013-09-10 15:19:56 UTC (rev 7049)
+++ branches/release-0.94/tests/suite.sh 2013-09-10 15:35:44 UTC (rev 7050)
@@ -39,8 +39,8 @@
INDIVIDUAL_TEST_TIME=0
COLORIZE=0
# The directory in which to start:
-TOPDIR=`readlink -f $PWD/../../../..`
-CRTDIR=`pwd`
+TOPDIR=$( cd ../../../.. && echo $PWD )
+CRTDIR=$PWD
# Disable usage stats in test suite
export SWIFT_USAGE_STATS=0
@@ -544,8 +544,15 @@
process_trap() {
PROCESS_INTERNAL_PID=$1
echo "process_trap: killing: $PROCESS_INTERNAL_PID"
- # ps -H
- kill -TERM $PROCESS_INTERNAL_PID
+ ps -o "pid,ppid"|sed 1d | while read PROC
+ do
+ PROC_PID=$( echo $PROC | awk '{print $1}' )
+ PROC_PPID=$( echo $PROC | awk '{print $2}' )
+ if [ $PROC_PPID == $PROCESS_INTERNAL_PID ]
+ then
+ kill $PROC_PID
+ fi
+ done
}
# Execute process in the background
@@ -633,7 +640,7 @@
wait
[ $? != 0 ] && verbose "monitor($V) cancelled" && return 0
- if ps | grep $PID
+ if ps | grep $PID > /dev/null 2>&1
then
echo "monitor: killing test process $PID"
touch killed_test
@@ -679,8 +686,11 @@
# If the test was killed, monitor() may have work to do
rm killed_test > /dev/null 2>&1 && sleep 5
- verbose "killing monitor: $MONITOR_PID..."
- kill $MONITOR_PID
+ if ps -p $MONITOR_PID > /dev/null 2>&1
+ then
+ verbose "killing monitor: $MONITOR_PID..."
+ kill $MONITOR_PID
+ fi
INDIVIDUAL_TEST_TIME=$(( STOP-START ))
TOTAL_TIME=$(( INDIVIDUAL_TEST_TIME+TOTAL_TIME ))
@@ -807,7 +817,6 @@
cp "$GROUP/$SOURCESCRIPT" .
source ./$SOURCESCRIPT
fi
- echo "GLOBUS_HOSTNAME : $GLOBUS_HOSTNAME"
if [ -x "$GROUP/$SETUPSCRIPT" ]; then
cp "$GROUP/$SETUPSCRIPT" .
@@ -972,17 +981,6 @@
output_report package "swift-$DATE.tar.gz"
}
-# Setup coasters variables
-if which ifconfig > /dev/null 2>&1; then
- IFCONFIG=ifconfig
-else
- IFCONFIG=/sbin/ifconfig
-fi
-$IFCONFIG > /dev/null 2>&1 || crash "Cannot run ifconfig!"
-export GLOBUS_HOSTNAME=$( $IFCONFIG 2>/dev/null | grep inet | head -1 | cut -d ':' -f 2 | \
- awk '{print $1}' )
-[ $? != 0 ] && crash "Could not obtain GLOBUS_HOSTNAME!"
-
# Generate sites.xml
group_sites_xml() {
@@ -1105,12 +1103,12 @@
for TEST in $SWIFTS; do
(( SKIP_COUNTER++ < SKIP_TESTS )) && continue
-
- # Use repeat.txt to determine number of test iterations
- SCRIPT_BASENAME=`basename $TESTNAME .swift`
+ # Use scriptname.repeat to determine number of test iterations
+ SCRIPT_BASENAME=`basename $TEST .swift`
TESTLINK="$TESTNAMEDIR/$TESTNAME"
+ GROUP_DIRNAME=$( dirname $GROUP )
if [ -f "$GROUP/$SCRIPT_BASENAME.repeat" ]; then
- ITERS_LOCAL=`cat $GROUP/$SCRIPT_BASENAME.repeat`
+ ITERS_LOCAL=$( cat $GROUP/$SCRIPT_BASENAME.repeat )
else
ITERS_LOCAL=1
fi
From davidk at ci.uchicago.edu Tue Sep 10 14:38:49 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Tue, 10 Sep 2013 14:38:49 -0500 (CDT)
Subject: [Swift-commit] r7051 - SwiftApps
Message-ID: <20130910193849.020C09CC73@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-10 14:38:48 -0500 (Tue, 10 Sep 2013)
New Revision: 7051
Added:
SwiftApps/tryswift/
Log:
Initial tryswift directory
From davidk at ci.uchicago.edu Tue Sep 10 14:41:45 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Tue, 10 Sep 2013 14:41:45 -0500 (CDT)
Subject: [Swift-commit] r7052 - in SwiftApps/tryswift: . scripts
Message-ID: <20130910194145.4781C9CC73@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-10 14:41:45 -0500 (Tue, 10 Sep 2013)
New Revision: 7052
Added:
SwiftApps/tryswift/clean.sh
SwiftApps/tryswift/index.html
SwiftApps/tryswift/scripts/
SwiftApps/tryswift/scripts/arrays.swift
SwiftApps/tryswift/scripts/capitalise.swift
SwiftApps/tryswift/scripts/capitalise_anonymous.swift
SwiftApps/tryswift/scripts/default.swift
SwiftApps/tryswift/scripts/fixed_array_mapper.swift
SwiftApps/tryswift/scripts/foreach.swift
SwiftApps/tryswift/scripts/hello.swift
SwiftApps/tryswift/scripts/if.swift
SwiftApps/tryswift/scripts/manyparam.swift
SwiftApps/tryswift/scripts/my_first_mapper.swift
SwiftApps/tryswift/scripts/parameter.swift
SwiftApps/tryswift/scripts/regexp_mapper.swift
SwiftApps/tryswift/scripts/restart.swift
SwiftApps/tryswift/scripts/sequential_iteration.swift
SwiftApps/tryswift/scripts/sleep.swift
SwiftApps/tryswift/scripts/types.swift
SwiftApps/tryswift/sites.xml
SwiftApps/tryswift/tc.data
SwiftApps/tryswift/test.php
SwiftApps/tryswift/tryswift-php.css
SwiftApps/tryswift/tryswift.css
SwiftApps/tryswift/tryswift.php
Log:
Tryswift scripts
Added: SwiftApps/tryswift/clean.sh
===================================================================
--- SwiftApps/tryswift/clean.sh (rev 0)
+++ SwiftApps/tryswift/clean.sh 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,3 @@
+#!/bin/bash -x
+
+rm -rf tmp.*
Property changes on: SwiftApps/tryswift/clean.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: SwiftApps/tryswift/index.html
===================================================================
--- SwiftApps/tryswift/index.html (rev 0)
+++ SwiftApps/tryswift/index.html 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,86 @@
+
+
+
+ Try Swift
+
+
+
+
+
+
+
+
+
+
+
Added: SwiftApps/tryswift/scripts/arrays.swift
===================================================================
--- SwiftApps/tryswift/scripts/arrays.swift (rev 0)
+++ SwiftApps/tryswift/scripts/arrays.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,12 @@
+type messagefile;
+
+app (messagefile t) greeting (string s[]) {
+ echo s[0] s[1] s[2] stdout=@filename(t);
+}
+
+messagefile outfile <"arrays.txt">;
+
+string words[] = ["how","are","you"];
+
+outfile = greeting(words);
+
Added: SwiftApps/tryswift/scripts/capitalise.swift
===================================================================
--- SwiftApps/tryswift/scripts/capitalise.swift (rev 0)
+++ SwiftApps/tryswift/scripts/capitalise.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,14 @@
+type messagefile;
+
+app (messagefile t) greeting (string s) {
+ echo s stdout=@filename(t);
+}
+
+app (messagefile o) capitalise(messagefile i) {
+ tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o);
+}
+
+messagefile hellofile <"capitalise.1.txt">;
+messagefile final <"capitalise.2.txt">;
+hellofile = greeting("hello from Swift");
+final = capitalise(hellofile);
Added: SwiftApps/tryswift/scripts/capitalise_anonymous.swift
===================================================================
--- SwiftApps/tryswift/scripts/capitalise_anonymous.swift (rev 0)
+++ SwiftApps/tryswift/scripts/capitalise_anonymous.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,14 @@
+type messagefile;
+
+app (messagefile t) greeting (string s) {
+ echo s stdout=@filename(t);
+}
+
+app (messagefile o) capitalise(messagefile i) {
+ tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o);
+}
+
+messagefile hellofile;
+messagefile final <"capitalise_anonymous.txt">;
+hellofile = greeting("hello from Swift");
+final = capitalise(hellofile);
Added: SwiftApps/tryswift/scripts/default.swift
===================================================================
--- SwiftApps/tryswift/scripts/default.swift (rev 0)
+++ SwiftApps/tryswift/scripts/default.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,15 @@
+type file;
+
+// s has a default value
+app (file t) echo (string s="hello world") {
+ echo s stdout=@filename(t);
+}
+
+file hw1<"default.1.txt">;
+file hw2<"default.2.txt">;
+
+// procedure call using the default value
+hw1 = echo();
+
+// using a different value
+hw2 = echo(s="hello again");
Added: SwiftApps/tryswift/scripts/fixed_array_mapper.swift
===================================================================
--- SwiftApps/tryswift/scripts/fixed_array_mapper.swift (rev 0)
+++ SwiftApps/tryswift/scripts/fixed_array_mapper.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,16 @@
+type messagefile;
+type countfile;
+
+app (countfile t) countwords (messagefile f) {
+ wc "-w" @filename(f) stdout=@filename(t);
+}
+
+string inputNames = "fixed_array_mapper.1.txt fixed_array_mapper.2.txt fixed_array_mapper.3.txt";
+string outputNames = "fixed_array_mapper.1.count fixed_array_mapper.2.count fixed_array_mapper.3.count";
+
+messagefile inputfiles[]
;
+countfile outputfiles[] ;
+
+outputfiles[0] = countwords(inputfiles[0]);
+outputfiles[1] = countwords(inputfiles[1]);
+outputfiles[2] = countwords(inputfiles[2]);
Added: SwiftApps/tryswift/scripts/foreach.swift
===================================================================
--- SwiftApps/tryswift/scripts/foreach.swift (rev 0)
+++ SwiftApps/tryswift/scripts/foreach.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,18 @@
+type messagefile;
+type countfile;
+
+app (countfile t) countwords (messagefile f) {
+ wc "-w" @filename(f) stdout=@filename(t);
+}
+
+string inputNames = "foreach.1.txt foreach.2.txt foreach.3.txt";
+
+messagefile inputfiles[] ;
+
+foreach f in inputfiles {
+ countfile c;
+ c = countwords(f);
+}
Added: SwiftApps/tryswift/scripts/hello.swift
===================================================================
--- SwiftApps/tryswift/scripts/hello.swift (rev 0)
+++ SwiftApps/tryswift/scripts/hello.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,10 @@
+type messagefile;
+
+app (messagefile t) greeting() {
+ echo "Hello, world!" stdout=@filename(t);
+}
+
+messagefile outfile <"hello.txt">;
+
+outfile = greeting();
+
Added: SwiftApps/tryswift/scripts/if.swift
===================================================================
--- SwiftApps/tryswift/scripts/if.swift (rev 0)
+++ SwiftApps/tryswift/scripts/if.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,16 @@
+type messagefile;
+
+app (messagefile t) greeting (string s) {
+ echo s stdout=@filename(t);
+}
+
+messagefile outfile <"if.txt">;
+
+boolean morning = true;
+
+if(morning) {
+ outfile = greeting("good morning");
+} else {
+ outfile = greeting("good afternoon");
+}
+
Added: SwiftApps/tryswift/scripts/manyparam.swift
===================================================================
--- SwiftApps/tryswift/scripts/manyparam.swift (rev 0)
+++ SwiftApps/tryswift/scripts/manyparam.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,13 @@
+type messagefile;
+
+app (messagefile t) greeting (string s) {
+ echo s stdout=@filename(t);
+}
+
+messagefile english <"manyparam.english.txt">;
+messagefile french <"manyparam.french.txt">;
+messagefile japanese <"manyparam.japanese.txt">;
+
+english = greeting("hello");
+french = greeting("bonjour");
+japanese = greeting("konnichiwa");
Added: SwiftApps/tryswift/scripts/my_first_mapper.swift
===================================================================
--- SwiftApps/tryswift/scripts/my_first_mapper.swift (rev 0)
+++ SwiftApps/tryswift/scripts/my_first_mapper.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,9 @@
+type messagefile;
+
+app (messagefile t) greeting() {
+ echo "hello" stdout=@filename(t);
+}
+
+messagefile outfile ;
+
+outfile = greeting();
Added: SwiftApps/tryswift/scripts/parameter.swift
===================================================================
--- SwiftApps/tryswift/scripts/parameter.swift (rev 0)
+++ SwiftApps/tryswift/scripts/parameter.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,8 @@
+type messagefile;
+
+app (messagefile t) greeting (string s) {
+ echo s stdout=@filename(t);
+}
+
+messagefile outfile <"parameter.hello.txt">;
+outfile = greeting("hello world");
Added: SwiftApps/tryswift/scripts/regexp_mapper.swift
===================================================================
--- SwiftApps/tryswift/scripts/regexp_mapper.swift (rev 0)
+++ SwiftApps/tryswift/scripts/regexp_mapper.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,16 @@
+type messagefile;
+type countfile;
+
+app (countfile t) countwords (messagefile f) {
+ wc "-w" @filename(f) stdout=@filename(t);
+}
+
+messagefile inputfile <"regexp_mapper.words.txt">;
+
+countfile c ;
+
+c = countwords(inputfile);
+
Added: SwiftApps/tryswift/scripts/restart.swift
===================================================================
--- SwiftApps/tryswift/scripts/restart.swift (rev 0)
+++ SwiftApps/tryswift/scripts/restart.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,24 @@
+type file;
+
+app (file f) touch() {
+ touch @f;
+}
+
+app (file f) processL(file inp) {
+ echo "processL" stdout=@f;
+}
+
+app (file f) processR(file inp) {
+ broken "process" stdout=@f;
+}
+
+app (file f) join(file left, file right) {
+ echo "join" @left @right stdout=@f;
+}
+
+file f = touch();
+
+file g = processL(f);
+file h = processR(f);
+
+file i = join(g,h);
Added: SwiftApps/tryswift/scripts/sequential_iteration.swift
===================================================================
--- SwiftApps/tryswift/scripts/sequential_iteration.swift (rev 0)
+++ SwiftApps/tryswift/scripts/sequential_iteration.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,18 @@
+type counterfile;
+
+app (counterfile t) echo(string m) {
+ echo m stdout=@filename(t);
+}
+
+app (counterfile t) countstep(counterfile i) {
+ wcl @filename(i) @filename(t);
+}
+
+counterfile a[] ;
+
+a[0] = echo("793578934574893");
+
+iterate v {
+ a[v+1] = countstep(a[v]);
+ trace("extract int value ", at extractint(a[v+1]));
+} until (@extractint(a[v+1]) <= 1);
Added: SwiftApps/tryswift/scripts/sleep.swift
===================================================================
--- SwiftApps/tryswift/scripts/sleep.swift (rev 0)
+++ SwiftApps/tryswift/scripts/sleep.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,9 @@
+type file;
+
+app sleep (int s) {
+ sleep s;
+}
+
+foreach f in [1:5] {
+ sleep(30);
+}
Added: SwiftApps/tryswift/scripts/types.swift
===================================================================
--- SwiftApps/tryswift/scripts/types.swift (rev 0)
+++ SwiftApps/tryswift/scripts/types.swift 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,20 @@
+type messagefile;
+
+type details {
+ string name;
+ int pies;
+}
+
+app (messagefile t) greeting (details d) {
+ echo "Hello. Your name is" d.name "and you have eaten" d.pies "pies." stdout=@filename(t);
+}
+
+details person;
+
+person.name = "John";
+person.pies = 3;
+
+messagefile outfile <"types.pies.txt">;
+
+outfile = greeting(person);
+
Added: SwiftApps/tryswift/sites.xml
===================================================================
--- SwiftApps/tryswift/sites.xml (rev 0)
+++ SwiftApps/tryswift/sites.xml 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,11 @@
+
+
+
+
+ 0.079
+ 10000
+ 1000
+ 1
+ /home/tryswift/work
+
+
Added: SwiftApps/tryswift/tc.data
===================================================================
--- SwiftApps/tryswift/tc.data (rev 0)
+++ SwiftApps/tryswift/tc.data 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,7 @@
+local echo /bin/echo
+local cat /bin/cat
+local grep /bin/grep
+local sort /bin/sort
+local paste /usr/bin/paste
+local wc /usr/bin/wc
+local sleep /bin/sleep
Added: SwiftApps/tryswift/test.php
===================================================================
--- SwiftApps/tryswift/test.php (rev 0)
+++ SwiftApps/tryswift/test.php 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,23 @@
+ array("pipe", "r"), // stdin is a pipe that the child will read from
+ 1 => array("pipe", "w"), // stdout is a pipe that the child will write to
+ 2 => array("pipe", "w") // stderr is a pipe that the child will write to
+);
+
+flush();
+
+$process = proc_open($cmd, $descriptorspec, $pipes, realpath('./'), array());
+echo "";
+if (is_resource($process)) {
+ while ($s = fgets($pipes[1])) {
+ print $s;
+ flush();
+ }
+}
+echo " ";
+?>
+
Added: SwiftApps/tryswift/tryswift-php.css
===================================================================
--- SwiftApps/tryswift/tryswift-php.css (rev 0)
+++ SwiftApps/tryswift/tryswift-php.css 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,64 @@
+html,body
+{
+ margin:0;
+ padding:0;
+ width: 900px;
+ height: 600px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+a {
+text-decoration: none;
+}
+
+table {
+border: 0;
+border-bottom: 1px solid black;
+border-left: 1px solid black;
+border-right: 1px solid black;
+background-color:#f6f6f6
+font-family: monospace;
+width: 900px;
+}
+
+#style1 td {
+border-left: 1px solid black;
+border-right: 1px solid black;
+border-top: 0;
+border-bottom: 0;
+background-color:#f6f6f6
+padding-left: 0px;
+padding-right: 0px;
+padding-top: 2px;
+padding-bottom: 2px;
+}
+
+#style2 td {
+border-top: 0;
+border-bottom: 0;
+border-left: 1px solid black;
+background-color:#f6f6f6
+padding-left: 10px;
+padding-right: 0;
+padding-top: 0px;
+padding-bottom: 0px;
+}
+
+#header {
+font-family:courier-new,monospace;
+font-size:150%;
+color:#2c1f8e;
+vertical-align:sub;
+}
+
+caption {
+background:#e3e3e3;
+border-right: 1px solid black;
+border-left: 1px solid black;
+border-top: 1px solid black;
+border-bottom: 1px solid black;
+margin-top: 10px;
+padding: 2px;
+}
+
Added: SwiftApps/tryswift/tryswift.css
===================================================================
--- SwiftApps/tryswift/tryswift.css (rev 0)
+++ SwiftApps/tryswift/tryswift.css 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,110 @@
+html,body
+{
+ margin:0;
+ padding:0;
+ width: 900px;
+ height: 600px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+#header {
+font-family:courier-new,monospace;
+font-size:150%;
+color:#2c1f8e;
+vertical-align:sub;
+}
+
+#wrap {
+position: relative;
+width: 900px;
+height: 600px;
+border: 1px;
+border-style: solid;
+}
+
+#textAreaDiv {
+position: absolute;
+left: 200px;
+right: 200px;
+top: 50px;
+bottom: 50px;
+height: 500px;
+width: 500px;
+}
+
+#wrapHeader {
+position:absolute;
+top: 0px;
+left: 0px;
+width: 900px;
+height: 50px;
+background:#f6f6f6;
+text-align: center;
+}
+
+#progsDiv {
+position: absolute;
+left: 0px;
+top: 50px;
+background:#f6f6f6;
+height: 550px;
+width: 200px;
+}
+
+#progsDivText {
+margin-left:10px;
+margin-right:10px;
+background:#f6f6f6;
+}
+
+#appsDiv {
+position: absolute;
+right: 0px;
+top: 50px;
+background:#f6f6f6;
+height: 550px;
+width: 200px;
+}
+
+#appsDivText {
+margin-left:10px;
+margin-right:10px;
+background:#f6f6f6;
+}
+
+#submitButton {
+position: absolute;
+right: 200px;
+left: 200px;
+bottom: 0px;
+background:#f6f6f6;
+height: 50px;
+width: 500px;
+}
+
+textarea {
+border-bottom:1px solid black;
+border-top:1px solid black;
+border-left:1px solid black;
+border-right:1px solid black;
+border-style: solid;
+border-width: thin;
+padding: 0;
+height: 500px;
+width: 500px;
+}
+
+ul {
+list-style-type:none;
+margin-top: 0;
+margin-left: 0;
+padding-left: 5px;
+}
+
+li {
+margin-left: 0;
+padding-left: 5px;
+padding-bottom: 10px;
+text-align: left;
+}
Added: SwiftApps/tryswift/tryswift.php
===================================================================
--- SwiftApps/tryswift/tryswift.php (rev 0)
+++ SwiftApps/tryswift/tryswift.php 2013-09-10 19:41:45 UTC (rev 7052)
@@ -0,0 +1,104 @@
+
+Try Swift Results
+
+
+
+
+ array("pipe", "r"), // stdin is a pipe that the child will read from
+ 1 => array("pipe", "w"), // stdout is a pipe that the child will write to
+ 2 => array("file", "$dirname/err.txt", "a") // stderr is a pipe that the child will write to
+);
+
+echo "";
+print " \n";
+print "Swift Source Code [Download ] \n";
+
+$count=0;
+foreach(explode("\n", $_POST['source']) as $line) {
+ print "" .
+ "" . ++$count . " " .
+ "$line  \n";
+}
+print "
\n";
+print "\n";
+print "Swift Execution \n";
+
+# Run Swift
+$process = proc_open($cmd, $descriptorspec, $pipes, realpath('./'), array());
+if (is_resource($process)) {
+ while ($s = fgets($pipes[1])) {
+ print "" .
+ "$s  \n";
+ flush();
+ }
+}
+
+echo "
";
+proc_close($process);
+
+# List output files
+$filehtml = "";
+$print_files=0;
+
+if ($handle = opendir("$web_directory/$unique")) {
+ while (false !== ($entry = readdir($handle))) {
+ if ( $entry != "." &&
+ $entry != ".." &&
+ $entry != "err.txt" &&
+ $entry != "tc.data" &&
+ $entry != "sites.xml" &&
+ $entry != "script.swift" &&
+ substr($entry, -2) != ".d" &&
+ substr($entry, -4) != ".kml" &&
+ substr($entry, -7) != ".swiftx" &&
+ substr($entry, -4) != ".log"
+ ) {
+ if($print_files == 0) { $print_files=1; }
+ $filehtml .= "" .
+ "" .
+ "$entry   \n";
+ }
+ }
+ closedir($handle);
+}
+
+if($print_files) {
+ print "\n" .
+ "List of Files \n" .
+ $filehtml .
+ "
\n";
+}
+
+?>
Property changes on: SwiftApps/tryswift/tryswift.php
___________________________________________________________________
Added: svn:executable
+ *
From davidk at ci.uchicago.edu Tue Sep 10 15:33:02 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Tue, 10 Sep 2013 15:33:02 -0500 (CDT)
Subject: [Swift-commit] r7053 - in SwiftApps/tryswift: . scripts
Message-ID: <20130910203302.EF5709CC73@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-10 15:33:02 -0500 (Tue, 10 Sep 2013)
New Revision: 7053
Added:
SwiftApps/tryswift/index.php
SwiftApps/tryswift/scripts/p1.swift
SwiftApps/tryswift/scripts/p2.swift
SwiftApps/tryswift/scripts/p3.swift
SwiftApps/tryswift/scripts/p4.swift
SwiftApps/tryswift/scripts/p5.swift
SwiftApps/tryswift/scripts/p6.swift
Removed:
SwiftApps/tryswift/index.html
SwiftApps/tryswift/scripts/arrays.swift
SwiftApps/tryswift/scripts/capitalise.swift
SwiftApps/tryswift/scripts/capitalise_anonymous.swift
SwiftApps/tryswift/scripts/default.swift
SwiftApps/tryswift/scripts/fixed_array_mapper.swift
SwiftApps/tryswift/scripts/foreach.swift
SwiftApps/tryswift/scripts/hello.swift
SwiftApps/tryswift/scripts/if.swift
SwiftApps/tryswift/scripts/manyparam.swift
SwiftApps/tryswift/scripts/my_first_mapper.swift
SwiftApps/tryswift/scripts/parameter.swift
SwiftApps/tryswift/scripts/regexp_mapper.swift
SwiftApps/tryswift/scripts/restart.swift
SwiftApps/tryswift/scripts/sequential_iteration.swift
SwiftApps/tryswift/scripts/sleep.swift
SwiftApps/tryswift/scripts/types.swift
Log:
Dynamic generation of available scripts based on contents of scripts/ directory
Use tutorial scripts from swift-cray-tutorial
Deleted: SwiftApps/tryswift/index.html
===================================================================
--- SwiftApps/tryswift/index.html 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/index.html 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,86 +0,0 @@
-
-
-
- Try Swift
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Available Applications
-
- echo
- cat
- ls
- grep
- sort
- paste
- cp
- touch
- wc
- sleep
-
-
-
-
-
-
-
-
-
-
Added: SwiftApps/tryswift/index.php
===================================================================
--- SwiftApps/tryswift/index.php (rev 0)
+++ SwiftApps/tryswift/index.php 2013-09-10 20:33:02 UTC (rev 7053)
@@ -0,0 +1,94 @@
+
+
+
+ Try Swift
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Available Applications
+
+ echo
+ cat
+ ls
+ grep
+ sort
+ paste
+ cp
+ touch
+ wc
+ sleep
+
+
+
+
+
+
+
+
+
+
Deleted: SwiftApps/tryswift/scripts/arrays.swift
===================================================================
--- SwiftApps/tryswift/scripts/arrays.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/arrays.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,12 +0,0 @@
-type messagefile;
-
-app (messagefile t) greeting (string s[]) {
- echo s[0] s[1] s[2] stdout=@filename(t);
-}
-
-messagefile outfile <"arrays.txt">;
-
-string words[] = ["how","are","you"];
-
-outfile = greeting(words);
-
Deleted: SwiftApps/tryswift/scripts/capitalise.swift
===================================================================
--- SwiftApps/tryswift/scripts/capitalise.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/capitalise.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,14 +0,0 @@
-type messagefile;
-
-app (messagefile t) greeting (string s) {
- echo s stdout=@filename(t);
-}
-
-app (messagefile o) capitalise(messagefile i) {
- tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o);
-}
-
-messagefile hellofile <"capitalise.1.txt">;
-messagefile final <"capitalise.2.txt">;
-hellofile = greeting("hello from Swift");
-final = capitalise(hellofile);
Deleted: SwiftApps/tryswift/scripts/capitalise_anonymous.swift
===================================================================
--- SwiftApps/tryswift/scripts/capitalise_anonymous.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/capitalise_anonymous.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,14 +0,0 @@
-type messagefile;
-
-app (messagefile t) greeting (string s) {
- echo s stdout=@filename(t);
-}
-
-app (messagefile o) capitalise(messagefile i) {
- tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o);
-}
-
-messagefile hellofile;
-messagefile final <"capitalise_anonymous.txt">;
-hellofile = greeting("hello from Swift");
-final = capitalise(hellofile);
Deleted: SwiftApps/tryswift/scripts/default.swift
===================================================================
--- SwiftApps/tryswift/scripts/default.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/default.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,15 +0,0 @@
-type file;
-
-// s has a default value
-app (file t) echo (string s="hello world") {
- echo s stdout=@filename(t);
-}
-
-file hw1<"default.1.txt">;
-file hw2<"default.2.txt">;
-
-// procedure call using the default value
-hw1 = echo();
-
-// using a different value
-hw2 = echo(s="hello again");
Deleted: SwiftApps/tryswift/scripts/fixed_array_mapper.swift
===================================================================
--- SwiftApps/tryswift/scripts/fixed_array_mapper.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/fixed_array_mapper.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,16 +0,0 @@
-type messagefile;
-type countfile;
-
-app (countfile t) countwords (messagefile f) {
- wc "-w" @filename(f) stdout=@filename(t);
-}
-
-string inputNames = "fixed_array_mapper.1.txt fixed_array_mapper.2.txt fixed_array_mapper.3.txt";
-string outputNames = "fixed_array_mapper.1.count fixed_array_mapper.2.count fixed_array_mapper.3.count";
-
-messagefile inputfiles[] ;
-countfile outputfiles[] ;
-
-outputfiles[0] = countwords(inputfiles[0]);
-outputfiles[1] = countwords(inputfiles[1]);
-outputfiles[2] = countwords(inputfiles[2]);
Deleted: SwiftApps/tryswift/scripts/foreach.swift
===================================================================
--- SwiftApps/tryswift/scripts/foreach.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/foreach.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,18 +0,0 @@
-type messagefile;
-type countfile;
-
-app (countfile t) countwords (messagefile f) {
- wc "-w" @filename(f) stdout=@filename(t);
-}
-
-string inputNames = "foreach.1.txt foreach.2.txt foreach.3.txt";
-
-messagefile inputfiles[] ;
-
-foreach f in inputfiles {
- countfile c;
- c = countwords(f);
-}
Deleted: SwiftApps/tryswift/scripts/hello.swift
===================================================================
--- SwiftApps/tryswift/scripts/hello.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/hello.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,10 +0,0 @@
-type messagefile;
-
-app (messagefile t) greeting() {
- echo "Hello, world!" stdout=@filename(t);
-}
-
-messagefile outfile <"hello.txt">;
-
-outfile = greeting();
-
Deleted: SwiftApps/tryswift/scripts/if.swift
===================================================================
--- SwiftApps/tryswift/scripts/if.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/if.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,16 +0,0 @@
-type messagefile;
-
-app (messagefile t) greeting (string s) {
- echo s stdout=@filename(t);
-}
-
-messagefile outfile <"if.txt">;
-
-boolean morning = true;
-
-if(morning) {
- outfile = greeting("good morning");
-} else {
- outfile = greeting("good afternoon");
-}
-
Deleted: SwiftApps/tryswift/scripts/manyparam.swift
===================================================================
--- SwiftApps/tryswift/scripts/manyparam.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/manyparam.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,13 +0,0 @@
-type messagefile;
-
-app (messagefile t) greeting (string s) {
- echo s stdout=@filename(t);
-}
-
-messagefile english <"manyparam.english.txt">;
-messagefile french <"manyparam.french.txt">;
-messagefile japanese <"manyparam.japanese.txt">;
-
-english = greeting("hello");
-french = greeting("bonjour");
-japanese = greeting("konnichiwa");
Deleted: SwiftApps/tryswift/scripts/my_first_mapper.swift
===================================================================
--- SwiftApps/tryswift/scripts/my_first_mapper.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/my_first_mapper.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,9 +0,0 @@
-type messagefile;
-
-app (messagefile t) greeting() {
- echo "hello" stdout=@filename(t);
-}
-
-messagefile outfile ;
-
-outfile = greeting();
Added: SwiftApps/tryswift/scripts/p1.swift
===================================================================
--- SwiftApps/tryswift/scripts/p1.swift (rev 0)
+++ SwiftApps/tryswift/scripts/p1.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -0,0 +1,9 @@
+type file;
+
+app (file o) simulation ()
+{
+ simulate stdout=@filename(o);
+}
+
+file f <"sim.out">;
+f = simulation();
Added: SwiftApps/tryswift/scripts/p2.swift
===================================================================
--- SwiftApps/tryswift/scripts/p2.swift (rev 0)
+++ SwiftApps/tryswift/scripts/p2.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -0,0 +1,11 @@
+type file;
+
+app (file o) simulation ()
+{
+ simulate stdout=@filename(o);
+}
+
+foreach i in [0:9] {
+ file f ;
+ f = simulation();
+}
Added: SwiftApps/tryswift/scripts/p3.swift
===================================================================
--- SwiftApps/tryswift/scripts/p3.swift (rev 0)
+++ SwiftApps/tryswift/scripts/p3.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -0,0 +1,27 @@
+type file;
+
+app (file o) simulation (int sim_steps, int sim_range, int sim_values)
+{
+ simulate "--timesteps" sim_steps "--range" sim_range "--nvalues" sim_values stdout=@filename(o);
+}
+
+app (file o) analyze (file s[])
+{
+ stats @filenames(s) stdout=@filename(o);
+}
+
+int nsim = @toInt(@arg("nsim","10"));
+int steps = @toInt(@arg("steps","1"));
+int range = @toInt(@arg("range","100"));
+int values = @toInt(@arg("values","5"));
+
+file sims[];
+
+foreach i in [0:nsim-1] {
+ file simout ;
+ simout = simulation(steps,range,values);
+ sims[i] = simout;
+}
+
+file stats<"output/average.out">;
+stats = analyze(sims);
Added: SwiftApps/tryswift/scripts/p4.swift
===================================================================
--- SwiftApps/tryswift/scripts/p4.swift (rev 0)
+++ SwiftApps/tryswift/scripts/p4.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -0,0 +1,29 @@
+type file;
+
+app (file out, file log) simulation (int sim_steps, int sim_range, int sim_values)
+{
+ simulate "--timesteps" sim_steps "--range" sim_range "--nvalues" sim_values stdout=@out stderr=@log;
+}
+
+app (file out, file log) analyze (file s[])
+{
+ stats @filenames(s) stdout=@out stderr=@log;
+}
+
+int nsim = @toInt(@arg("nsim", "10"));
+int steps = @toInt(@arg("steps", "1"));
+int range = @toInt(@arg("range", "100"));
+int values = @toInt(@arg("values", "5"));
+
+file sims[];
+
+foreach i in [0:nsim-1] {
+ file simout ;
+ file simlog ;
+ (simout,simlog) = simulation(steps,range,values);
+ sims[i] = simout;
+}
+
+file stats_out<"output/average.out">;
+file stats_log<"output/average.log">;
+(stats_out, stats_log) = analyze(sims);
Added: SwiftApps/tryswift/scripts/p5.swift
===================================================================
--- SwiftApps/tryswift/scripts/p5.swift (rev 0)
+++ SwiftApps/tryswift/scripts/p5.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -0,0 +1,29 @@
+type file;
+
+app (file out, file log) simulation (int sim_steps, int sim_range, int sim_values)
+{
+ simulate "--timesteps" sim_steps "--range" sim_range "--nvalues" sim_values stdout=@out stderr=@log;
+}
+
+app (file out, file log) analyze (file s[])
+{
+ stats @filenames(s) stdout=@out stderr=@log;
+}
+
+int nsim = @toInt(@arg("nsim", "10"));
+int steps = @toInt(@arg("steps", "1"));
+int range = @toInt(@arg("range", "100"));
+int values = @toInt(@arg("values", "5"));
+
+file sims[];
+
+foreach i in [0:nsim-1] {
+ file simout ;
+ file simlog ;
+ (simout,simlog) = simulation(steps,range,values);
+ sims[i] = simout;
+}
+
+file stats_out<"output/average.out">;
+file stats_log<"output/average.log">;
+(stats_out, stats_log) = analyze(sims);
Added: SwiftApps/tryswift/scripts/p6.swift
===================================================================
--- SwiftApps/tryswift/scripts/p6.swift (rev 0)
+++ SwiftApps/tryswift/scripts/p6.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -0,0 +1,57 @@
+type file;
+
+# app() functions for application programs to be called:
+
+app (file out) genseed (int nseeds)
+{
+ genseed "-r" 2000000 "-n" nseeds stdout=@out;
+}
+
+app (file out) genbias (int bias_range, int nvalues)
+{
+ genbias "-r" bias_range "-n" nvalues stdout=@out;
+}
+
+app (file out, file log) simulation (int timesteps, int sim_range,
+ file bias_file, int scale, int sim_count)
+{
+ simulate "-t" timesteps "-r" sim_range "-B" @bias_file "-x" scale
+ "-n" sim_count stdout=@out stderr=@log;
+}
+
+app (file out, file log) analyze (file s[])
+{
+ stats @filenames(s) stdout=@out stderr=@log;
+}
+
+# Command line arguments
+
+int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run
+int steps = @toInt(@arg("steps", "1")); # number of timesteps (seconds) per simulation
+int range = @toInt(@arg("range", "100")); # range of the generated random numbers
+int values = @toInt(@arg("values", "10")); # number of values generated per simulation
+
+# Main script and data
+
+tracef("\n*** Script parameters: nsim=%i range=%i num values=%i\n\n", nsim, range, values);
+
+file seedfile<"output/seed.dat">; # Dynamically generated bias for simulation ensemble
+seedfile = genseed(1);
+
+int seedval = readData(seedfile);
+tracef("Generated seed=%i\n", seedval);
+
+file sims[]; # Array of files to hold each simulation output
+
+foreach i in [0:nsim-1] {
+ file biasfile ;
+ file simout ;
+ file simlog ;
+ biasfile = genbias(1000, 20);
+ (simout,simlog) = simulation(steps, range, biasfile, 1000000, values);
+ sims[i] = simout;
+}
+
+file stats_out<"output/average.out">;
+file stats_log<"output/average.log">;
+(stats_out,stats_log) = analyze(sims);
Deleted: SwiftApps/tryswift/scripts/parameter.swift
===================================================================
--- SwiftApps/tryswift/scripts/parameter.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/parameter.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,8 +0,0 @@
-type messagefile;
-
-app (messagefile t) greeting (string s) {
- echo s stdout=@filename(t);
-}
-
-messagefile outfile <"parameter.hello.txt">;
-outfile = greeting("hello world");
Deleted: SwiftApps/tryswift/scripts/regexp_mapper.swift
===================================================================
--- SwiftApps/tryswift/scripts/regexp_mapper.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/regexp_mapper.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,16 +0,0 @@
-type messagefile;
-type countfile;
-
-app (countfile t) countwords (messagefile f) {
- wc "-w" @filename(f) stdout=@filename(t);
-}
-
-messagefile inputfile <"regexp_mapper.words.txt">;
-
-countfile c ;
-
-c = countwords(inputfile);
-
Deleted: SwiftApps/tryswift/scripts/restart.swift
===================================================================
--- SwiftApps/tryswift/scripts/restart.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/restart.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,24 +0,0 @@
-type file;
-
-app (file f) touch() {
- touch @f;
-}
-
-app (file f) processL(file inp) {
- echo "processL" stdout=@f;
-}
-
-app (file f) processR(file inp) {
- broken "process" stdout=@f;
-}
-
-app (file f) join(file left, file right) {
- echo "join" @left @right stdout=@f;
-}
-
-file f = touch();
-
-file g = processL(f);
-file h = processR(f);
-
-file i = join(g,h);
Deleted: SwiftApps/tryswift/scripts/sequential_iteration.swift
===================================================================
--- SwiftApps/tryswift/scripts/sequential_iteration.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/sequential_iteration.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,18 +0,0 @@
-type counterfile;
-
-app (counterfile t) echo(string m) {
- echo m stdout=@filename(t);
-}
-
-app (counterfile t) countstep(counterfile i) {
- wcl @filename(i) @filename(t);
-}
-
-counterfile a[] ;
-
-a[0] = echo("793578934574893");
-
-iterate v {
- a[v+1] = countstep(a[v]);
- trace("extract int value ", at extractint(a[v+1]));
-} until (@extractint(a[v+1]) <= 1);
Deleted: SwiftApps/tryswift/scripts/sleep.swift
===================================================================
--- SwiftApps/tryswift/scripts/sleep.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/sleep.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,9 +0,0 @@
-type file;
-
-app sleep (int s) {
- sleep s;
-}
-
-foreach f in [1:5] {
- sleep(30);
-}
Deleted: SwiftApps/tryswift/scripts/types.swift
===================================================================
--- SwiftApps/tryswift/scripts/types.swift 2013-09-10 19:41:45 UTC (rev 7052)
+++ SwiftApps/tryswift/scripts/types.swift 2013-09-10 20:33:02 UTC (rev 7053)
@@ -1,20 +0,0 @@
-type messagefile;
-
-type details {
- string name;
- int pies;
-}
-
-app (messagefile t) greeting (details d) {
- echo "Hello. Your name is" d.name "and you have eaten" d.pies "pies." stdout=@filename(t);
-}
-
-details person;
-
-person.name = "John";
-person.pies = 3;
-
-messagefile outfile <"types.pies.txt">;
-
-outfile = greeting(person);
-
From davidk at ci.uchicago.edu Wed Sep 11 12:47:27 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Wed, 11 Sep 2013 12:47:27 -0500 (CDT)
Subject: [Swift-commit] r7054 - SwiftApps/tryswift
Message-ID: <20130911174728.011779CC6B@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-11 12:47:27 -0500 (Wed, 11 Sep 2013)
New Revision: 7054
Modified:
SwiftApps/tryswift/index.php
Log:
Dynamic generation of available applications from tc.data
Modified: SwiftApps/tryswift/index.php
===================================================================
--- SwiftApps/tryswift/index.php 2013-09-10 20:33:02 UTC (rev 7053)
+++ SwiftApps/tryswift/index.php 2013-09-11 17:47:27 UTC (rev 7054)
@@ -47,26 +47,24 @@
-
-
- Available Applications
-
- echo
- cat
- ls
- grep
- sort
- paste
- cp
- touch
- wc
- sleep
-
-
-
-
-
+
+
+ Available Applications
+
+ $line_array[1]\n";
+ }
+ }
+ fclose($file_handle);
+ ?>
+
+
+
+
+
+
+
+
+
+
+ Back
+ Next
+
- $directory = opendir("scripts");
- while($script = readdir($directory)) {
- if(substr($script, -6) == ".swift") {
- $scriptFiles[] = $script;
- }
- }
- closedir($directory);
+
- sort($scriptFiles);
- foreach($scriptFiles as $script) {
- echo " $script\n";
-
- $html_filename="scripts/" . basename($script, ".swift") . ".html";
- if(file_exists($html_filename)) {
- echo "[info] \n";
+
+
- echo " \n";
- }
- ?>
-
-
-
-
-
-
+
+
+
-
+ $(document).ready(function() {
+ scale();
+ $(window).resize(function() { scale(); });
+ updateScript();
+
+ $('#next').click(function() {
+ if((scriptCounter + 1) <= (scripts.length - 1)) {
+ scriptCounter++;
+ updateScript();
+ }
+ })
+
+ $('#back').click(function() {
+ if ((scriptCounter - 1) >= 0) {
+ scriptCounter=scriptCounter-1;
+ updateScript();
+ }
+ })
+
+ $('#resetButton').click(function() {
+ updateScript();
+ })
+
+ $('#submitButton').click(function() {
+ $('#sourceText').val(editor.getSession().getValue());
+ if (!$("#sourceText").val()) { alert("Source text is empty!"); }
+ else {
+ $('#outFrame').modal({
+ overlayClose : true,
+ autoResize : true,
+ autoPosition : true,
+ });
+ $('#sourceForm').submit();
+ }
+ })
+ })
+
Modified: SwiftApps/tryswift/tryswift.css
===================================================================
--- SwiftApps/tryswift/tryswift.css 2013-09-25 18:34:26 UTC (rev 7109)
+++ SwiftApps/tryswift/tryswift.css 2013-09-29 06:09:25 UTC (rev 7110)
@@ -1,110 +1,165 @@
-html,body
-{
- margin:0;
+* {
+ margin: 0;
padding:0;
- width: 900px;
- height: 600px;
- margin-left: auto;
- margin-right: auto;
+ overflow: hidden
+}
+
+html, body {
+ height: 100%;
}
-#header {
-font-family:courier-new,monospace;
-font-size:150%;
-color:#2c1f8e;
-vertical-align:sub;
+#topsection {
+ height: 50px;
+ text-align: center;
+ background: black;
+ color: #B0B0B0;
}
-#wrap {
-position: relative;
-width: 900px;
-height: 600px;
-border: 1px;
-border-style: solid;
+b {
+ font-size: 110%;
}
-#textAreaDiv {
-position: absolute;
-left: 200px;
-right: 200px;
-top: 50px;
-bottom: 50px;
-height: 500px;
-width: 500px;
+em {
+ color: red;
}
-#wrapHeader {
-position:absolute;
-top: 0px;
-left: 0px;
-width: 900px;
-height: 50px;
-background:#f6f6f6;
-text-align: center;
+#topsection h1 {
+ margin: 0px;
+ padding-top: 15px;
}
-#progsDiv {
-position: absolute;
-left: 0px;
-top: 50px;
-background:#f6f6f6;
-height: 550px;
-width: 200px;
+#contentwrapper {
+ float: left;
+ width: 100%;
+ border: 0px;
}
-#progsDivText {
-margin-left:10px;
-margin-right:10px;
-background:#f6f6f6;
+#contentcolumn {
+ margin-left: 350px;
}
-#appsDiv {
-position: absolute;
-right: 0px;
-top: 50px;
-background:#f6f6f6;
-height: 550px;
-width: 200px;
+#leftcolumn {
+ position: absolute;
+ width: 350px;
+ left: 0px;
+ top: 50px;
+ bottom: 0px;
+ border: 0px;
+ margin: 0px;
+ padding: 0px;
+ clear: both;
}
-#appsDivText {
-margin-left:10px;
-margin-right:10px;
-background:#f6f6f6;
+#buttonsDiv {
+ position: absolute;
+ width: 350px;
+ left: 0;
+ top: 0;
+ height: 50px;
+ background: #B0B0B0;
}
#submitButton {
-position: absolute;
-right: 200px;
-left: 200px;
-bottom: 0px;
-background:#f6f6f6;
-height: 50px;
-width: 500px;
+ float: left;
+ color: #FFF;
+ background: #2956B2;
+ height: 40px;
+ width: 100px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ margin-left: 20px;
+ bottom: 0px;
+ font-size: 100%;
+}
+
+#resetButton {
+ float: left;
+ color: #FFF;
+ background: #2956B2;
+ height: 40px;
+ width: 100px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ margin-left: 20px;
+ bottom: 0px;
+ font-size: 100%;
+}
+
+#footer a {
+ color: #FFFF80;
}
-textarea {
-border-bottom:1px solid black;
-border-top:1px solid black;
-border-left:1px solid black;
-border-right:1px solid black;
-border-style: solid;
-border-width: thin;
-padding: 0;
-height: 500px;
-width: 500px;
+#editor {
+ position: absolute;
+ top: 50px;
+ left: 350px;
+ bottom: 50px;
+ right: 0px;
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
}
-ul {
-list-style-type:none;
-margin-top: 0;
-margin-left: 0;
-padding-left: 5px;
+#sourceForm {
+ display: none;
}
-li {
-margin-left: 0;
-padding-left: 5px;
-padding-bottom: 10px;
-text-align: left;
+#footer {
+ position: absolute;
+ height: 50px;
+ bottom: 0px;
+ left: 350px;
+ right: 0px;
+ background: #01313f;
+ color: #fff;
+ text-align: center;
+ padding: 0px;
+ margin: 0px;
+ border-top: 1px solid white;
}
+
+#infoFrame {
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ width: 350px;
+}
+
+#back {
+ position: absolute;
+ height: 25px;
+ width: 50px;
+ top: 25%;
+ left: 90px;
+ font-size: 100%;
+}
+
+#scriptCount {
+ position: absolute;
+ line-height: 25px;
+ width: 50px;
+ left: 150px;
+ top: 25%;
+}
+
+#next {
+ position: absolute;
+ left: 200px;
+ height: 25px;
+ width: 50px;
+ top: 25%;
+ font-size: 100%;
+}
+
+#outFrame {
+ display: none;
+}
+
+#basic-modal-content {display:none;}
+#simplemodal-overlay {background-color:#000;}
+#simplemodal-container { width: 0px; height: 0px; color:#bbb; background-color:#fff; border:4px solid #444; padding:0px; overflow:hidden; position:relative; }
+#simplemodal-container .simplemodal-data {padding:8px;}
+#simplemodal-container code {background:#141414; border-left:3px solid #65B43D; color:#bbb; display:block; font-size:12px; margin-bottom:12px; padding:4px 6px 6px;}
+#simplemodal-container a {color:#ddd;}
+#simplemodal-container a.modalCloseImg {background:url(img/basic/x.png) no-repeat; width:25px; height:29px; display:inline; z-index:3200; position:absolute; top:0px; right:0px; cursor:pointer;}
+#simplemodal-container h3 {color:#84b8d9;}
Modified: SwiftApps/tryswift/tryswift.php
===================================================================
--- SwiftApps/tryswift/tryswift.php 2013-09-25 18:34:26 UTC (rev 7109)
+++ SwiftApps/tryswift/tryswift.php 2013-09-29 06:09:25 UTC (rev 7110)
@@ -1,10 +1,15 @@
-Try Swift Results
+
-
-
+Executing.. please wait
+
+
+
array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
2 => array("pipe", "w") // stderr is a pipe that the child will write to
);
-echo "";
print " \n";
-print "Swift Source Code [Download ] \n";
-
-$count=0;
-foreach(explode("\n", $_POST['source']) as $line) {
- print "" .
- "" . ++$count . " " .
- "" . htmlentities($line) . " \n";
-}
-print "
\n";
-print "\n";
print "Swift Execution \n";
print " \n";
@@ -107,5 +99,15 @@
$filehtml .
"
\n";
}
+?>
-?>
+
+
+
+
+
From davidk at ci.uchicago.edu Sun Sep 29 01:18:54 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Sun, 29 Sep 2013 01:18:54 -0500 (CDT)
Subject: [Swift-commit] r7112 - SwiftApps/tryswift
Message-ID: <20130929061854.B74489CCAC@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-29 01:18:54 -0500 (Sun, 29 Sep 2013)
New Revision: 7112
Modified:
SwiftApps/tryswift/index.php
SwiftApps/tryswift/tryswift-php.css
Log:
Fix width of form output and add missing div
Modified: SwiftApps/tryswift/index.php
===================================================================
--- SwiftApps/tryswift/index.php 2013-09-29 06:10:58 UTC (rev 7111)
+++ SwiftApps/tryswift/index.php 2013-09-29 06:18:54 UTC (rev 7112)
@@ -31,6 +31,7 @@
Modified: SwiftApps/tryswift/tryswift-php.css
===================================================================
--- SwiftApps/tryswift/tryswift-php.css 2013-09-29 06:10:58 UTC (rev 7111)
+++ SwiftApps/tryswift/tryswift-php.css 2013-09-29 06:18:54 UTC (rev 7112)
@@ -2,8 +2,8 @@
{
margin:0;
padding:0;
- width: 900px;
- height: 600px;
+ width: 400px;
+ background: #fff;
margin-left: auto;
margin-right: auto;
}
@@ -50,6 +50,7 @@
font-size:150%;
color:#2c1f8e;
vertical-align:sub;
+text-align: center;
}
caption {
From davidk at ci.uchicago.edu Sun Sep 29 22:09:25 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Sun, 29 Sep 2013 22:09:25 -0500 (CDT)
Subject: [Swift-commit] r7113 - tags
Message-ID: <20130930030925.C807E9CCAC@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-29 22:09:24 -0500 (Sun, 29 Sep 2013)
New Revision: 7113
Added:
tags/swift-0.94.1/
Log:
0.94.1 tag
From davidk at ci.uchicago.edu Sun Sep 29 22:20:35 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Sun, 29 Sep 2013 22:20:35 -0500 (CDT)
Subject: [Swift-commit] r7114 - tags/swift-0.94.1/libexec
Message-ID: <20130930032035.C067C9CCAC@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-29 22:20:35 -0500 (Sun, 29 Sep 2013)
New Revision: 7114
Modified:
tags/swift-0.94.1/libexec/release.txt
Log:
Update release name
Modified: tags/swift-0.94.1/libexec/release.txt
===================================================================
--- tags/swift-0.94.1/libexec/release.txt 2013-09-30 03:09:24 UTC (rev 7113)
+++ tags/swift-0.94.1/libexec/release.txt 2013-09-30 03:20:35 UTC (rev 7114)
@@ -1 +1 @@
-0.94.1 RC4
+0.94.1
From davidk at ci.uchicago.edu Mon Sep 30 12:15:50 2013
From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu)
Date: Mon, 30 Sep 2013 12:15:50 -0500 (CDT)
Subject: [Swift-commit] r7115 - tags/swift-0.94.1
Message-ID: <20130930171550.701159CCA5@svn.ci.uchicago.edu>
Author: davidk
Date: 2013-09-30 12:15:50 -0500 (Mon, 30 Sep 2013)
New Revision: 7115
Added:
tags/swift-0.94.1/RELEASENOTES.txt
Removed:
tags/swift-0.94.1/CHANGES.txt
Log:
Release notes
Deleted: tags/swift-0.94.1/CHANGES.txt
===================================================================
--- tags/swift-0.94.1/CHANGES.txt 2013-09-30 03:20:35 UTC (rev 7114)
+++ tags/swift-0.94.1/CHANGES.txt 2013-09-30 17:15:50 UTC (rev 7115)
@@ -1,732 +0,0 @@
-(07/05/11)
-
-*** Provenance tracking in the compiled file is now disabled by default.
- Enable with swift -enable.provenance
+
+
+
+
+
+
+
The first swift script, p1.swift, runs simulate.sh to generate a
+single random number. It writes the number to a file.
+
+
+
+
+
+
+
p1.swift
+
+
type file;
+
+app (file o) simulation ()
+{
+ simulate stdout=@filename(o);
+}
+
+file f <"sim.out">;
+f = simulation();
+
+
+
+
+
+
+
+