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 AOP Simulation Software on Linux Computers

R. Soliday

Building and installing binary RPM files
Step 1
You can build your own SDDS and AOP RPMs using a simple script. The resulting RPMs will be specifiec to your version of Linux and/or MPI implementation.

Download the Build-AOP-RPMs script. Then run "chmod a+x Build-AOP-RPMs". It is recommented that you run this as "sudo ./Build-AOP-RPMs". It will install the needed system development software using yum or apt-get as root but run all the other commands as a normal user. You can also run this without the sudo command but you must first ensure that all the required development packages are already installed.

On Redhat Enterprise Linux these include: tcl wget subversion gzip tar make rpmdevtools rpm-build gcc gcc-c++ gcc-gfortran zlib-devel gd-devel libpng-devel libtiff-devel lapack-devel blas-devel gsl-devel openmotif-devel motif-devel libXaw-devel ncurses-devel readline-devel libXt-devel libXp-devel tcl-devel tk-devel tcsh python-devel tktable hdf5-devel

On Ubuntu these include: tcl wget subversion gzip tar make rpm alien gcc g++ gfortran zlib1g-dev libgd2-xpm-dev liblapack-dev libblas-dev libgsl0-dev libxaw7-dev libncurses5-dev libpng12-dev libxt-dev libxp-dev tcl-dev tk-dev tk-table csh python-dev libmotif-dev libtiff5-dev libreadline6-dev libhdf5-dev

If you are building Pelegant (the parallel version of elegant) you will also have to locate the directory containing mpicc on your system. The system versions of this are typically at /usr/bin/ or /usr/lib64/mpich2/bin/ or /usr/lib64/openmpi/bin/. You can also use your own custom version of mpicc.

When you run Build-AOP-RPMs, it will ask you which RPMs you would like to build. After you make your selections it will download the software and build the RPMs. They will end up in ~/rpmbuild/RPMS/x86_64/ or ~/rpmbuild/RPMS/i386/.

You can then install them using the 'rpm -Uvh' or 'alien -i' commands.

For your convenience, here are a few prebuild RPMs:

Redhat 6.5 64bit
SDDSToolKit-3.2-1.rhel.6.5.x86_64.rpm
SDDSEpicsToolKit-3.2-1.rhel.6.5.x86_64.rpm
OAGTclTk-1.21-1.rhel.6.5.x86_64.rpm
elegant-25.3.3-1.rhel.6.5.mpich2.x86_64.rpm
elegant-25.3.3-1.rhel.6.5.openmpi.x86_64.rpm
shower-1.12-1.rhel.6.5.x86_64.rpm
spiffe-4.3-1.rhel.6.5.x86_64.rpm
SDDSPython-3.2-1.rhel.6.5.x86_64.rpm
SDDSJava-3.0-1.rhel.6.5.x86_64.rpm

Redhat 5.10 64bit
SDDSToolKit-3.2-1.rhel.5.10.x86_64.rpm
SDDSEpicsToolKit-3.2-1.rhel.5.10.x86_64.rpm
OAGTclTk-1.21-1.rhel.5.10.x86_64.rpm
elegant-25.3.3-1.rhel.5.10.openmpi.x86_64.rpm
shower-1.12-1.rhel.5.10.x86_64.rpm
spiffe-4.3-1.rhel.5.10.x86_64.rpm
SDDSPython-3.2-1.rhel.5.10.x86_64.rpm
SDDSJava-3.0-1.rhel.5.10.x86_64.rpm

Fedora 20 64bit
SDDSToolKit-3.2-1.fedora.20.x86_64.rpm
SDDSEpicsToolKit-3.2-1.fedora.20.x86_64.rpm
OAGTclTk-1.21-1.fedora.20.x86_64.rpm
elegant-25.3.3-1.fedora.20.mpich.x86_64.rpm
elegant-25.3.3-1.fedora.20.openmpi.x86_64.rpm
shower-1.12-1.fedora.20.x86_64.rpm
spiffe-4.3-1.fedora.20.x86_64.rpm
SDDSPython-3.2-1.fedora.20.x86_64.rpm
SDDSJava-3.0-1.fedora.20.x86_64.rpm

