[Swift-commit] r4125 - in SwiftApps/SwiftR/Swift: R exec

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Feb 21 15:06:15 CST 2011


Author: tga
Date: 2011-02-21 15:06:15 -0600 (Mon, 21 Feb 2011)
New Revision: 4125

Modified:
   SwiftApps/SwiftR/Swift/R/Workers.R
   SwiftApps/SwiftR/Swift/exec/start-swift
Log:
Added --trace option to trace start-swift


Modified: SwiftApps/SwiftR/Swift/R/Workers.R
===================================================================
--- SwiftApps/SwiftR/Swift/R/Workers.R	2011-02-21 20:55:41 UTC (rev 4124)
+++ SwiftApps/SwiftR/Swift/R/Workers.R	2011-02-21 21:06:15 UTC (rev 4125)
@@ -160,6 +160,8 @@
     if(!is.null(keepworkdir) && keepworkdir)
         cmdString <- paste(cmdString, "-k")
 
+    if (!is.null(getOption("swift.trace")) && getOption("swift.trace"))
+        cmdString <- paste(cmdString, "--trace")
 
     # launch asynchronously
     # for now, we will rely on the shell script's output to inform

Modified: SwiftApps/SwiftR/Swift/exec/start-swift
===================================================================
--- SwiftApps/SwiftR/Swift/exec/start-swift	2011-02-21 20:55:41 UTC (rev 4124)
+++ SwiftApps/SwiftR/Swift/exec/start-swift	2011-02-21 21:06:15 UTC (rev 4125)
@@ -1,7 +1,5 @@
 #! /bin/bash
 
-#set -x
-
 export TRAPEVENTS="EXIT 1 2 3 15"  # Signals and conditions to trap
 
 # Set the umask to prevent any access by other users:
@@ -412,6 +410,7 @@
    -t time     00:30:00    hh:mm:ss, for PBS, Cobalt and SGE only
    -w wkloglvl NONE        NONE, ERROR, WARN, INFO, DEBUG, TRACE
    -k keepdir              No argument, if flag is set, will keep working directory
+   --trace                 If provided, echo bash commands
 
     Examples:
 
@@ -470,6 +469,7 @@
     -t) time=$2; verify-not-null time $time; shift ;;
     -w) workerLogging=$2; verify-is-one-of workerLoggingLevel $workerLogging NONE ERROR WARN INFO DEBUG TRACE; shift ;;
     -k) keepdir=TRUE ;;
+    --trace) set -x ;;
     -d) workdir=$2; verify-not-null workdir $workdir; shift ;;
     *)  usage; exit 1 ;;
   esac




More information about the Swift-commit mailing list