Argonne National Laboratory

Accelerator Operations & Physics

Advance Photon Source
A U.S. Department of Energy, Office of Science,
Office of Basic Energy Sciences national synchrotron x-ray research facility

US Department of Energy
Argonne Home > Advanced Photon Source > Accelerator Systems Division > Accelerator Operations & Physics

Guide to Installing SDDS and OAG Simulation Software on Windows Computers

M. Borland, R. Soliday

Step 1 - Download the required files
A. Download OAG software:
   32bit
     SDDS Toolkit.msi REQUIRED
       Microsoft Visual C++ 2012 Redistributable Package REQUIRED if not already installed
     SDDS Epics Toolkit.msi optional (control system programs)
     Elegant.msi optional (accelerator simulation)
     Spiffe.msi optional (rf gun simulation)
     Shower.msi optional (electron-gamma shower simulation)
     Java SDDS.exe optional (editor for SDDS files)

   64bit
     SDDS Toolkit-x64.msi REQUIRED
       Microsoft Visual C++ 2012 Redistributable Package REQUIRED if not already installed
     SDDS Epics Toolkit-x64.msi optional (control system programs)
     Elegant-x64.msi optional (accelerator simulation)

B. Download OAG software manuals. This is optional, but provides a handy local copy of the manuals, particularly useful for laptop users who don't have an internet connection all the time.
     OAGManuals.exe

An easy introduction to SDDS is available in "Getting Started with SDDS," available as HTML, PDF, or postscript. You can also download sample data so you can work along with the examples in this document.

C. Download example simulation files: These are available from the manuals page, http://www.aps.anl.gov/Accelerator_Systems_Division/Accelerator_Operations_Physics/oagSoftware.shtml Look for the links in the sections for each of the programs that you are interested in. Save these files to disk. We'll unpack them below.

D. Download the CYGWIN UNIX shell, from http://www.cygwin.com. Download and execute the setup.exe. From the dialog box that appears, select "Install from Internet", and follow directions. If you do not already have ActiveTcl and OAGTclTk installed you may opt to install the Cygwin Tcl/Tk package. You can do this from the "Select Package" screen. Just search for tcltk.

E. If you are planning on using any Java software download the Java Runtime Environment, from http://java.sun.com/j2se/1.5.0/download.jsp

Step 2
Install the downloaded software. This will require rebooting your computer numerous times.

Step 3
Set up CYGWIN. Open a CYGWIN shell (Start > Programs > Cygnus Solutions > Cygwin Bash Shell) and type the following:
cd /c
mkdir bin
mkdir tmp
cd bin
ln -s C:/cygwin/bin/sh.exe sh.exe
ln -s C:/cygwin/bin/tclsh.exe tclsh.exe

Using the TAB key for automatic filename completion can make typing in long paths and filenames quicker. Next, create a .bashrc file in the toplevel on your C drive, with the following contents:
PATH="$PATH:.:/cygdrive/c/bin"

These steps will make it easier to set up and run your own sh and tclsh scripts. The .bashrc file can also be used for other customizations of the CYGWIN shell.

Step 4
Unpack the example files for the programs you are interested in. To do this, open a CYGWIN shell. For any files that have the .gz extension, use "gzip -d [filename]" to uncompress the file. Then, use the tar utility to unpack the library, e.g., "tar xvf elegantExamples.tar".

Once you've unpacked the files, cd to the directory and start looking around. There are usually "README" or "Notebook" files that guide you through the examples. Typically, you'll find one or more scripts that you can run to execute the example.