# Revision of Swift help from Thu, 12/09/2010 - 12:22

Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.

# Getting Started

1. Make directories under $HOME for RLibrary and Rpackages and go there:  mkdir$HOME/{RLibrary,RPackages}
cd $HOME/RPackages  2. get the Swift package  wget http://www.ci.ucihcago.edu/~wilde/Swift_0.1.tar.gz R CMD INSTALL -l$HOME/RLibrary Swift_0.1.tar.gz

3. Export the path to this library
    export R_LIBS=$HOME/RLibrary SWIFT=$R_LIBS/swift
PATH=$PATH:$PATH-to-recent-Sun-Java-bin-directory

    java -version # to verify your Java, ideally JRE or JDK 1.6+

5. Start swift, leaving it hanging
    \$SWIFT/exec/start-swift &

6. Open R and verify the ability to load and run Swift
    R

require(Swift)
?Swift
basicSwiftTest()


Try the examples of swiftapply() and swiftLapply() in the Swift help page, and then try your own tests, including using OpenMx.

Also, the Swift/R/Swift.R file has an initial set of Swift tests. These are being reworked to put each test in a separate function, but scanning and trying these tests manually may give you some indications of how things work.

swiftLapply() should work just like the Snowfall equivalent sfApply().

OpenMx test BootstrapParallel.R works for me. We can soon I think allow swiftLapply() to cover any function, not just mxRun(). And I will implement the rest of the apply() family, sapply etc.

There are 3 styles of Swift server that should work for you: local, multiple hosts, and PBS cluster. I have tested the latter on Merlot.

To use one of the documented servers (ssh, pbsf) you need to set Swift to talk to that server by doing this option setting before running anything that calls swiftapply():

options(swift.server="pbsf") # or "local" or "ssh"