\frame{ \frametitle{}
 \hspace{1em}
 \begin{centering}
 \hspace{-1cm}\includegraphics[height=3cm]{cactuslogo_structure_justone}\\
 \Huge Cactus Structure\\
 \end{centering}
}
\frame{ \frametitle{}
 \hspace{1em}
 \begin{centering}
 \hspace{-1cm}\includegraphics[height=3cm]{cactuslogo_structure}\\
 \Huge Cactus Structure\\
 \end{centering}
}

\frame { \frametitle{Framework - no prebuild executable}
 Cactus
 \begin{itemize}
  \item does not provide executable files
  \item provides infrastructure to create executables
 \end{itemize}
 Why?
 \begin{itemize}
  \item Problemspecific code not part of Cactus
  \item System libraries different on different systems
  \item Cactus is free software, but often problemspecific codes are not
        $\rightarrow$ non-distributable binary
 \end{itemize}
}

\frame { \frametitle{Structure Overview}
               \abspic{cactuslogo_structure_flesh}{  0.12 }{0.01}{0.14}
  \onslide<2->{\abspic{cactuslogo_structure_thorns}{ 0.36 }{0.01}{0.14}}
  Two fundamental parts:
  \begin{itemize}
    \item<1-> The Flesh
      \begin{itemize}
        \item The core part of Cactus
        \item Independent of other parts of Cactus
        \item Acts as utility and service library
      \end{itemize}\vspace{1em}
    \item<2-> The Thorns
      \begin{itemize}
        \item Separate libraries (modules) which encapsulate the implementation
              of some functionality
        \item Can specify dependencies on other implementations
      \end{itemize}
  \end{itemize}
}

\frame { \frametitle{Application View}
The structure of an application that is built upon the Cactus computational framework
\begin{figure}
\vspace{0.0cm}
\hspace{0.0cm}
\centering
\includegraphics[height=0.5\textwidth]{cactus_appview}
\end{figure}
}

\frame[containsverbatim] { \frametitle{Download 'GetComponents'}
  \begin{centering}\includegraphics[width=11cm]{screenshots/cactus_download}\\\end{centering}
  \verb|http://www.cactuscode.org/download/GetComponents|
}

\frame[containsverbatim] { \frametitle{Download Thornlist}
  \begin{centering}\includegraphics[width=11cm]{screenshots/thornlist_download}\\\end{centering}
  \verb|http://www.cactuscode.org/download/thorns/|
}

\frame[containsverbatim] { \frametitle{Download basic Cactus configuration}
  \verb|./GetComponents <thornlist file>|\\
  \centering\begin{minipage}{0.7\linewidth}\tiny
\begin{verbatim}
$ wget http://www.cactuscode.org/download/thorns/computationalToolkit.th
$ GetComponents -a computationalToolkit_new.th 
-----------------------------------------------------------------
  Checking out module: Cactus
      from repository: :pserver:cvs_anon:anon@cvs.cactuscode.org/cactusdevcvs
                 into: Cactus
                   as: .
-----------------------------------------------------------------
  Checking out module: CactusBase/Boundary
      from repository: :pserver:cvs_anon:anon@cvs.cactuscode.org/cactusdevcvs
                 into: Cactus/arrangements
-----------------------------------------------------------------
  Checking out module: CactusBase/CoordBase
      from repository: :pserver:cvs_anon:anon@cvs.cactuscode.org/cactusdevcvs
                 into: Cactus/arrangements
-----------------------------------------------------------------
  Checking out module: CactusBase/CartGrid3D
      from repository: :pserver:cvs_anon:anon@cvs.cactuscode.org/cactusdevcvs
                 into: Cactus/arrangements
-----------------------------------------------------------------
...
-----------------------------------------------------------------
  33 components checked out successfully.
  0 components updated successfully.

  Time Elapsed: 0 minutes, 32 seconds
\end{verbatim}
\end{minipage}\\
}

\frame[containsverbatim] { \frametitle{Thornlists}
 \begin{itemize}
  \item List of thorn names
  \item Corresponding download methods and locations (optional)
  \item Supported download methods:
   \begin{itemize}
    \item CVS / Subversion / Git / Mercurial
    \item http / https / ftp
%    \item Ignore
   \end{itemize}
   \item Example:
 \end{itemize}
 \centering\begin{minipage}{0.5\linewidth}\tiny
\begin{verbatim}
 !CRL_VERSION = 1.0

 # Cactus Flesh
 !TARGET   = $ROOT
 !TYPE     = svn
 !URL      = http://svn.cactuscode.org/flesh/trunk
 !CHECKOUT = Cactus
 !NAME     = .

 # Cactus thorns
 !TARGET   = Cactus/arrangements
 !TYPE     = svn
 !URL      = http://svn.cactuscode.org/arrangements/$1/$2/trunk
 !CHECKOUT = 
 CactusBase/Boundary
 CactusBase/CartGrid3D
 CactusBase/CoordBase
 CactusBase/IOASCII
 CactusBase/IOBasic
\end{verbatim}
\end{minipage}\\
}

