[Swift-commit] r6860 - in SwiftTutorials/CIC_2013-08-09: . OLD

wilde at ci.uchicago.edu wilde at ci.uchicago.edu
Thu Aug 15 11:16:53 CDT 2013


Author: wilde
Date: 2013-08-15 11:16:52 -0500 (Thu, 15 Aug 2013)
New Revision: 6860

Added:
   SwiftTutorials/CIC_2013-08-09/OLD/
   SwiftTutorials/CIC_2013-08-09/OLD/addlocal.sh
   SwiftTutorials/CIC_2013-08-09/OLD/catsn.swift
   SwiftTutorials/CIC_2013-08-09/OLD/setup.bak.sh
Log:
for cic

Added: SwiftTutorials/CIC_2013-08-09/OLD/addlocal.sh
===================================================================
--- SwiftTutorials/CIC_2013-08-09/OLD/addlocal.sh	                        (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/OLD/addlocal.sh	2013-08-15 16:16:52 UTC (rev 6860)
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+grep -v config sites.xml | ( 
+  echo "<config>"
+  cat
+  cat local.pool
+  echo "<config/>"
+)
+


Property changes on: SwiftTutorials/CIC_2013-08-09/OLD/addlocal.sh
___________________________________________________________________
Added: svn:executable
   + *

Copied: SwiftTutorials/CIC_2013-08-09/OLD/catsn.swift (from rev 6845, SwiftTutorials/CIC_2013-08-09/cloud/catsn.swift)
===================================================================
--- SwiftTutorials/CIC_2013-08-09/OLD/catsn.swift	                        (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/OLD/catsn.swift	2013-08-15 16:16:52 UTC (rev 6860)
@@ -0,0 +1,26 @@
+type file;
+
+// app declaration
+app (file o) cat (file i){
+  cat @i stdout=@o;
+}
+
+// input data
+file data<"data.txt">;
+
+/*  
+*  output data mapped to files with 
+*  prefix f and suffix .out in the outdir
+*  directory
+*/
+
+file out[]<simple_mapper; location="outdir", prefix="f.",suffix=".out">;
+
+/*
+* @arg means n could be specified as commandline argument
+* foreach loop executes 1 to n calls of cat in parallel
+*/
+foreach j in [1:@toInt(@arg("n","1"))] {
+  out[j] = cat(data);
+}
+

Copied: SwiftTutorials/CIC_2013-08-09/OLD/setup.bak.sh (from rev 6845, SwiftTutorials/CIC_2013-08-09/setup.bak.sh)
===================================================================
--- SwiftTutorials/CIC_2013-08-09/OLD/setup.bak.sh	                        (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/OLD/setup.bak.sh	2013-08-15 16:16:52 UTC (rev 6860)
@@ -0,0 +1,51 @@
+export SWIFT_HEAP_MAX=4G
+
+if which swift >& /dev/null; then
+  :
+else
+  echo "Trying to load swift module:"
+  module load swift
+  if which swift >& /dev/null; then
+    Swift loaded from module
+  else
+    echo "Cant find a swift to run"
+    return
+  fi
+fi
+
+echo -e "\\nUsing swift release from: \\c"
+which swift
+swift -version
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+echo Adding $DIR to PATH:
+PATH=$DIR:$PATH
+
+if [ -e $HOME/.swift ]; then
+  savedotswift=$(mktemp -d $HOME/.swift.save.XXXX)
+  echo Saving $HOME/.swift in $savedotswift
+  mv $HOME/.swift/* $savedotswift
+else
+  mkdir -p $HOME/.swift
+fi
+
+cat >>$HOME/.swift/swift.properties <<END
+
+# Properties for Swift Tutorial 
+
+sites.file=sites.xml
+tc.file=apps
+
+wrapperlog.always.transfer=true
+sitedir.keep=true
+file.gc.enabled=false
+status.mode=provider
+
+execution.retries=0
+lazy.errors=false
+
+use.wrapper.staging=false
+use.provider.staging=true
+provider.staging.pin.swiftfiles=true
+
+END




More information about the Swift-commit mailing list