[Swift-commit] r7800 - in demo/xsede.2014.0425: . app part01m part02m part03m part04 src/c-ray src/md

wilde at ci.uchicago.edu wilde at ci.uchicago.edu
Thu Apr 24 16:13:51 CDT 2014


Author: wilde
Date: 2014-04-24 16:13:50 -0500 (Thu, 24 Apr 2014)
New Revision: 7800

Added:
   demo/xsede.2014.0425/part01m/
   demo/xsede.2014.0425/part01m/p1.swift
   demo/xsede.2014.0425/part01m/swift.properties
   demo/xsede.2014.0425/part02m/
   demo/xsede.2014.0425/part02m/p2.swift
   demo/xsede.2014.0425/part02m/swift.properties
   demo/xsede.2014.0425/part03m/
   demo/xsede.2014.0425/part03m/p3.swift
   demo/xsede.2014.0425/part03m/swift.properties
   demo/xsede.2014.0425/setup.midway.sh
Removed:
   demo/xsede.2014.0425/setup.sh
Modified:
   demo/xsede.2014.0425/app/stats
   demo/xsede.2014.0425/part04/swift.properties
   demo/xsede.2014.0425/src/c-ray/Makefile
   demo/xsede.2014.0425/src/md/Makefile
Log:
Provide md-based example for parts 1-3.

Modified: demo/xsede.2014.0425/app/stats
===================================================================
--- demo/xsede.2014.0425/app/stats	2014-04-24 20:38:11 UTC (rev 7799)
+++ demo/xsede.2014.0425/app/stats	2014-04-24 21:13:50 UTC (rev 7800)
@@ -12,8 +12,8 @@
 
 awk '
 
-{ sum += $1}
+{ sum += $4}
 
-END { printf("%d\n",sum/NR) }
+END { printf("%f\n",sum/NR) }
 ' $*
 log 1>&2

Added: demo/xsede.2014.0425/part01m/p1.swift
===================================================================
--- demo/xsede.2014.0425/part01m/p1.swift	                        (rev 0)
+++ demo/xsede.2014.0425/part01m/p1.swift	2014-04-24 21:13:50 UTC (rev 7800)
@@ -0,0 +1,9 @@
+type file;
+
+app (file o) simulation ()
+{
+  md 3 50 1000 stdout=filename(o);
+}
+
+file f <"sim.out">;
+f = simulation();

Added: demo/xsede.2014.0425/part01m/swift.properties
===================================================================
--- demo/xsede.2014.0425/part01m/swift.properties	                        (rev 0)
+++ demo/xsede.2014.0425/part01m/swift.properties	2014-04-24 21:13:50 UTC (rev 7800)
@@ -0,0 +1,3 @@
+site=local
+ticker.date.format=HH:mm:ss
+ticker.prefix= 

Added: demo/xsede.2014.0425/part02m/p2.swift
===================================================================
--- demo/xsede.2014.0425/part02m/p2.swift	                        (rev 0)
+++ demo/xsede.2014.0425/part02m/p2.swift	2014-04-24 21:13:50 UTC (rev 7800)
@@ -0,0 +1,11 @@
+type file;
+
+app (file o) simulation ()
+{
+  sh "-c" "md 3 50 1000 >/dev/null; cat md.dat" stdout=filename(o);
+}
+
+foreach i in [0:9] {
+  file f <single_file_mapper; file=strcat("output/sim_",i,".out")>;
+  f = simulation();
+}

Added: demo/xsede.2014.0425/part02m/swift.properties
===================================================================
--- demo/xsede.2014.0425/part02m/swift.properties	                        (rev 0)
+++ demo/xsede.2014.0425/part02m/swift.properties	2014-04-24 21:13:50 UTC (rev 7800)
@@ -0,0 +1,3 @@
+site=local
+ticker.date.format=HH:mm:ss
+ticker.prefix= 

