[Swift-commit] r6752 - SwiftTutorials/ATPESC_2013-08-06

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Mon Aug 5 12:50:19 CDT 2013


Author: wozniak
Date: 2013-08-05 12:50:19 -0500 (Mon, 05 Aug 2013)
New Revision: 6752

Modified:
   SwiftTutorials/ATPESC_2013-08-06/README
Log:
Swift/T initials...


Modified: SwiftTutorials/ATPESC_2013-08-06/README
===================================================================
--- SwiftTutorials/ATPESC_2013-08-06/README	2013-08-05 17:49:58 UTC (rev 6751)
+++ SwiftTutorials/ATPESC_2013-08-06/README	2013-08-05 17:50:19 UTC (rev 6752)
@@ -13,7 +13,7 @@
 $ svn co https://svn.ci.uchicago.edu/svn/vdl2/SwiftTutorials/ATPESC_2013-08-06
 -----
 
-This will create a directory called ATPESC_2013-08-06 which contains all of the 
+This will create a directory called ATPESC_2013-08-06 which contains all of the
 scripts mentioned in this document.
 
 Run setup
@@ -31,7 +31,7 @@
 
 Mock "science applications" for the workflow tutorial
 -----------------------------------------------------
-There are two shell scripts included that serve a very simple stand-ins for science application: 
+There are two shell scripts included that serve a very simple stand-ins for science application:
 simulation.sh and stats.sh
 
 simulation.sh
@@ -42,7 +42,7 @@
 [options="header"]
 |=======================
 |Argument number|Description
-|1    |runtime. Set how long simulation.sh should run, in seconds.   
+|1    |runtime. Set how long simulation.sh should run, in seconds.
 |2    |range. Limit random numbers to the range [0,range-1]
 |3    |biasfile. Adds the integer contained in this file to each random number generated.
 |4    |scale. Multiplies each random number by this integer argument.
@@ -52,7 +52,7 @@
 With no arguments, simulate.sh prints 1 number in the range of 1-100. Otherwise it generates n numbers of the form R * scale + bias.
 
 -----
-$ ./simulate.sh 
+$ ./simulate.sh
 96
 -----
 
@@ -61,19 +61,19 @@
 The stats.sh script reads a file containing n numbers and prints the average
 of those numbers to stdout.
 
-Introductory exercises 
+Introductory exercises
 ----------------------
 Parts 1-6 (p1.swift - p6.swift) run locally and serve as examples of the Swift language.
 Parts 7-9 (p7.swift - p9.swift) submit jobs via Cobalt to the Tukey data analysis and visualization cluster.
 
 p1 - Run an application under Swift
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The first swift script, p1.swift, runs simulate.sh to generate a single random 
+The first swift script, p1.swift, runs simulate.sh to generate a single random
 number. It writes the number to a file.
 
 image:p1.png[]
 
-.p1.swift 
+.p1.swift
 -----
 type file;
 
@@ -93,8 +93,8 @@
 
 The simulate application gets translated to simulate.sh within the 'apps' file.
 
-NOTE: Since the file you created is not named, swift will generate a random 
-name for the file in a directory called _concurrent. To view the created 
+NOTE: Since the file you created is not named, swift will generate a random
+name for the file in a directory called _concurrent. To view the created
 output, run "cat _concurrent/*"
 
 To cleanup the directory and remove all outputs, run:
@@ -104,7 +104,7 @@
 
 p2 - Mapping (naming) output files
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The second swift script shows an example of naming the file. The output is now 
+The second swift script shows an example of naming the file. The output is now
 in a file called sim.out.
 
 image:p2.png[]
@@ -130,8 +130,8 @@
 
 p3 - Parallel loops with foreach
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The p3.swift script introduces the foreach loop. This script runs many 
-simulations. Output files are named here by Swift and will get created 
+The p3.swift script introduces the foreach loop. This script runs many
+simulations. Output files are named here by Swift and will get created
 in the _concurrent directory.
 
 image:p3.png[]
@@ -226,10 +226,10 @@
 
 p6 - Sending arguments to applications
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-p6.swift introduces command line arguments. The script sets a variable called 
-"steps" here, which determines the length of time that the simulation.sh 
+p6.swift introduces command line arguments. The script sets a variable called
+"steps" here, which determines the length of time that the simulation.sh
 will run for. It also defines a variable called nsim, which determines the
-number of simulations to run. 
+number of simulations to run.
 
 image:p6.png[]
 
@@ -503,5 +503,23 @@
 Running Swift/T on Vesta with Python and R integration
 ------------------------------------------------------
 
+Normally it is difficult to run scripted programs such as Python and
+R on the Blue Gene/Q because of the limited OS environment.  However,
+Swift/T allows you to create a composite application that is linked
+into one Cobalt job at run time.  Thus, you can write a scripted
+program that coordinates calls from Swift to C, C++, Fortran, Python,
+R, or Tcl.  All data movement is handled by the Swift/T runtime over
+MPI, removing the overhead of file access.
+
+=== p11 - Scripted parallel numerics with Python and R
+
+As shown on the slides, this example calls the
+http://www.numpy.org[Numpy] numerical libraries via Python as well as
+the http://www.r-project.org[R language] for statistics.  In this
+example, we use Numpy to construct matrices, perform matrix
+arithmetic, and compute determinants.  Since determinant is _O(n^3^)_,
+we compute each determinant in parallel using the Swift +foreach+
+loop.  All result are collected and passed to the R +max()+ function.
+
 Running MPI apps under Swift
 ----------------------------




More information about the Swift-commit mailing list