[Swift-commit] r3604 - SwiftApps/SwiftR/Swift/exec

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Sep 7 11:50:26 CDT 2010


Author: wilde
Date: 2010-09-07 11:50:26 -0500 (Tue, 07 Sep 2010)
New Revision: 3604

Modified:
   SwiftApps/SwiftR/Swift/exec/swiftapply.swift
Log:
Return stdout and stderr from R batch execution back to user.

Modified: SwiftApps/SwiftR/Swift/exec/swiftapply.swift
===================================================================
--- SwiftApps/SwiftR/Swift/exec/swiftapply.swift	2010-09-07 16:48:43 UTC (rev 3603)
+++ SwiftApps/SwiftR/Swift/exec/swiftapply.swift	2010-09-07 16:50:26 UTC (rev 3604)
@@ -1,13 +1,16 @@
+type file;
 type RFile;
 
-app (RFile result) RunR (RFile rcall)
+app (RFile result, file stout, file sterr) RunR (RFile rcall)
 {
-  RunR @rcall @result;
+  RunR @rcall @result stdout=@stout stderr=@sterr;
 }
 
 RFile rcalls[]  <simple_mapper; prefix="cbatch.", suffix=".Rdata", padding=0>;
 RFile results[] <simple_mapper; prefix="rbatch.", suffix=".Rdata", padding=0>;
+file  stout[]   <simple_mapper; prefix="stdout.", suffix=".txt", padding=0>;
+file  sterr[]   <simple_mapper; prefix="stderr.", suffix=".txt", padding=0>;
 
 foreach c, i in rcalls {
-  results[i] = RunR(c);
+  (results[i],stout[i], sterr[i]) = RunR(c);
 }




More information about the Swift-commit mailing list