Ubuntu 13.10 64bit
SDDSToolKit-3.2-1.ubuntu.13.10.x86_64.rpm
SDDSEpicsToolKit-3.2-1.ubuntu.13.10.x86_64.rpm
OAGTclTk-1.21-1.ubuntu.13.10.x86_64.rpm
elegant-25.3.3-1.ubuntu.13.10.mpich2.x86_64.rpm
elegant-25.3.3-1.ubuntu.13.10.openmpi.x86_64.rpm
shower-1.12-1.ubuntu.13.10.x86_64.rpm
spiffe-4.3-1.ubuntu.13.10.x86_64.rpm
SDDSPython-3.2-1.ubuntu.13.10.x86_64.rpm

Ubuntu 12.04 64bit
SDDSToolKit-3.2-1.ubuntu.12.04.x86_64.rpm
SDDSEpicsToolKit-3.2-1.ubuntu.12.04.x86_64.rpm
OAGTclTk-1.21-1.ubuntu.12.04.x86_64.rpm
elegant-25.3.3-1.ubuntu.12.04.mpich2.x86_64.rpm
elegant-25.3.3-1.ubuntu.12.04.openmpi.x86_64.rpm
shower-1.12-1.ubuntu.12.04.x86_64.rpm
spiffe-4.3-1.ubuntu.12.04.x86_64.rpm
SDDSPython-3.2-1.ubuntu.12.04.x86_64.rpm
SDDSJava-3.0-1.ubuntu.12.04.x86_64.rpm

Mint 16 64bit
SDDSToolKit-3.2-1.mint.16.x86_64.rpm
SDDSEpicsToolKit-3.2-1.mint.16.x86_64.rpm
OAGTclTk-1.21-1.mint.16.x86_64.rpm
elegant-25.3.3-1.mint.16.mpich2.x86_64.rpm
elegant-25.3.3-1.mint.16.openmpi.x86_64.rpm
shower-1.12-1.mint.16.x86_64.rpm
spiffe-4.3-1.mint.16.x86_64.rpm
SDDSPython-3.2-1.mint.16.x86_64.rpm
SDDSJava-3.0-1.mint.16.x86_64.rpm

Mageia 4 64bit
SDDSToolKit-3.2-1.mageia.4.x86_64.rpm
SDDSEpicsToolKit-3.2-1.mageia.4.x86_64.rpm
OAGTclTk-1.21-1.mageia.4.x86_64.rpm
elegant-25.3.3-1.mageia.4.openmpi.x86_64.rpm
shower-1.12-1.mageia.4.x86_64.rpm
spiffe-4.3-1.mageia.4.x86_64.rpm
SDDSPython-3.2-1.mageia.4.x86_64.rpm
SDDSJava-3.0-1.mageia.4.x86_64.rpm

Other RPMs
clinchor-1.0-1.i386.rpm 32bit
clinchor-1.0-1.x86_64.rpm 64bit
EpicsExtensions-3.14.11-1.i386.rpm 32bit
EpicsExtensions-3.14.11-1.x86_64.rpm 64bit



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.

Step 2
Install or upgrade the SDDS software. For a list of the installed files you can use the 'rpm -qpl' command.
A. Review Installed Files:
   rpm -qpl (package).x86_64.rpm

B. Installations and Upgrades:
   For Fedora and RedHat systems run:
   rpm -Uvh (package).x86_64.rpm

   For Ubuntu systems run:
   alien -i (package).x86_64.rpm

Step 3
Download defns.rpn and save as ~/.defns.rpn
Add the following to your .login file:
setenv RPN_DEFNS ~/.defns.rpn

Step 4
If you are using the OAGTclTk software, you will need to set your HOST_ARCH and EPICS_HOST_ARCH environment variables.

For 64 bit machines it would look like:
setenv HOST_ARCH linux-x86_64
setenv EPICS_HOST_ARCH linux-x86_64
or
export HOST_ARCH=linux-x86_64
export EPICS_HOST_ARCH=linux-x86_64

For 32 bit machines it would look like:
setenv HOST_ARCH linux-x86
setenv EPICS_HOST_ARCH linux-x86
or
export HOST_ARCH=linux-x86
export EPICS_HOST_ARCH=linux-x86

The address given should be an IOC or a gateway for a group of IOCs.



