% /*@@ % @file RunningCactus.tex % @date 27 Jan 1999 % @author Tom Goodale, Gabrielle Allen, Gerd Lanferman % @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++}] C and C++ compiler. For example, the GNU compilers. These are available for most supported platforms. Platform specific compilers should also work. \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 ({\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. Supercomputering 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 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 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 Unix operating systems. Here we list all the machines we have compiled and verified Cactus on, including some architecture specific notes. \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 Intel Linux}] There is a free Linux F90 compiler available from {\tt http://www.psrv.com} -- the only free we know of. Single processor mode and {\tt MPICH}, {\tt LAM} supported. \item[{\bf Windows NT}] Compiles with Cygwin version B20, Digital Fortran Compiler and Microsoft Visual C++ compiler. Single processor mode and {\tt WMPI}, {\tt HPVM} supported. \end{Lentry} The following machines are only partially supported \begin{Lentry} \item[{\bf SP2}] \item[{\bf HP Exemplar}] \end{Lentry} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Checkout procedure} \label{sec:chpr} Cactus is distributed, extended, and maintained using the free CVS software. CVS allows many people to work on a large software project together without getting into a tangle. For the beginner, we summarize the basics in appendix \ref{sec:uscv}, please refer to this section for a short description of the CVS syntax. The space required for an installation depends on the arrangements and thorns used. The flesh on its own requires less than 5 MB. \begin{Lentry} \item[{\bf Login}] Prior to any CVS operation, you need to log into the Cactus repository. For an anonymous checkout, type:\\ {\tt cvs -d :pserver:cvs\_anon@cvs.cactuscode.org:/cactus login } You will be prompted for a password which is {\bf anon}. \item[{\bf Checkout}] To obtain a fresh copy of Cactus, move to a directory which does not contain a previously checked out version, and type {\t cvs -d :pserver:cvs\_anon@cvs.cactuscode.org:/cactus checkout Cactus } The CVS checkout procedure will create a directory called {\bf Cactus} and install the code inside this directory. From now on we will reference all directory names relative to {\bf Cactus}. \noindent If you want to compile Cactus with thorns, you now need to checkout separately the required arrangements (or {\it arrangements} into the {\bf arrangements} directory. To see the available Cactus arrangements and thorns type {\t cvs -d :pserver:cvs\_anon@cvs.cactuscode.org:/cactus checkout -s } To check out a arrangement or thorn type go to the arrangements directory, {\t cd arrangements}, and for a arrangement type {\t cvs checkout } or for just one thorn {\t cvs checkout } To simplify this procedure you may use {\t gmake checkout} in the Cactus home directory which provides menus to pick arrangements and thorns from. \item[{\bf Update}] to update an existing Cactus checkout (to patch in possible changes, etc.), do the following {\em within} the {\tt Cactus} directory. {\t cvs update } The update process will operate recusrively downwards from your current position within the Cactus tree. To update only on certain directories, change into these directories and issue the update command. \item{\bf CVS status}: to obtain a status report on the ``age'' of your Cactus or arrangement routines (from your current directory position downward), type {\t cvs status } \item[{\bf non-anonymous CVS}] if you have an account at the central repository ({\tt cvs.cactuscode.org}) and would like to perform any of the operation above {\em non-anonymously}, replace {\tt cvs\_anon} by your login name and provide the appropriate password during the CVS login process. Depending on your permissions, you may then make commits to Cactus or its arrangements. \item[{\bf Commits}] you need to perform a personalized login and have proper permissions to commit code to the repository. \end{Lentry} For more CVS commands on how to add files, etc. please refer to appendix \ref{sec:uscv}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \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 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. \end{itemize} Configurations are descibed 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. % \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 architecures 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 thorns 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 will display your compile {\tt ThornList}, and give you the chance to edit it before continuing. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Creating a configuration} \label{sec:coaco} At its simplest, this is done by {\tt gmake }. This will generate 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 two ways to pass options to the configuration process from the gmake command line. \begin{enumerate} \item{} Add the options to a configuration file and use, {\tt gmake -config options=} All available configuration options may be set in the file {\tt filename}, any which are not set will take a default value. The options file should contain lines of the form: {\tt