% /*@@ % @file RunningCactus.tex % @date 27 Jan 1999 % @author Tom Goodale, Gabrielle Allen, Gerd Lanferman, Thomas Radke % @desc % How to run Cactus part of the Cactus User's Guide % @enddesc % @version $Header$ % @@*/ \begin{cactuspart}{Installation and Running}{$RCSfile$}{$Revision$} \label{part:RunningCactus} \renewcommand{\thepage}{\Alph{part}\arabic{page}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Installation} \label{cha:in} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Required software} \label{sec:required_software} In general, Cactus \emph{requires} the following set of software to function in single processor mode. Please refer to the architecture section \ref{sec:suar} for architecture specific items. \begin{Lentry} \item[Perl5.0] Perl is used extensively during the Cactus thorn configuration phase. Perl is available for nearly all operating systems known to man and can be obtained at \url{http://www.perl.org} \item[GNU make] The make process works with the GNU make utility (referred to as \texttt{gmake} henceforth). While other make utilities may also work, this is not guaranteed. Gmake can be obtained from your favorite GNU site or from \url{http://www.gnu.org} \item[C] C compiler. For example, the GNU compiler. This is available for most supported platforms. Platform specific compilers should also work. \item[CPP] C Preprocessor. For example, the GNU \texttt{cpp}. These are normally provided on most platforms, and many C compilers have an option to just run as a preprocessor. \item[CVS] The \textit{Concurrent Versions System} is not needed to run/compile Cactus, but you are strongly encourage to install this software to take advantage of the update procedures. It can be downloaded from your favorite GNU site. Tar files of each release are also available. \end{Lentry} \noindent To use Cactus, with the default driver\footnote{For help with unfamiliar terms, please consult the glossary, Appendix \ref{sec:glossary}.} (\texttt{CactusPUGH/PUGH}) on multiple processors you also need: \begin{Lentry} \item[MPI] The \textit{Message Passing Interface} which provides inter-processor communication. Supercomputing sites often supply a native MPI implementation with which Cactus is very likely to be compatible. Otherwise there are various freely available ones available, e.g. the MPICH version of MPI is available for various architectures and operating systems at \url{http://www-unix.mcs.anl.gov/mpi/}. \end{Lentry} \noindent If you are using any thorns containing routines written in C++ you also need \begin{Lentry} \item[C++] C++ compiler. For example, the GNU compiler. This is available for most supported platforms. Platform specific compilers should also work. Note that if a C++ compiler is available then the \text{main()} routine in the Flesh is compiled with C++ to allow static class initialisations. \end{Lentry} \noindent If you are using any thorns containing routines written in Fortran you also need \begin{Lentry} \item[F90/F77] For routines written in Fortran 77, either an Fortran 90 or a Fortran 77 compiler can be used. For routines written in Fortran 90 a Fortran 90 compiler is obviously required. There is a very limited set of free Fortran 90 compilers available for the different architectures. \end{Lentry} \noindent While not required for compiling or running Cactus, for thorn development it is useful to install \begin{Lentry} \item[\texttt{ctags/etags}] These programs enable you browse through the calling structure of a program by help of a function call database. Navigating the Flesh and arrangements becomes very easy. Emacs and \texttt{vi} both support this method. See \ref{sec:Appendix.tags} for a short guide to tags. \end{Lentry} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Supported architectures} \label{sec:suar} Cactus runs on many machines, under a large number of operating systems. Here we list the machines we have compiled and verified Cactus on, including some architecture specific notes. A complete list of architectures supported by Cactus, along with more notes, can be found at \begin{center} \url{http://www.cactuscode.org/Documentation/Architectures.html}. \end{center} \begin{Lentry} \item[\textbf{SGI}] 32 or 64 bit running Irix. \item[\textbf{Cray T3E}] \item[\textbf{Compaq Alpha}] Compaq operating system and Linux. Single processor mode and MPI supported. The Alphas need to have the GNU C/C++ compilers installed. \item[\textbf{IA32}] running Linux, OpenBSD, FreeBSD, or Windows 2000/NT. Single processor mode and MPI (MPICH and LAM) supported.\\ On Windows Cactus compiles with Cygwin. MPI (WMPI, HPVM, and MPIPro) supported. Please read \texttt{doc/README.NT} for details. \item[\textbf{IA64}] running Linux. \item[\textbf{Macintosh PowerPC}] (MacOS X and Linux PPC) \item[\textbf{IBM SP2,SP3,SP4}] 32 or 64 bit running AIX. \item[\textbf{Hitachi SR8000-F1}] \item[\textbf{Sun} Solaris] \item[\textbf{Fujitsu}] \item[\textbf{NEC SX-5, SX-6}] \end{Lentry} The following machines are only partially supported \begin{Lentry} \item[\textbf{HP Exemplar}] \end{Lentry} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Checkout procedure} \label{sec:checkout} Cactus is distributed, extended, and maintained using the free CVS software (\textit{Concurrent Versions System}: \url{http://www.cvshome.org}). CVS allows many people to work on a large software project together without getting into a tangle. Since Cactus thorns are distributed from several repositories on the main CVS site, and from a growing number of user sites, we provide a script, described below, on our web site for checking out the Flesh and thorns. The Cactus web site also provides a form interface for direct download. CVS experts who want to use raw CVS commands are directed to Appendix~\ref{sec:Appendix.cvs} for full instructions. For CVS novices, we also summarize in this appendix basic CVS commands. The space required for an installation depends on the arrangements and thorns used. The Flesh on its own requires less than 5 MB. The script for checking out the Flesh and distribution thorns, \texttt{GetCactus}, is available from the web site at \url{http://www.cactuscode.org/download/GetCactus} The script takes as an argument the name of a file containing a \textit{ThornList}, that is a list of thorns with the syntax \begin{alltt} <\var{arrangement name}>/<\var{thorn name}> \end{alltt} If no filename is given, only the Flesh is checked out. Optional directives in the ThornList indicate which CVS repository to fetch thorns from. The default is to take the thorns from the same repository as the Flesh. A full description of ThornList syntax is provided in Appendix~\ref{chap:th}. ThornLists for example applications are provided on the Cactus web site. The same script can be used to checkout additional thorns. Another script, \texttt{MakeThornList}, can be used to produce a minimal ThornList from a given Cactus par file. It needs a \emph{master} ThornList to be copied into your \texttt{~\.cactus} directory. See \url{http://www.cactuscode.org/toolkit/makeThornList/}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Directory structure} \label{sec:dist} A fresh checkout creates a directory \texttt{Cactus} with the following subdirectories: \begin{Lentry} \item[\texttt{CVS}] the CVS bookkeeping directory, present in every subdirectory \item[\texttt{doc}] Cactus documentation \item[\texttt{lib}] contains libraries \item[\texttt{src}] contains the source code for Cactus \item [\texttt{arrangements}] contains the Cactus arrangements. The arrangements (the actual ``physics'') are not supplied by checking out just Cactus. If the arrangements you want to use are standard Cactus arrangements, or reside on our CVS repository (\texttt{cvs.cactuscode.org}), they can be checked out in similar way to the Flesh. \end{Lentry} When Cactus is first compiled it creates a new directory \texttt{Cactus/configs}, which will contain all the source code, object files and libraries created during the build process. Disk space may be a problem on supercomputers where home directories are small. A workaround is to first create a configs directory on scratch space, say \texttt{scratch/cactus\_configs/} (where \texttt{scratch/} is your scratch directory), and then either \begin{itemize} \item{} set the environment variable \texttt{CACTUS\_CONFIGS\_DIR} to point to this directory \end{itemize} or \begin{itemize} \item{} soft link this directory (\texttt{ln -s scratch/cactus\_configs Cactus/configs/}) to the Cactus directory, if your filesystem supports soft links. \end{itemize} Configurations are described in detail in section \ref{sec:configurations}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Getting help} \label{sec:gehe} For tracking problem reports and bugs we use GNATS, which is a bug tracking system published under the GNU license. We have set up a web interface at \url{http://www.cactuscode.org} which allows easy submission and browsing of problem reports. A description of the GNATS categories which we use is provided in the appendix \ref{sec:Appendix.gnats}. % OK, there is NO emacs at the moment, because the GNATS setup is really stupid % and sendpr handles like c.... besides the fact, that the user has to go % through a make process which installs stuff somewhere on his HD. gerd. % BUT, we could distribute our own, either copy cvsbug, or write a perl % version. Tom % \begin{itemize} % \item \texttt{A web interface} % \item \texttt{SendPR} % {FIXME: Mention the emacs thing here too...} % \end{itemize} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Compilation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Cactus can be built in different configurations from the same copy of the source files, and these different configurations coexist in the \texttt{Cactus/configs} directory. Here are several instances in which this can be useful: \begin{enumerate} \item{}Different configurations can be for \emph{different architectures}. You can keep executables for multiple architectures based on a single copy of source code, shared on a common file system. \item{} You can compare different \textit{compiler options, debug-modes}. You might want to compile different communication protocols (e.g. MPI or Globus) or leave them out all together. \item{} You can have different configurations for \textit{different thorn collections} compiled into your executable. \end{enumerate} Once a configuration has been created, by \texttt{gmake <\var{config}>} as described in detail in the next section, a single call to \texttt{gmake <\var{config}>} will compile the code. The first time it generates a compile \texttt{ThornList}, and gives you the chance to edit it before continuing. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Creating a configuration} \label{sec:configurations} At its simplest, this is done by \texttt{gmake <\var{config}>}\footnote % {A note on the Cactus make system --- if at any point it prompts you to enter something, the default value, which will be assumed if you simply press enter, is shown in parentheses.} % . This generates a configuration with the name \texttt{\var{config}}, doing its best to automatically determine the default compilers and compilation flags suitable for the current architecture. There are a number of additional command line arguments which may be supplied to override some parts of the procedure. \subsection{Configuration options} There are three ways to pass options to the configuration process. % from the gmake command line. \begin{enumerate} \item[1]{} Pass options individually in shell environment variables: {\tt export