Added: demo/xsede.2014.0425/part03m/p3.swift
===================================================================
--- demo/xsede.2014.0425/part03m/p3.swift	                        (rev 0)
+++ demo/xsede.2014.0425/part03m/p3.swift	2014-04-24 21:13:50 UTC (rev 7800)
@@ -0,0 +1,44 @@
+type file;
+
+/*
+    md nd np step_num print_step_num dt mass printinfo scale_factor scale_offset
+    where
+    * nd is the spatial dimension (2 or 3);
+    * np is the number of particles (500, for instance);
+    * step_num is the number of time steps (500, for instance);
+    * print_step_num is the number of snapshot prints (10 for instance);
+    * dt is size of timestep;
+    * mass is particle mass;
+    * printinfo is a string to append to each particle coord
+    * scale_offset and scale_factor are used to scale particle positions for logging/rendering (FIXME)
+
+    e.g.:
+
+    md 3 50 30000 50  .0001  .005  "0.03 1.0 0.2 0.05 50.0 0.1" 2.5 2.0
+*/
+
+app (file o) simulation (string npart, string steps, string mass)
+{
+  sh "-c" strjoin(["md","3",npart,steps,">/dev/null; cat md.dat"]," ") stdout=filename(o);
+}
+
+app (file o) analyze (file s[])
+{
+  mdstats filenames(s) stdout=filename(o);
+}
+
+int    nsim   = toInt(arg("nsim","10"));
+string npart  = arg("npart","50");
+string steps  = arg("steps","1000");
+string mass   = arg("mass",".0001");
+
+file sims[];
+
+foreach i in [0:nsim-1] {
+  file simout <single_file_mapper; file=strcat("output/sim_",i,".out")>;
+  simout = simulation(npart,steps,mass);
+  sims[i] = simout;
+}
+
+file stats<"output/average.out">;
+stats = analyze(sims);

Added: demo/xsede.2014.0425/part03m/swift.properties
===================================================================
--- demo/xsede.2014.0425/part03m/swift.properties	                        (rev 0)
+++ demo/xsede.2014.0425/part03m/swift.properties	2014-04-24 21:13:50 UTC (rev 7800)
@@ -0,0 +1,3 @@
+site=local
+ticker.date.format=HH:mm:ss
+ticker.prefix= 

Modified: demo/xsede.2014.0425/part04/swift.properties
===================================================================
--- demo/xsede.2014.0425/part04/swift.properties	2014-04-24 20:38:11 UTC (rev 7799)
+++ demo/xsede.2014.0425/part04/swift.properties	2014-04-24 21:13:50 UTC (rev 7800)
@@ -1,2 +1,2 @@
-site=westmere
+site=midway-westmere
 site.westmere.slurm.exclusive=false

Copied: demo/xsede.2014.0425/setup.midway.sh (from rev 7797, demo/xsede.2014.0425/setup.sh)
===================================================================
--- demo/xsede.2014.0425/setup.midway.sh	                        (rev 0)
+++ demo/xsede.2014.0425/setup.midway.sh	2014-04-24 21:13:50 UTC (rev 7800)
@@ -0,0 +1,8 @@
+# Load modules
+module unload swift
+module load swift/0.95-RC1
+echo Swift version is $(swift -version)
+
+# Add applications to $PATH
+TUTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+PATH=$TUTDIR/bin:$TUTDIR/app:$PATH

Deleted: demo/xsede.2014.0425/setup.sh
===================================================================
--- demo/xsede.2014.0425/setup.sh	2014-04-24 20:38:11 UTC (rev 7799)
+++ demo/xsede.2014.0425/setup.sh	2014-04-24 21:13:50 UTC (rev 7800)
@@ -1,8 +0,0 @@
-# Load modules
-module unload swift
-module load swift/0.95-RC1
-echo Swift version is $(swift -version)
-
-# Add applications to $PATH
-TUTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-PATH=$TUTDIR/bin:$TUTDIR/app:$PATH

Modified: demo/xsede.2014.0425/src/c-ray/Makefile
===================================================================
--- demo/xsede.2014.0425/src/c-ray/Makefile	2014-04-24 20:38:11 UTC (rev 7799)
+++ demo/xsede.2014.0425/src/c-ray/Makefile	2014-04-24 21:13:50 UTC (rev 7800)
@@ -16,8 +16,8 @@
 
 .PHONY: install
 install:
-	cp $(bin) /usr/local/bin/$(bin)
+	cp $(bin) ../../bin/$(bin)
 
 .PHONY: uninstall
 uninstall:
-	rm -f /usr/local/bin/$(bin)
+	rm -f ../../bin/$(bin)

Modified: demo/xsede.2014.0425/src/md/Makefile
===================================================================
--- demo/xsede.2014.0425/src/md/Makefile	2014-04-24 20:38:11 UTC (rev 7799)
+++ demo/xsede.2014.0425/src/md/Makefile	2014-04-24 21:13:50 UTC (rev 7800)
@@ -10,3 +10,10 @@
 clean:
 	rm -f $(obj) $(bin)
 
+.PHONY: install
+install:
+	cp $(bin) ../../bin/$(bin)
+
+.PHONY: uninstall
+uninstall:
+	rm -f ../../bin/$(bin)




More information about the Swift-commit mailing list