[Swift-commit] r6471 - in demo/cray/swift-1.0: . part00 part08
wilde at ci.uchicago.edu
wilde at ci.uchicago.edu
Wed Apr 17 19:13:29 CDT 2013
Author: wilde
Date: 2013-04-17 19:13:29 -0500 (Wed, 17 Apr 2013)
New Revision: 6471
Added:
demo/cray/swift-1.0/part00/
demo/cray/swift-1.0/part00/README
demo/cray/swift-1.0/part00/p0.swift
demo/cray/swift-1.0/part00/p0.swift.original
demo/cray/swift-1.0/part08/apps
demo/cray/swift-1.0/part08/dmrules
Removed:
demo/cray/swift-1.0/part08/dm
demo/cray/swift-1.0/part08/tc
Modified:
demo/cray/swift-1.0/part08/README
demo/cray/swift-1.0/part08/cf
demo/cray/swift-1.0/part08/raven.xml
demo/cray/swift-1.0/part08/ravenps.xml
demo/cray/swift-1.0/setup.sh
Log:
Add part00 for a basic intro to Swift language elements.
Added: demo/cray/swift-1.0/part00/README
===================================================================
--- demo/cray/swift-1.0/part00/README (rev 0)
+++ demo/cray/swift-1.0/part00/README 2013-04-18 00:13:29 UTC (rev 6471)
@@ -0,0 +1,21 @@
+
+TOPIC: Basics of the Swift language
+
+A walk through comments, trace() statements (Swift's only form of direct
+printing, variables, arrays, and loops.
+
+
+/*Remove the comments marked <--, one at a time,
+ to try the following examples
+ using "swift p0.swift"
+*/
+
+
+// (1) Declare, assign, and trace variables:
+
+/* <-- (1)
+
+p0.swift.original is provided in case you need to get back to the original
+script.
+
+
Added: demo/cray/swift-1.0/part00/p0.swift
===================================================================
--- demo/cray/swift-1.0/part00/p0.swift (rev 0)
+++ demo/cray/swift-1.0/part00/p0.swift 2013-04-18 00:13:29 UTC (rev 6471)
@@ -0,0 +1,76 @@
+
+tracef("Hello, World!\n");
+
+# this is a one-line comment
+
+// as it this
+
+/* This is a
+ multi-line c
+
+*/
+
+/*Remove the comments marked <--, one at a time,
+ to try the following examples
+ using "swift p0.swift"
+*/
+
+
+// (1) Declare, assign, and trace variables:
+
+/* <-- (1)
+int n;
+string str;
+
+n=99;
+str = "\n\n hi there! \n\n";
+
+tracef("\n n=%i str=%s\n\n", n, str);
+
+
+// (2) Declare and trace a vector
+
+/* <-- (2)
+int[] ivec = [12,43,56,87,123];
+tracef("ivec: %q\n",ivec);
+trace("ivec",ivec);
+
+
+// (3) foreach: do each loop body in parallel
+
+/* <-- (3)
+foreach i, value in ivec {
+ tracef("i=%i value=%i\n", i, value);
+}
+
+
+// (4) Use an array constructor to control a foreach loop
+
+/* <-- (4)
+foreach j, value in [0:9] {
+ tracef("j=%i value=%i\n", j, value);
+}
+
+
+// (5) Data flow evaluation: the statements below execute in reverse order
+
+/* <-- (5)
+int a, b, c;
+
+c = 1234;
+a = b;
+b = c;
+
+trace("dataflow", a, b, c);
+
+
+// (6) The iterate statement executes sequentially
+
+/* <-- (6)
+iterate iter {
+ trace("iter",iter);
+} until(iter==10);
+
+*/
+
+// TO ADD: functions, if, select... Associative arrays... More?
Added: demo/cray/swift-1.0/part00/p0.swift.original
===================================================================
--- demo/cray/swift-1.0/part00/p0.swift.original (rev 0)
+++ demo/cray/swift-1.0/part00/p0.swift.original 2013-04-18 00:13:29 UTC (rev 6471)
@@ -0,0 +1,74 @@
+
+tracef("Hello, World!\n");
+
+# this is a one-line comment
+
+// as it this
+
+/* This is a
+ multi-line c
+
+*/
+
+/*Remove the comments marked <--, one at a time,
+ to try the following examples
+ using "swift p0.swift"
+*/
+
+
+// (1) Declare, assign, and trace variables:
+
+/* <-- (1)
+int n;
+string str;
+
+n=99;
+str = "\n\n hi there! \n\n";
+
+tracef("\n n=%i str=%s\n\n", n, str);
+
+
+// (2) Declare and trace a vector
+
+/* <-- (2)
+int[] ivec = [12,43,56,87,123];
+tracef("ivec: %q\n",ivec);
+trace("ivec",ivec);
+
+
+// (3) foreach: do each loop body in parallel
+
+/* <-- (3)
+foreach i, value in ivec {
+ tracef("i=%i value=%i\n", i, value);
+}
+
+
+// (4) Use an array constructor to control a foreach loop
+
+/* <-- (4)
+foreach j, value in [0:9] {
+ tracef("j=%i value=%i\n", j, value);
+}
+
+
+// (5) Data flow evaluation: the statements below execute in reverse order
+
+/* <-- (5)
+int a, b, c;
+
+c = 1234;
+a = b;
+b = c;
+
+trace("dataflow", a, b, c);
+
+
+// (6) The iterate statement executes sequentially
+
+/* <-- (6)
+iterate iter {
+ trace("iter",iter);
+} until(iter==10);
+
+*/
Modified: demo/cray/swift-1.0/part08/README
===================================================================
--- demo/cray/swift-1.0/part08/README 2013-04-17 19:52:32 UTC (rev 6470)
+++ demo/cray/swift-1.0/part08/README 2013-04-18 00:13:29 UTC (rev 6471)
@@ -1,15 +1,27 @@
+Regular staging with deafult data management:
+ swift -config cf -tc.file apps -sites.file cray.xml p8.swift -steps=1 -range=1000 -count=6 -nsim=100
+
Regular staging with direct data management:
- swift -config cf -tc.file tc -sites.file cray.xml -cdm.file dm p8.swift -steps=1 -range=1000 -count=6 -nsim=100
+ swift -config cf -tc.file apps -sites.file cray.xml -cdm.file dmrules p8.swift -steps=1 -range=1000 -count=6 -nsim=100
Provider staging:
- swift -config cf.ps -tc.file tc -sites.file ravenps.xml p8.swift -steps=5 -range=1000 -count=6 -nsim=100
+ swift -config cf.ps -tc.file apps -sites.file ravenps.xml p8.swift -steps=5 -range=1000 -count=6 -nsim=100
+Adjust the job sizes:
+ <profile namespace="globus" key="slots">6</profile>
+ <profile namespace="globus" key="nodeGranularity">4</profile>
+ <profile namespace="globus" key="maxNodes">4</profile>
+
+
+The app list
+
+
OLD: FIXME:
TOPIC: Run the "simulations" on the parallel cluster
Copied: demo/cray/swift-1.0/part08/apps (from rev 6464, demo/cray/swift-1.0/part08/tc)
===================================================================
--- demo/cray/swift-1.0/part08/apps (rev 0)
+++ demo/cray/swift-1.0/part08/apps 2013-04-18 00:13:29 UTC (rev 6471)
@@ -0,0 +1,8 @@
+#cray random5 /lustre/beagle/wilde/swift/demo/cray/svn/bin/random5.sh
+#cray average /lustre/beagle/wilde/swift/demo/cray/svn/bin/avg.sh
+
+#cray random5 /home/users/p01532/swift/demo/svn/bin/random5.sh
+#cray average /home/users/p01532/swift/demo/svn/bin/avg.sh
+
+cray random5 random5.sh
+cray average avg.sh
Modified: demo/cray/swift-1.0/part08/cf
===================================================================
--- demo/cray/swift-1.0/part08/cf 2013-04-17 19:52:32 UTC (rev 6470)
+++ demo/cray/swift-1.0/part08/cf 2013-04-18 00:13:29 UTC (rev 6471)
@@ -1,4 +1,11 @@
-user.home=/lustre/beagle/wilde
+#sites.file=${swift.home}/etc/sites.xml
+#tc.file=${swift.home}/etc/tc.data
+
+sites.file=./raven.xml
+tc.file=./apps
+
+#user.home=/lustre/beagle/wilde
+
wrapperlog.always.transfer=true
sitedir.keep=true
execution.retries=0
Deleted: demo/cray/swift-1.0/part08/dm
===================================================================
--- demo/cray/swift-1.0/part08/dm 2013-04-17 19:52:32 UTC (rev 6470)
+++ demo/cray/swift-1.0/part08/dm 2013-04-18 00:13:29 UTC (rev 6471)
@@ -1,4 +0,0 @@
-#rule .*/data.* DIRECT /lustre/beagle/wilde/swift/demo/cray/svn/part08
-
-rule .*data/.* DIRECT /home/users/p01532/swift/demo/svn/part08
-
Copied: demo/cray/swift-1.0/part08/dmrules (from rev 6464, demo/cray/swift-1.0/part08/dm)
===================================================================
--- demo/cray/swift-1.0/part08/dmrules (rev 0)
+++ demo/cray/swift-1.0/part08/dmrules 2013-04-18 00:13:29 UTC (rev 6471)
@@ -0,0 +1,4 @@
+#rule .*/data.* DIRECT /lustre/beagle/wilde/swift/demo/cray/svn/part08
+
+rule .*data/.* DIRECT /home/users/p01532/swift/demo/svn/part08
+
Modified: demo/cray/swift-1.0/part08/raven.xml
===================================================================
--- demo/cray/swift-1.0/part08/raven.xml 2013-04-17 19:52:32 UTC (rev 6470)
+++ demo/cray/swift-1.0/part08/raven.xml 2013-04-18 00:13:29 UTC (rev 6471)
@@ -3,7 +3,7 @@
<pool handle="localhost">
<execution provider="local"/>
<filesystem provider="local"/>
- <workdirectory>/home/users/{env.USER}/swiftwork</workdirectory>
+ <workdirectory>{env.PWD}/swiftwork</workdirectory>
</pool>
<pool handle="cray">
@@ -18,15 +18,17 @@
<profile namespace="globus" key="jobsPerNode">32</profile>
<profile namespace="globus" key="maxTime">1800</profile>
- <profile namespace="globus" key="slots">6</profile>
- <profile namespace="globus" key="nodeGranularity">4</profile>
- <profile namespace="globus" key="maxNodes">4</profile>
+ <profile namespace="globus" key="slots">1</profile>
+ <profile namespace="globus" key="nodeGranularity">1</profile>
+ <profile namespace="globus" key="maxNodes">1</profile>
<profile namespace="karajan" key="jobThrottle">6.00</profile>
<profile namespace="karajan" key="initialScore">10000</profile>
+ <profile namespace="env" key="PATHPREFIX">{env.PATHPREFIX}</profile>
+
<filesystem provider="local"/>
- <workdirectory>/home/users/{env.USER}/swiftwork</workdirectory>
+ <workdirectory>{env.PWD}/swiftwork</workdirectory>
</pool>
Modified: demo/cray/swift-1.0/part08/ravenps.xml
===================================================================
--- demo/cray/swift-1.0/part08/ravenps.xml 2013-04-17 19:52:32 UTC (rev 6470)
+++ demo/cray/swift-1.0/part08/ravenps.xml 2013-04-18 00:13:29 UTC (rev 6471)
@@ -3,7 +3,7 @@
<pool handle="localhost">
<execution provider="local"/>
<filesystem provider="local"/>
- <workdirectory>/home/users/{env.USER}/swiftwork</workdirectory>
+ <workdirectory>{env.PWD}/swiftwork</workdirectory>
</pool>
<pool handle="cray">
@@ -18,13 +18,15 @@
<profile namespace="globus" key="jobsPerNode">32</profile>
<profile namespace="globus" key="maxTime">1800</profile>
- <profile namespace="globus" key="slots">6</profile>
- <profile namespace="globus" key="nodeGranularity">4</profile>
- <profile namespace="globus" key="maxNodes">4</profile>
+ <profile namespace="globus" key="slots">1</profile>
+ <profile namespace="globus" key="nodeGranularity">1</profile>
+ <profile namespace="globus" key="maxNodes">1</profile>
<profile namespace="karajan" key="jobThrottle">6.00</profile>
<profile namespace="karajan" key="initialScore">10000</profile>
+ <profile namespace="env" key="PATHPREFIX">{env.PATHPREFIX}</profile>
+
<filesystem provider="local"/>
<workdirectory>/dev/shm/{env.USER}/swiftwork</workdirectory>
Deleted: demo/cray/swift-1.0/part08/tc
===================================================================
--- demo/cray/swift-1.0/part08/tc 2013-04-17 19:52:32 UTC (rev 6470)
+++ demo/cray/swift-1.0/part08/tc 2013-04-18 00:13:29 UTC (rev 6471)
@@ -1,6 +0,0 @@
-#cray random5 /lustre/beagle/wilde/swift/demo/cray/svn/bin/random5.sh
-#cray average /lustre/beagle/wilde/swift/demo/cray/svn/bin/avg.sh
-
-cray random5 /home/users/p01532/swift/demo/svn/bin/random5.sh
-cray average /home/users/p01532/swift/demo/svn/bin/avg.sh
-
Modified: demo/cray/swift-1.0/setup.sh
===================================================================
--- demo/cray/swift-1.0/setup.sh 2013-04-17 19:52:32 UTC (rev 6470)
+++ demo/cray/swift-1.0/setup.sh 2013-04-18 00:13:29 UTC (rev 6471)
@@ -1,18 +1,20 @@
-module load swift
+# module load java # to get Oracle/Sun JDK
+# module load swift
-export SBATCH_RESERVATION=swift
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+# export SBATCH_RESERVATION=swift
-echo Adding $DIR/bin to PATH:
+export PATHPREFIX="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../bin" && pwd )"
+echo Set PATHPREFIX=$PATHPREFIX
-PATH=$DIR/bin:$PATH
+PATH=/home/users/p01532/swift/rev/0.94/bin:$PATHPREFIX:$PATH
-echo $PATH
+return
mkdir -p $HOME/.swift
+
if [ -f $HOME/.swift/swift.properties ]; then
echo Adding properties to end of $HOME/.swift/swift.properties
else
More information about the Swift-commit
mailing list