\section{Configuring \pose{}}

\pose{} can be configured in two different ways.  Fundamental
behaviors are controlled by altering values in the {\tt
pose\_config.h} file in the \pose{} installation, and rebuilding
\pose{}.  Many of these configuration options can (and should) be
controlled by command line options.  These will be designated here by
an asterisk ($*$).  See section~\ref{sec:posecommand} for the command line
options.  

\begin{itemize}
\item {\tt {\bf POSE\_STATS\_ON $*$}}\\
	$\circ$ Turn on timing and statistics gathering for internal \pose{}
	operations.  Produces a small slowdown in program.\\
\item {\tt {\bf POSE\_DOP\_ON $*$}}\\
	$\circ$ Turn on timing and statistics gathering for degree of parallelism calculations.  Generates log files that can be loaded by ploticus scripts to produce graphs plotting active entities over time.  Slows down program dramatically.\\
\item {\tt {\bf POSE\_COMM\_ON}}\\
	$\circ$ Turn on streaming communication optimization for small message packing.\\
\item {\tt {\bf COMM\_TIMEOUT}}\\
	$\circ$ Used by streaming communication library. Time to wait (in ?) before sending buffered messages.\\
\item {\tt {\bf COMM\_MAXMSG}}\\
	$\circ$ Used by streaming communication library.  Number of messages to buffer before packing and sending as one.\\
\item {\tt {\bf LB\_ON $*$}}\\
	$\circ$ Turn on \pose{} load balancing.\\
\item {\tt {\bf STORE\_RATE $*$}}\\
	$\circ$ Default checkpointing rate: 1 for every {\tt STORE\_RATE} events.\\
\item {\tt {\bf SPEC\_WINDOW $*$}}\\
	$\circ$ Speculative window size: this is how far (in virtual time units) ahead of GVT posers are allowed to go.\\
\item {\tt {\bf MIN\_LEASH $*$}} and {\tt {\bf MAX\_LEASH $*$}}\\
	$\circ$ Bounds on the speculative window, these are adjusted by adaptive synchronization strategies.\\
\item {\tt {\bf LEASH\_FLEX $*$}}\\
	$\circ$ Granularity of flexibility when speculative window is shrunk or expanded.\\
\item {\tt {\bf MAX\_POOL\_SIZE}}\\
	$\circ$ Memory used by event messages is recycled.  This controls how many messages of a particular size will be kept on hand.
\item {\tt {\bf MAX\_RECYCLABLE}}\\
	$\circ$ This is the largest size of message that will be recycled.
\item {\tt {\bf LB\_SKIP $*$}}\\
	$\circ$ This controls the frequency of load balance invocation.  1 in every {\tt LB\_SKIP} executions of the GVT algorithm will invoke load balancing.
\item {\tt {\bf LB\_THRESHOLD $*$}}\\
	$\circ$ What the heck does this number mean?  I can't remember.  I'll have to look through the code... later.  Meanwhile, I think this indicates some sort of threshold a single processor has to cross before we even bother with analyzing the load.\\
\item {\tt {\bf LB\_DIFF $*$}}\\
	$\circ$ Once the load has been analyzed, we compute the difference between the max and min PE loads.  Only if this difference exceeds {\tt LB\_DIFF} do we bother migrating posers.\\
\end{itemize}

Several of the above flags and constants will be eliminated as the adaptive strategy is expanded.  What remains will eventually become run-time options.

\subsection{\pose{} Command Line Options}
\label{sec:posecommand}

Command line options are handled like \charmpp{} command line
parameters.  For namespace purity all \pose{} command line options
have a \_pose suffix.  They can be inspected by appending a -h to an
execution of a \pose{} program.  Command line options override any
defaults set in the {\tt pose\_config.h} file

\begin{itemize}
\item {\tt {\bf +stats\_pose}}\\
	$\circ$ Turn on timing and statistics gathering for internal \pose{}
	operations.  Produces a small slowdown in program.\\
\item {\tt {\bf +dop\_pose}}\\
	$\circ$ Turn on timing and statistics gathering for degree of parallelism calculations.  Generates log files that can be loaded by ploticus scripts to produce graphs plotting active entities over time.  Slows down program dramatically.\\
\item {\tt {\bf +lb\_on\_pose}}\\
	$\circ$ Turn on \pose{} load balancing.\\
\item {\tt {\bf +store\_rate\_pose N}}\\
	$\circ$ Default checkpointing rate: 1 for every {\tt STORE\_RATE} events.\\
\item {\tt {\bf +spec\_window\_pose N}}\\
	$\circ$ Speculative window size: this is how far (in virtual time units) ahead of GVT posers are allowed to go.\\
\item {\tt {\bf +min\_leash\_pose N}} and {\tt {\bf +min\_leash\_pose N}}\\
	$\circ$ Bounds on the speculative window, these are adjusted by adaptive synchronization strategies.\\
\item {\tt {\bf +leash\_flex\_pose N}}\\
	$\circ$ Granularity of flexibility when speculative window is shrunk or expanded.\\
\item {\tt {\bf +lb\_skip\_pose N}}\\
	$\circ$ This controls the frequency of load balance invocation.  1 in every {\tt LB\_SKIP} executions of the GVT algorithm will invoke load balancing.
\item {\tt {\bf +lb\_threshold\_pose N}}\\
	$\circ$ Minimum threshold for load balancing, default is 4000
\item {\tt {\bf +lb\_diff\_pose N}}\\
	$\circ$ Once the load has been analyzed, we compute the difference between the max and min PE loads.  Only if this difference exceeds {\tt LB\_DIFF} do we bother migrating posers.\\
\item {\tt {\bf +checkpoint\_gvt\_pose N}}\\
	$\circ$ Checkpoint to disk approximately every N GVT ticks (N is an integer).  The default is 0, which indicates no checkpointing.
\item {\tt {\bf +checkpoint\_time\_pose N}}\\
	$\circ$ Checkpoint to disk every N seconds (N is an integer).  The default is 0, which indicates no checkpointing.  If both this parameter and +checkpoint\_gvt\_pose are greater than 0, a warning will be given, the value of this parameter will be set to 0, and POSE will checkpoint based on GVT ticks.
\end{itemize}

As a technical point, pose command line parsing is done inside the
{\tt POSE\_init()} call.  Therefore, the most consistent behavior for
interleaving pose command line options with user application options
will be achieved by calling {\tt POSE\_init()} before handling user
application command line arguments.  