Compiling the source code
Step 1
If you are using a 32 bit Intel or AMD based machine then add the following to your .login file:
set path = ( ~/epics/base/bin/linux-x86 ~/epics/extensions/bin/linux-x86 ~/oag/apps/bin/linux-x86 $path )
setenv HOST_ARCH linux-x86
setenv EPICS_HOST_ARCH linux-x86
setenv RPN_DEFNS ~/.defns.rpn

If you are using a 64 bit Intel or AMD based machine then add the following to your .login file:
set path = ( ~/epics/base/bin/linux-x86 ~/epics/extensions/bin/linux-x86 ~/oag/apps/bin/linux-x86_64 $path )
setenv HOST_ARCH linux-x86_64
setenv EPICS_HOST_ARCH linux-x86_64
setenv RPN_DEFNS ~/.defns.rpn

If you are using an PPC based machine then add the following to your .login file:
set path = ( ~/epics/base/bin/linux-ppc ~/epics/extensions/bin/linux-ppc ~/oag/apps/bin/linux-ppc $path )
setenv HOST_ARCH linux-ppc
setenv EPICS_HOST_ARCH linux-ppc
setenv RPN_DEFNS ~/.defns.rpn

Step 2
If epics/base is already installed on your computer skip to step 3.

If you do not use EPICS follow these instructions:
Download the EPICS Base configure files. Unpack this to create epics/base/configure. Go to the epics/base directory and type make.

If you use EPICS follow these instructions:
Go to http://www.aps.anl.gov/epics/download/index.php. Here you will find information on downloading epics/base. For the purposes of this manual we will be using version R3.14.9 but you should probably always use the latest version. Create your epics directory then move R3.14.9.tar.gz into epics. Now you can uncompress it here to create epics/base. Next edit the file epics/base/configure/CONFIG and add:
CROSS_COMPILER_TARGET_ARCHS=
SHARED_LIBRARIES=NO
Next go to the epics/base directory and type make. This should take 5 to 10 minutes if there aren't any problems.

Step 3
Download and uncompress the following OAG source code:
If a local version of epics/base is installed I recommend uncompressing the files from the top directory that contains epics.
   REQUIRED
A. Configuration files for EPICS build system
     (epics.extensions.config.tar.gz)
B. SDDS Source
     (SDDS.1.31.tar.gz)
C. defns.rpn ( save as ~/.defns.rpn )

   OPTIONAL
D. SDDS Epics Source
     (SDDSepics.1.31.tar.gz)
E. Configuration files for elegant, spiffe, genesis, and shower
     (oag.apps.config.tar.gz)
F. Elegant
     (elegant.16.0.tar.gz)
G. Spiffe
     (spiffe.3.2.tar.gz)
H. Shower
     (shower.1.4.tar.gz)

Step 4
You will have to edit epics/extensions/configure/RELEASE and change EPICS_BASE to the correct directory. You may also have to change RELEASE.linux-x86 or RELEASE.linux-ppc with the same change.

Additionally with the release of Fedora Core 5 the standard location of the OpenMotif libraries is no longer at /usr/X11R6/lib, instead it is at /usr/lib. To avoid problems you will have to edit epics/extensions/configure/os/CONFIG_SITE.linux-x86.linux-x86 and change the X11_LIB, X11_INC, MOTIF_LIB, and MOTIF_INC values.

Next type make in the epics/extensions/configure directory.

Step 5
Change directory to epics/extensions/src/SDDS and type:
make

Step 6 - OPTIONAL STEPS FOR SDDS Epics Source
Change directory to epics/extensions/src/ezca and type make.
Change directory to epics/extensions/src/oagca and type make.
Change directory to epics/extensions/src/SDDSepics and type make.

Step 7 - OPTIONAL STEPS FOR Elegant, Spiffe, and Shower
You should now edit oag/apps/configure/RELEASE and oag/apps/configure/RELEASE_linux-x86 and set EPICS_BASE and EPICS_EXTENSIONS to the proper values.

Type make in the oag/apps/configure direcotry.

Change directory to oag/apps/src/physics and type make.
Change directory to oag/apps/src/elegant and type make.
Change directory to oag/apps/src/elegant/elegantTools and type make.
Change directory to oag/apps/src/elegant/sddsbrightness and type make.
Change directory to oag/apps/src/spiffe and type make.
Change directory to oag/apps/src/shower and type make.

Hopefully by following these steps the installation will not be too difficult. If you have problems please email me at soliday@aps.anl.gov