\frame[containsverbatim] { \frametitle{Cactus directory structure}
\centering\begin{minipage}{0.4\linewidth}\small
\begin{alltt}
.
`-- Cactus
    |-- CONTRIBUTORS
    |-- COPYRIGHT
    |-- Makefile
    |-- arrangements
    |   `-- CactusBase
    |       |--Boundary
    |       |--CartGrid3D
    |       |--CoordBase
    |       |--IOASCII
    |       `--IOBasic
    |-- doc
    |-- lib
    `-- src
\end{alltt}
\end{minipage}\\
}

\frame[containsverbatim] { \frametitle{Configuring Cactus}
\begin{itemize}
 \item Cactus knows about a lot of default system configurations
 \item However: often system specific configuration needed
 \item Example config file:\tiny
\begin{verbatim}
CC  = /usr/local/compilers/intel_cce_11.0.074.x86_64/bin/intel64/icc
CXX = /usr/local/compilers/intel_cce_11.0.074.x86_64/bin/intel64/icpc
F77 = /usr/local/compilers/intel_fce_11.0.074.x86_64/bin/intel64/ifort
F90 = /usr/local/compilers/intel_fce_11.0.074.x86_64/bin/intel64/ifort

CPPFLAGS = -openmp -DMPICH_IGNORE_CXX_SEEK
FPPFLAGS = -fopenmp -traditional
CFLAGS   = -openmp -g -debug all -align -std=c99 -U__STRICT_ANSI__
CXXFLAGS = -openmp -g -debug all -align -std=c++0x -restrict -D__builtin_isnan=::isnan
F77FLAGS = -openmp -g -debug all -align -pad -traceback -w95 -cm
F90FLAGS = -openmp -g -debug all -align -pad -traceback -w95 -cm

DEBUG          = yes
OPTIMISE       = yes
WARN           = yes

MPI       = MPICH
MPICH_DIR = /usr/local/packages/numrel/mpich-1.2.7p1

HDF5     = yes
HDF5_DIR = /usr/local/packages/numrel/hdf5-1.8.0
\end{verbatim}
\end{itemize}
}


\frame[containsverbatim] { \frametitle{Creating a Configuration}
 \begin{itemize}
  \item Configurations consist of
   \begin{itemize}
    \item a particular list of thorns
    \item particular configuration options
    \end{itemize}
  \item Creating configuration:\\\small\verb|make <NAME>-config|\\
  \item New source tree:
   \begin{minipage}[t]{0.4\linewidth}\small
\begin{alltt}
`-- Cactus
    :
    |-- Makefile
    |-- arrangements ...
    |-- doc
    |-- lib
    |-- src
    `-- \textcolor{blue}{configs}
        `-- \textcolor{blue}{NAME}
\end{alltt}
\end{minipage}
\end{itemize}
}

\frame[containsverbatim] { \frametitle{Building and Running a Cactus binary}
 \begin{itemize}
  \item Building new configuration:\\\small\verb|make <NAME>|\\
  \item Executable in \verb|Cactus/exe| subdirectory
   \begin{minipage}[t]{0.7\linewidth}\small
\begin{alltt}
`-- Cactus
    :
    |-- doc
    |-- lib
    |-- src
    |-- configs ...
    `-- exe
        |-- \textcolor{blue}{cactus_HelloWorld}
        `-- \textcolor{blue}{cactus_wavetoy}
\end{alltt}
\end{minipage}
 \item Execute Syntax: \small\verb|<executable> [options] <parameter file>|\\
 \item Example: \small\verb|./exe/cactus_HelloWorld HelloWorld.par|\\
 \end{itemize}
}

\frame[containsverbatim] { \frametitle{The Simulation Factory}
 \abspic{factory}{0.1}{0.6}{0.3}
 \begin{itemize}
  \item Tool of choice for building and deploying Cactus simulations
  \item Supports many popular HPC machines such as
   \begin{itemize}
    \item LONI - eric, queenbee, zeke, painter, etc
    \item TeraGrid - abe, lincoln, ranger, kraken, etc
    \item LSU HPC - tezpur, philip
    \end{itemize}
  \item Provides many features
   \begin{itemize}
    \item Building multiple Cactus configurations
    \item Synchronizing Cactus source trees to many machines
    \item Remote login
    \item Submitting and managing Cactus jobs
   \end{itemize}
  \item Available via svn at: \tiny\verb|https://svn.cct.lsu.edu/repos/numrel/simfactory2/branches/ET_2011_10|
  \end{itemize}
}

\frame[containsverbatim] { \frametitle{The Simulation Factory - Building Cactus}
 \abspic{factory}{-0.1}{0.2}{0.15}
 \begin{itemize}
  \item The Simulation Factory lives in the \verb|simfactory| folder inside Cactus source tree
  \item First, create a simple user configuration
  \begin{itemize}
   \item \verb|./simfactory/bin/sim setup|
  \end{itemize}
  \item The Simulation Factory will determine correct machine configuration to use
  \item Creating a configuration and building the executable is one step
   \begin{itemize}
   \item \verb|./simfactory/bin/sim build <NAME>|
  \end{itemize}
  \item The compiled executable is in the same \verb|exe| folder.
  \end{itemize}
}

