[Swift-user] still having problems

Hodgess, Erin HodgessE at uhd.edu
Mon Jun 15 13:29:50 CDT 2009


I found a still simpler example and made it go.

Now back to perm.short.R

thanks,
erin


Erin M. Hodgess, PhD
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: hodgesse at uhd.edu



-----Original Message-----
From: Zhao Zhang [mailto:zhaozhang at uchicago.edu]
Sent: Mon 6/15/2009 12:01 PM
To: Hodgess, Erin
Cc: swift-user at ci.uchicago.edu
Subject: Re: [Swift-user] still having problems
 
Hi, Erin

Could you try to run it without swift? Without swift, what does the 
command look like if you invoke "RInvoke" under shell?
By your swift script, I am assuming RInvoke requires 2 input parameters, 
one for input file, the other one is a Integer parameter.
What does the output look like? does RInvoke write output to standard 
output, or write to a output file? How do we define the
output file name before we invoke the script?

zhao

Hodgess, Erin wrote:
>
> Hi again!
>
> I have brought things down to the bones here.  Still no luck.
>
> The files are /home/erin/R-2.9.0/bin/perm.short.R and 
> /home/erin/R-2.9.0/bin/perm4.swift
>
>
> [erin at tp-login2 bin]$ swift -tc.file tc.data perm4.swift
> Swift svn swift-r2950 cog-r2406
>
> RunID: 20090615-1137-nbfujhb2
> Progress:
> Progress:  Checking status:1
> Progress:  Stage in:1
> Execution failed:
>         Exception in RInvoke:
> Arguments: [perm.short.R, 0]
> Host: localhost
> Directory: perm4-20090615-1137-nbfujhb2/jobs/v/RInvoke-vti60bcj
> stderr.txt:
> stdout.txt:
> ----
>
> Caused by:
>         Exit code 1
> [erin at tp-login2 bin]$ cat perm4.swift
> type file{}
>
> (file procOut) permScript (file script, int batchSize){
>                 app{
>                         RInvoke @filename(script) batchSize ;
>                 }
>         }
>
>
>
>
>
>
>
>                 int batchSize=0;
>                         file script<"perm.short.R">;
>                         file procOut<"a.txt">;
>                         procOut=permScript(script, batchSize);
>
> [erin at tp-login2 bin]$ cat perm.short.R
>         # -- read data files that are hardcoded per analysis and get
>         vox_speech_vec <- as.matrix(read.table("origccf.txt"))
>         pm <- as.matrix(read.table("corr.perm.matrix.txt"))
>         allinputs <- Sys.getenv("R_SWIFT_ARGS")
>         print(allinputs)
>         permlength <-  as.numeric(noquote(strsplit(allinputs," 
> ")[[1]][1]))
> #       startrpermrow <- as.numeric(noquote(strsplit(allinputs," 
> ")[[1]][1]))
>         startrpermrow <- 1
>         endpermrow <- permlength + startrpermrow
>         debug = 1
>         if (debug == 1) {
>                 print(paste("start", startrpermrow, "end", endpermrow, 
> sep=","))
>         }
>          # rotate across specified rows in permutation matrix
>         for (rr in startrpermrow:endpermrow){
>                 permvec = pm[rr,]
>                 # initialize a 'ccf' matrix for each permutation
>                 ccf <- matrix(nrow=200, ncol=1)
>                 mat_row = 0
>                 for (vox in 1:200) {
>                         mat_row = mat_row + 1
>                         speechperm_ccf <- ccf(vox_speech_vec[vox,], 
> permvec, lag.max = 6, type = c("correlation"), na.action=na.pass, plot 
> = FALSE)
>                         if (any(speechperm_ccf$acf[1:13] == "NaN")) {
> #                               speechperm_ccf$acf[1:13] = 0
>                                 speechperm_ccf$acf[1:13] <- rep(0,13)
>                                 } else {
>                                 speechperm_ccf$acf[1:13] = 
> speechperm_ccf$acf[1:13]
>                         }
>                 speechperm_ccf <- 
> as.matrix(data.frame(speechperm_ccf$acf, speechperm_ccf$lag))[7:13,]
>                 speechperm_cor <- 
> speechperm_ccf[which.max(speechperm_ccf[,1]),]
>                 ccf[mat_row, ] <- c(speechperm_cor[[1]])
>                 }
>                 write.table (ccf, file=paste("a.txt",sep=""), 
> row.names=FALSE, col.names=FALSE)
>                 if (debug == 1) {
>                         print(paste("permrow finished", rr, sep=","))
>                         print(date())
>                 }
>                 rm(ccf)
>         }
> [erin at tp-login2 bin]$
>
> Any help appreciated.
>
>
>
>
> Erin M. Hodgess, PhD
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: hodgesse at uhd.edu
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Swift-user mailing list
> Swift-user at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-user
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20090615/28f5b584/attachment.html>


More information about the Swift-user mailing list