% /*@@ % @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}{1}{Installation and Running}{$RCSfile$}{$Revision$} \renewcommand{\thepage}{\Alph{part}\arabic{page}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Installation} \label{cha:in} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Required software} \label{sec:reqo} In general, Cactus {\em 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[{\tt 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 {\tt http://www.perl.org} \item[{\tt GNU make}] The make process works with the GNU make utility (referred to as {\bf gmake} henceforth). While other make utilities may also work, this is not guaranteed. Gmake can be obtained from your favorite GNU site or from {\tt www.gnu.org} \item[{\tt C}] C compiler. For example, the GNU compiler. This is available for most supported platforms. Platform specific compilers should also work. \item[{\tt CPP}] C Pre-processor. For example, the GNU CPP. These are normally provided on most platforms, and many C compilers have an option to just run as a preprocessor. \item[{\tt CVS}] The {\em ``Concurrent Versioning 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}.} ({\tt CactusPUGH/PUGH}) on multiple processors you also need: \begin{Lentry} \item[{\tt MPI}] the {\it Message Passing Interface (MPI)} which provides inter-processor communication. Supercomputing sites often supply a native {\tt MPI} implementation with which Cactus is very likely to be compatible. Otherwise there are various freely available ones available, e.g. the {\tt MPICH} version of {\tt MPI} is available for various architectures and operating systems at {\tt http://www-unix.mcs.anl.gov/mpi/}. \end{Lentry} \noindent If you are using any thorns containing routines written in {\tt C++} you also need \begin{Lentry} \item[{\tt 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 {\em 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 {\tt FORTRAN} you also need \begin{Lentry} \item[{\tt F90/F77}] For routines written in F77, either an F90 or an F77 compiler can be used. For routines written in F90 a F90 compiler is obviously required. There is a very limited set of free F90 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[{\tt ctags/etags}] The program Tags enables 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 vi both support this method. See \ref{sec:usta} 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} {\tt http://www.cactuscode.org/Documentation/Architectures.html}. \end{center} \begin{Lentry} \item[{\bf SGI}] 32 or 64 bit running Irix. \item[{\bf Cray T3E}] \item[{\bf Compaq Alpha}] Compaq operating system and Linux. Single processor mode and {\tt MPI} supported. The Alphas need to have the GNU {\tt C/C++} compilers installed. \item[\textbf{IA32}] running Linux or Windows 2000/NT. Single processor mode and MPI ({\tt MPICH} and {\tt LAM}) supported.\\On Windows Cactus compiles with Cygwin. MPI ({\tt WMPI}, {\tt HPVM}, and {\tt MPIPro}) supported. Please read doc/README.NT for details. \item[\textbf{IA64}] running Linux. \item[{\bf Macintosh PowerPC}] (MacOS X and Linux PPC) \item[{\bf IBM SP2}] 32 or 64 bit running AIX. \item[{\bf Hitachi SR8000-F1}] \item[{\bf Sun} Solaris] \item[{\bf Fujitsu}] \end{Lentry} %\begin{Lentry} %\item[{\bf SGI Origin 2000} running Irix] %\item[{\bf SGI} 32 or 64 bit running Irix] %\item[{\bf Cray T3E}] %\item[{\bf Dec Alpha}] Dec operating system and Linux. Single processor % mode and {\tt MPI} supported. The Decs need to have the GNU {\tt C/C++} % compilers installed %\item[{\bf Linux (ia32, ia64, ppc, alpha)}] There is a % free Linux F90 compiler available from {\tt http://www.psrv.com} % -- the only free we know of; please note the comment about installing this in %the FAQ. % Single processor mode and MPI ({\tt MPICH} and {\tt LAM}) supported. %\item[{\bf Windows NT}] Compiles with Cygwin. Single processor mode and MPI ({\t %t WMPI}, %{\tt HPVM}, and {\tt MPIPro}) supported. Please read doc/README.NT for details. %\item[{\bf Macintosh PowerPC (MacOS X)}] %\item[{\bf IBM SP2}] %\item[{\bf Hitachi SR8000-F1}] %\item[{\bf Sun Solaris}] %\end{Lentry} The following machines are only partially supported \begin{Lentry} \item[{\bf HP Exemplar}] \item[{\bf NEC SX-5}] \end{Lentry} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Checkout procedure} \label{sec:chpr} Cactus is distributed, extended, and maintained using the free CVS software ({\it Concurrent Versioning System}: {\tt 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 website for checking out the flesh and thorns. The Cactus website also provides a form interface for direct download. CVS experts who want to use raw CVS commands are directed to Appendix~\ref{sec:uscv} 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 thorns, {\tt GetCactus}, is available from the website at {\tt http://www.cactuscode.org/Download/GetCactus} The script takes as an argument the name of a file containing a {\it ThornList}, that is a list of thorns with the syntax {\tt \begin{verbatim} / \end{verbatim} } 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 website. The same script can be used to checkout additional thorns. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Directory structure} \label{sec:dist} A fresh checkout creates a directory {\tt Cactus} with the following subdirectories: \begin{Lentry} \item[{\tt CVS}] the CVS book-keeping directory, present in every subdirectory \item[{\tt doc}] Cactus documentation \item[{\tt lib}] contains libraries \item[{\tt src}] contains the source code for Cactus \item [{\tt 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 ({\tt 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 {\tt 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 {\tt scratch/cactus\_configs/} (where {\tt scratch/} is your scratch directory), and then either \begin{itemize} \item{} set the environment variable {\tt CACTUS\_CONFIGS\_DIR} to point to this directory \end{itemize} or \begin{itemize} \item{} soft link this directory ({\tt ln -s scratch/cactus\_configs Cactus/configs/}) to the Cactus directory, if your file-system supports soft-links. \end{itemize} Configurations are described in detail in section \ref{sec:coaco}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Getting help} \label{sec:gehe} For tracking problem reports and bugs we use GNATS, which is a bugtracking system published under the GNU license. We have set up a web interface at {\tt 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:usgn}. % 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 {\tt A web interface} % \item {\tt 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 {\tt Cactus/configs} directory. Here are several instances in which this can be useful: \begin{enumerate} \item{}Different configurations can be for {\em 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 {\em compiler options, debug-modes}. You might want to compile different communication protocols (e.g. {\tt MPI} or {\tt GLOBUS}) or leave them out all together. \item{} You can have different configurations for {\em different thorn collections} compiled into your executable. \end{enumerate} Once a configuration has been created, by {\tt gmake } as described in detail in the next section, a single call to {\tt gmake } will compile the code. The first time it generates a compile {\tt ThornList}, and gives you the chance to edit it before continuing. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Creating a configuration} \label{sec:coaco} At its simplest, this is done by {\tt gmake }\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 parantheses.} % . This generates a configuration with the name {\tt 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{} Create a file \texttt{\~{ }/.cactus/config}. All available configuration options may be set in the file {\tt \~{ }/.cactus/config}, any which are not set will take a default value. The file should contain lines of the form: {\tt