% /*@@ % @file Appendices.tex % @date 27 Jan 1999 % @author Tom Goodale, Gabrielle Allen, Gerd Lanferman % @desc % Appendices for the Cactus User's Guide % @enddesc % @version $Header$ % @@*/ \begin{cactuspart}{5}{Appendices}{$RCSfile$}{$Revision$} \renewcommand{\thepage}{\Alph{part}\arabic{page}} \chapter{Glossary} \begin{Lentry} \item[{\tt arrangement}] A collection of thorns. \item[{\tt autoconf}] A GNU program which builds a configuration script which can be used to make a Makefile \item[{\tt Cactus}] A green fleshy plant with lots of thorns, usually painful if touched. \item[{\tt CCTK}] Cactus Computational Tool Kit (The Cactus flesh and computational thorns). \item[{\tt CCL}] The {\tt Cactus Configuration Language}, this is the language that the thorn configuration files are written in. \item[{\tt configuration}] \item[{\tt checkout}] Get a copy of the code or thorns from CVS \item[{\tt checkpointing}] Save the entire state of a run to file so that it can be restarted at a later time \item[{\tt convergence}] \item[{\tt CVS}] The {\em "Concurrent Versioning System"} is the favoured distribution system for Cactus and can be downloaded from your favorite GNU site. \item[{\tt driver}] A thorn which creates and handles grid hierachies \item[{\tt flesh}] The routines which hold all the thorns together, this is what you get if you check out {\tt Cactus} from our CVS repository. \item[{\tt friend}] \item[{\tt GF}] Shorthand for a {\tt grid function} \item[{\tt gmake}] \item[{\tt ghostzone}] \item[{\tt grid function}] \item[{\tt grid hierarchy}] A computational grid, and the grid variables associated with it. \item[{\tt grid scalar}] \item[{\tt grid variable}] \item[{\tt GNATS}] The GNU program we use for reporting and tracking bugs, comments and suggestions. \item[{\tt HDF5}] Hierarchical Data Format version 5 \item[{\tt implementation}] \item[{\tt inherit}] \item[{\tt interpolation}] \item[{\tt MPI}] \item[{\tt parameter}] A variable which remains unchanged throughout the execution of a Cactus executable. Parameters all have default values which can be changed in a parameter file. \item[{\tt processor topology}] \item[{\tt PUGH}] The default parallel driver for Cactus which uses MPI. \item[{\tt PVM}] {\tt Parallel Virtual Machine}, provides interprocessor communication \item[{\tt reduction}] \item[{\tt TAGS}] \item[{\tt target}] \item[{\tt thorn}] A collection of subroutines with a definite interface and purpose. \item[{\tt WMPI}] Win32 Message Passing Interface \end{Lentry} \chapter{Configuration file syntax} \label{sec:cofisy} \section{General Concepts} \label{sec:geco} Each thorn is configured by three compulsory files in the top level thorn directory: \begin{itemize} \item{} {\tt interface.ccl} \item{} {\tt param.ccl} \item{} {\tt schedule.ccl} \end{itemize} These files are written in the {\it Cactus Configuration Language} which is case insensitive. \section{interface.ccl} \label{sec:in} The interface configuration file consists of \begin{itemize} \item a header block giving details of the thorns relationship with other thorns \item a series of blocks listing the thorn's global variables. \item details of other interactions with thorns: \begin{itemize} \item building include files \end{itemize} \end{itemize} The header block has the form: {\t \begin{verbatim} implements: [inherits: , ] [friend: , ] \end{verbatim} } where \begin{itemize} \item{} The implementation name must be unique among all thorns, except between thorns which have the same public and protected variables and global and restricted parameters. \item{} Inheriting from another implementation makes all that implementation's public variables available to your thorn. At least one thorn providing any inherited implementation must be present at compile time. A thorn cannot inherit from itself. Inheritance is associative and recursive, but not commutative. \item{} Being a friend of another implementation makes all that implementations protected variables available to your thorn. At least one thorn providing an implementation for each friend must be present at compile time. A thorn cannot be its own friend. Friendship is associative and commutative. Note that your thorn is also a friend of all your thorns friend's friends. \end{itemize} The thorn's variables are collected into groups. This is not only for convenience, but for collecting like variables together. Storage assignment, communication assignment and ghostzone synchronization takes place for groups only. The thorn's variables are defined by: {\t \begin{verbatim} [:] [TYPE=] [DIM=] [TIMELEVELS=] [SIZE=] [DISTRIB=] [GHOSTSIZE=] [STAGGER=] [{ [,] }] [""] \end{verbatim}} \begin{itemize} \item{} {\t access} defines which thorns can use the following groups of variables. {\t access} can be either {\t public}, {\t protected} or {\t private}. \item{} {\t data\_type} defines the data type of the variables in the group. Supported data types are {\t BOOLEAN}, {\t INTEGER}, {\t CHAR} and {\t REAL}. (In the future {\t COMPLEX} will also be supported.) \item{} {\t group\_name} must be a alpha-numeric name (which may also contain underscores) which is unique within the scope of the thorn. A group name is compulsory. \item{} {\t TYPE} designates the kind of variables held by the group. The choices are {\t GF}, {\t ARRAY} or {\t SCALAR}. This field is optional, with the default variable type being {\t SCALAR}. \item{} {\t DIM} defines the spatial dimension if the group is of type {\t ARRAY} or {\t GF}, and can take the value {\t 1}, {\t 2}, or {\t 3}. The default value is {\t DIM=3}. \item{} {\t TIMELEVELS} defines the number of timelevels a group has if the group is of type {\t ARRAY} or {\t GF}, and can take any positive value. \item{} {\t SIZE} defines the number grid-points an {\tt ARRAY} has in each direction. This should be a comma-separated list of positive integer constants or parameter names (optionally with an integer constant added/substracted to/from it). \item{} {\t DISTRIB} defines the processor decomposition of an {\tt ARRAY}. {\tt DISTRIB=CONSTANT} implies that {\tt SIZE} grid-points should be allocated on each processor. \item{} {\t GHOSTSIZE} defines number of ghost-zones in each dimension of an {\tt ARRAY}. \item{} {\t STAGGER} defines position of grid-points of a {\tt GF} with respect to the underlying grid. It consists of a string made up of a combination {\tt DIM} of the letters {\tt M}, {\tt C}, {\tt P} depending on whether the layout in that direction is on the {\tt M}inus face, {\tt C}entre, or {\tt P}lus face of the cell in that dimension. \item{} The block following the group declaration line contains a list of variables contained in the group. All variables in a group have the same data type, variable type and dimension. The list can be separated by spaces, commas, or new lines. The variable names must be unique within the scope of the thorn. A variable can only be a member of one group. The block must be delimited by brackets on new lines. If no block is given after a group declaration line, a variable with the same name as the group is created. \item{} An optional description of the group can be given on the last line, at the moment this description is not used for any purpose. \end{itemize} \section{param.ccl} \label{sec:pa} The parameter configuration file consists of a list of {\it parameter object specification items} (OSIs) giving the type and range of the parameter separated by optional {\it parameter data scoping items} (DSIs) which detail access to the parameter. \subsection{Parameter data scoping items} {\tt \begin{verbatim} : \end{verbatim} } The key word {\t access} designates that all parameter object specification items up to the next parameter data scoping item are in the same protection or scoping class. {\tt access} can take the values: \begin{Lentry} \item[{\tt global}] all thorns have access to global parameters \item[{\tt restricted}] other thorns can have access to these parameters if they specifically request it in their own param.ccl \item[{\tt private}] only your thorn has access to private parameters \item[{\tt shares}] in this case an {\t implementation} name must follow the colon. It declare that all the parameters in the following scoping block are restricted variables from the specified {\tt implementation}. \end{Lentry} \subsection{Parameter object specification items} \label{sec:paobspit} {\t \begin{verbatim} [EXTENDS|USES] "" { } \end{verbatim} } \begin{itemize} \item{} Allowed {\t parameter\_type}s are \begin{Lentry} \item[{\t INTEGER}] The specification of {\t parameter\_value}s takes the form of any number of comma-separated blocks of the form: {\t \begin{verbatim} [][:[][:[]]][::""] \end{verbatim} } Where an empty field, or a {\t *} in the place of {\tt low-range} or {\t high-range} indicates $-\infty$ and $\infty$ respectively. The default value for {\t step} is 1. A number by itself denotes that this number is the only acceptable value. \item[{\t REAL}] The range specification is the same as integers, except that here, no {\t step} implies a continuum of values. \item[{\t KEYWORD}] Each entry in the list of acceptable values for a keyword has the form {\t \begin{verbatim} "", "" :: "" \end{verbatim} } \item[{\t STRING}] Allowed values for strings should be specified using regular expressions. To allow any string, the regular expression ".*" should be used. \item[{\t BOOLEAN}] No {\t PARAMETER\_VALUES} should be specified for a boolean parameter. The default value for a boolean can be \begin{itemize} \item{} True: {\t 1}, {\t yes}, {\t y}, {\t t}, {\t true} \item{} False: {\t 0}, {\t no}, {\t n}, {\t f}, {\t false} \end{itemize} \end{Lentry} \item{} The {\t parameter name} must be unique within the scope of the thorn. \item{} A thorn can declare that it {\t EXTENDS} a parameter that it is a friend of. This allows it to declare additional acceptable values. By default it is acceptable for two thorns to declare the same value as acceptable. \end{itemize} \section{schedule.ccl} \label{sec:sc} The schedule configuration files consists of \begin{itemize} \item{} assignments to switch on storage and communications for array variables at the start of program execution. \item{} {\it schedule blocks} which schedule a subroutine from the thorn to be called at a specified time during program execution. Statements within the schedule block can be used to switch on storage and communication for groups of variables during the duration that the subroutine is called. \item{} Conditional statements \end{itemize} {\it assignments statements} have the form: {\t \begin{verbatim} [STORAGE: , ] [COMMUNICATION: , ] \end{verbatim} } Each {\it schedule block} in the file {\t schedule.ccl} must have the syntax: {\t \begin{verbatim} schedule [GROUP] AT|IN