<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.einsteintoolkit.org/et-docs/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mthomas</id>
	<title>Einstein Toolkit Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.einsteintoolkit.org/et-docs/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mthomas"/>
	<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/Special:Contributions/Mthomas"/>
	<updated>2026-05-06T00:43:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Interactive_Debugging&amp;diff=2184</id>
		<title>Simulation Factory Interactive Debugging</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Interactive_Debugging&amp;diff=2184"/>
		<updated>2011-03-11T21:30:31Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory provides a simple facility to interactively debug Cactus/Einstein Toolkit simulation sessions in parallel.&lt;br /&gt;
Currently, only the Totalview debugger is supported. &lt;br /&gt;
&lt;br /&gt;
== Supported Machines ==&lt;br /&gt;
&lt;br /&gt;
Interactive parallel debugging using Totalview is currently supported on the following machines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;queenbee (LONI/TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt;eric (LONI)&lt;br /&gt;
&amp;lt;li&amp;gt;ranger (TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt;abe (TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt; lincoln (TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt; kraken (TeraGrid)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
Before debugging, a Cactus/Einstein Toolkit binary must be compiled, and then a Simulation Factory simulation must be created. Instructions to do these steps can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://docs.einsteintoolkit.org/et-docs/Simulation_Factory_Advanced_Tutorial Simulation Factory Advanced Tutorial]&lt;br /&gt;
&lt;br /&gt;
A second requirement is the existence of an Xwindows environment such as X11 or X-Ming.&lt;br /&gt;
&lt;br /&gt;
== Interactive Sessions == &lt;br /&gt;
&lt;br /&gt;
To begin debugging, first launch an interactive session using The Simulation Factory. This can be done with the following command:&lt;br /&gt;
&lt;br /&gt;
 bin/sim interactive --walltime=01:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
walltime and procs can be changed to suit the amount of simulation time and processors needed.&lt;br /&gt;
&lt;br /&gt;
== Interactive Debugging ==&lt;br /&gt;
&lt;br /&gt;
Once the queuing system grants an interactive session, it will present a shell on a compute node. From here, it is &lt;br /&gt;
necessary to change the current working directory back to the simulation factory directory. Once located in The Simulation&lt;br /&gt;
Factory directory, an interactive debugging session can be launched by typing the following command:&lt;br /&gt;
&lt;br /&gt;
 bin/sim run-debug &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, if your simulation is called &amp;quot;test_sim&amp;quot;, it would be:&lt;br /&gt;
 &lt;br /&gt;
 bin/sim run-debug test_sim&lt;br /&gt;
&lt;br /&gt;
Once the interactive debugging session launches. It is necessary to hit the &amp;quot;Go&amp;quot; button inside Totalview to begin execution of the Cactus/Einstein Toolkit simulation.&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Interactive_Debugging&amp;diff=2183</id>
		<title>Simulation Factory Interactive Debugging</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Interactive_Debugging&amp;diff=2183"/>
		<updated>2011-03-11T21:30:13Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory provides a simple facility to interactively debug Cactus/Einstein Toolkit simulation sessions in parallel.&lt;br /&gt;
Currently, only the Totalview debugger is supported. &lt;br /&gt;
&lt;br /&gt;
== Supported Machines ==&lt;br /&gt;
&lt;br /&gt;
Interactive parallel debugging using Totalview is currently supported on the following machines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;queenbee (LONI/TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt;eric (LONI)&lt;br /&gt;
&amp;lt;li&amp;gt;ranger (TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt;abe (TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt; lincoln (TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt; kraken (TeraGrid)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
Before debugging, a Cactus/Einstein Toolkit binary must be compiled, and then a Simulation Factory simulation must be created. Instructions to do these steps can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://docs.einsteintoolkit.org/et-docs/Simulation_Factory_Advanced_Tutorial Simulation_Factory_Advanced_Tutorial]&lt;br /&gt;
&lt;br /&gt;
A second requirement is the existence of an Xwindows environment such as X11 or X-Ming.&lt;br /&gt;
&lt;br /&gt;
== Interactive Sessions == &lt;br /&gt;
&lt;br /&gt;
To begin debugging, first launch an interactive session using The Simulation Factory. This can be done with the following command:&lt;br /&gt;
&lt;br /&gt;
 bin/sim interactive --walltime=01:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
walltime and procs can be changed to suit the amount of simulation time and processors needed.&lt;br /&gt;
&lt;br /&gt;
== Interactive Debugging ==&lt;br /&gt;
&lt;br /&gt;
Once the queuing system grants an interactive session, it will present a shell on a compute node. From here, it is &lt;br /&gt;
necessary to change the current working directory back to the simulation factory directory. Once located in The Simulation&lt;br /&gt;
Factory directory, an interactive debugging session can be launched by typing the following command:&lt;br /&gt;
&lt;br /&gt;
 bin/sim run-debug &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, if your simulation is called &amp;quot;test_sim&amp;quot;, it would be:&lt;br /&gt;
 &lt;br /&gt;
 bin/sim run-debug test_sim&lt;br /&gt;
&lt;br /&gt;
Once the interactive debugging session launches. It is necessary to hit the &amp;quot;Go&amp;quot; button inside Totalview to begin execution of the Cactus/Einstein Toolkit simulation.&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=2182</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=2182"/>
		<updated>2011-03-11T21:10:07Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory simplifies many aspects of running Cactus-based&lt;br /&gt;
simulations. It provides a central facility for managing authoritative&lt;br /&gt;
source tree versions, providing convenient access to remote HPC&lt;br /&gt;
systems, building Cactus source configurations, and managing&lt;br /&gt;
simulations all the way from submission to archiving their output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
To begin using The Simulation Factory, it needs to be checked out from&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;. The Simulation Factory is typically placed into a&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder inside a Cactus source tree. This can be&lt;br /&gt;
accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory could also be placed in an independent location&lt;br /&gt;
to be used with multiple Cactus source trees. This approach will be&lt;br /&gt;
described later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once the Simulation Factory has been checked out from svn, the next&lt;br /&gt;
step is to configure it, telling it e.g. about your user name. The&lt;br /&gt;
Simulation Factory comes with a convenient method to generate &lt;br /&gt;
some simple defaults to get started. To begin, issue the command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim setup&lt;br /&gt;
&lt;br /&gt;
Setup will prompt for a username, an email address, and an allocation. It will allow you&lt;br /&gt;
to enter additional configuration from other machines, but this is advanced, and can be &lt;br /&gt;
safely ignored. Setup will also generate a machine database entry for your local machine &lt;br /&gt;
based upon the generic machine database entry.&lt;br /&gt;
&lt;br /&gt;
=== Additional Configurations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine&lt;br /&gt;
Database. This collection of information describes all the aspects&lt;br /&gt;
that are unique about each individual HPC system, so that the&lt;br /&gt;
Simulation Factory can provide a common interface for all systems that&lt;br /&gt;
hides these differences.&lt;br /&gt;
&lt;br /&gt;
The Machine Database consists of different sections, one for each&lt;br /&gt;
machine. The section name is given in square brackets, e.g.&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[queenbee]&amp;#039;&amp;#039;&amp;#039;. There is a special section &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; that&lt;br /&gt;
provides default values for those properties that are not explicitly&lt;br /&gt;
set in the machine-specific entries.&lt;br /&gt;
&lt;br /&gt;
The Machine Database is an authoritative collection of information,&lt;br /&gt;
and is generally not meant to contain modification that are only&lt;br /&gt;
relevant for individual people. These local modifications are instead&lt;br /&gt;
maintained in the file &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; described&lt;br /&gt;
above, where one can add, change, or overwrite properties of Machine&lt;br /&gt;
Database entries. For instance, if an alternative username,&lt;br /&gt;
allocation, and sourcebasedir is needed for the machine&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section there:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = QUEENBEE_USERNAME&lt;br /&gt;
 allocation    = QUEENBEE_ALLOCATION&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that help simplifying configuration entries.&lt;br /&gt;
The most useful is probably &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;, which expands to the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry.&lt;br /&gt;
&lt;br /&gt;
For example, if you are using the same user name on many systems, but&lt;br /&gt;
have a different user name on some systems, then you would set the&lt;br /&gt;
common user name in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section, and override this for&lt;br /&gt;
those machines where your user name differs. The example&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini.complex&amp;#039;&amp;#039;&amp;#039; has examples for this.&lt;br /&gt;
&lt;br /&gt;
Most of the macros available in the Simulation Factory are described&lt;br /&gt;
in the section [[#Macros]] below.&lt;br /&gt;
&lt;br /&gt;
The command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim list-machines&lt;br /&gt;
&lt;br /&gt;
outputs a list of all preconfigured machines that the Simulation&lt;br /&gt;
Factory knows about.&lt;br /&gt;
&lt;br /&gt;
=== Extended Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
Once determining the hostname of your machine through the command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
It is then possible to edit the machine simfactory/mdb/machines/&amp;lt;hostname&amp;gt;.ini, which was created via the command:&lt;br /&gt;
&lt;br /&gt;
 sim setup &lt;br /&gt;
&lt;br /&gt;
Then edit &amp;#039;&amp;#039;&amp;#039;simfactory/mdb/machines/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039;. From here, all values can be customized.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory simplifies access to remote systems, both for&lt;br /&gt;
transferring files and logging in. You can synchronise (replicate) an&lt;br /&gt;
authoritative version of your Cactus source tree to remote systems,&lt;br /&gt;
obtain an interactive shell, or execute commands.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a&lt;br /&gt;
machine, or list all known machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the complete Machine Database to the screen:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the name of the machine on which the Simulation Factory is&lt;br /&gt;
currently being executed:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim print-machine&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed&lt;br /&gt;
into a central location on each machine, but are instead built&lt;br /&gt;
on-demand by every user for a certain thorn list. (One of the&lt;br /&gt;
advantages is that people can thus easily add their own thorns.) To&lt;br /&gt;
help with this approach, the Simulation Factory provides a facility to&lt;br /&gt;
synchronize a Cactus user&amp;#039;s local, authoritative source tree to remote&lt;br /&gt;
HPC systems, where it can then be compiled and run.&lt;br /&gt;
&lt;br /&gt;
Remote access is implemented on top of ssh and other ssh-like&lt;br /&gt;
mechanisms such as gsi-ssh. Currently, you must still manage all ssh&lt;br /&gt;
keys and passwords manually. (We highly recommend to use ssh keychain&lt;br /&gt;
and ssh agents to avoid having to enter passwords multiple times.)&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a source tree to a remote system, a small amount of&lt;br /&gt;
configuration must be performed. It is necessary to either verify that&lt;br /&gt;
the defaults are correct, or to define the correct values for the&lt;br /&gt;
following keys for the remote system in the Machine Database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The root directory in which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The user name on the remote system&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can output the currently configured values by issuing the command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need to change these values, then edit (on the local system)&lt;br /&gt;
the file &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add a section for the&lt;br /&gt;
remote machine. This entry will augment the existing Machine Database&lt;br /&gt;
entry and updating/replace the corresponding values. An example for&lt;br /&gt;
the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional&lt;br /&gt;
Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
To see the list of files and directories that are synchronized, look&lt;br /&gt;
at &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The list of files and directories that will be transferred when&lt;br /&gt;
the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled (on by default)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The list of files and directories that will be copied when the&lt;br /&gt;
option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled (also on by default). This&lt;br /&gt;
list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A list of files and directories that will be expressly excluded&lt;br /&gt;
from syncing, such as e.g. &amp;#039;&amp;#039;&amp;#039;CVS&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;.svn&amp;#039;&amp;#039;&amp;#039; directories.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two options, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Synchronise the complete source tree, as specified in the&lt;br /&gt;
aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry. This takes a&lt;br /&gt;
few seconds or minutes, depending on the connection.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Synchronise parameter files, as specified by the aforementioned&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. This is typically faster&lt;br /&gt;
than synchronising the source tree.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usually, you would issue the command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To synchronise only parfiles, you can negate the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If you want to synchronise not from the local machine, but from&lt;br /&gt;
another remote machine, then use&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim --remote=&amp;lt;frommachine&amp;gt; sync &amp;lt;tomachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This executes the synchronisation command on the machine&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;frommachine&amp;gt;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to log in to a remote&lt;br /&gt;
system. This is initiated with the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will automatically cd into the Cactus directory on the remote&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command (locally) via the Simulation Factory, use the&lt;br /&gt;
 command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will be executed in the Cactus directory on the remote&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be&lt;br /&gt;
quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim execute &amp;#039;ls -al&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim --remote-machine=&amp;lt;machine&amp;gt; execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim --remote-machine=queenbee execute &amp;#039;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Build Cactus Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and&lt;br /&gt;
building Cactus source trees. When a Cactus source tree is compiled,&lt;br /&gt;
the Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039; for the compiled&lt;br /&gt;
executable, storing with it related information such as the Cactus&lt;br /&gt;
options list, and the scripts necessary to submit and run jobs in a&lt;br /&gt;
queuing system. This configuration is thus a self-contained entity&lt;br /&gt;
containing everything that is necessary to perform Cactus simulations.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing Cactus configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
To build a configuration, four pieces of information are required:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Thorn list&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This defines which thorns are to be included into the configuration.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;The default option list is probably not useful in many cases.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Option List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies the compiler and build options that need to be used&lt;br /&gt;
  to build Cactus on a particular system.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;The Simulation Factory is supposed to contain good, working&lt;br /&gt;
  default option lists for all supported systems. In fact, this is one&lt;br /&gt;
  of the main strengths of the Simulation Factory. You should normally&lt;br /&gt;
  not need to override the default.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies how to submit a job to the queueing system on a&lt;br /&gt;
  particular system.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;Similar to the option list, the Simulation Factory is supposed to&lt;br /&gt;
  contain good, working default submission scripts for all supported&lt;br /&gt;
  systems.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies to how execute an MPI process on a particular&lt;br /&gt;
  system; it is closely connected to the submission script.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;Same as with the the submission script, the Simulation Factory is&lt;br /&gt;
 supposed to contain good, working default run scripts for all&lt;br /&gt;
 supported systems.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specific thornlist, issue the&lt;br /&gt;
following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to&lt;br /&gt;
&amp;#039;sim&amp;#039;. (We recommend this.) You can in addition specify any of the&lt;br /&gt;
options&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;--debug&lt;br /&gt;
&amp;lt;li&amp;gt;--optimise (default)&lt;br /&gt;
&amp;lt;li&amp;gt;--profile&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
These options create configurations for debugging, optimisation (this&lt;br /&gt;
is the default), or profiling enabled.&lt;br /&gt;
If any of these options is specified, then the configuration name will&lt;br /&gt;
be modified correspondingly, e.g. to &amp;#039;sim-debug&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reconfigure before building, i.e. re-examine the configuration&lt;br /&gt;
  options and re-run the CST stage. This happens automatically when&lt;br /&gt;
  the option list changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Clean the configuration (remove all object files etc.) before&lt;br /&gt;
  building.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cbZsul  &amp;lt;a href=&amp;quot;http://wlswjasvvkxf.com/&amp;quot;&amp;gt;wlswjasvvkxf&amp;lt;/a&amp;gt;, [url=http://aegknafsayjg.com/]aegknafsayjg[/url], [link=http://erlxqmjagmjm.com/]erlxqmjagmjm[/link], http://rbnzmidhcrnk.com/&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for all its&lt;br /&gt;
preconfigured machines. These scripts can be found in the following&lt;br /&gt;
locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list Queen Bee uses by&lt;br /&gt;
default, issue the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for&lt;br /&gt;
submitting, running, and managing simulations. This is accomplished&lt;br /&gt;
through two main commands &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations on a particular machine can be seen with&lt;br /&gt;
the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose&lt;br /&gt;
option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a&lt;br /&gt;
simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Cactus configuration to run&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The total amount of wall time required&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key &amp;#039;&amp;#039;&amp;#039;maxwalltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Processors&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The total number of processors to use&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The option &amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the first&lt;br /&gt;
time you submit a simulation. Subsequent re-submissions of the same&lt;br /&gt;
simulation (for restarting from checkpoints) will always use the same&lt;br /&gt;
configuration that was specified the first time. Here is an example of&lt;br /&gt;
submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned&lt;br /&gt;
options:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand notation where&lt;br /&gt;
you do not need to specify the option names, but have to specify the&lt;br /&gt;
options in a certain order. If you don&amp;#039;t specify a simulation name&lt;br /&gt;
using the shorthand syntax, a simulation name will be derived from&lt;br /&gt;
from the parameter file name.&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example is&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Number of OpenMP Threads&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of OpenMP threads per MPI process. (You specify the&lt;br /&gt;
  total number of processors (cores), and the number of OpenMP&lt;br /&gt;
  threads; the number of MPI processes is then calculated&lt;br /&gt;
  automatically.)&lt;br /&gt;
&amp;lt;li&amp;gt;option: --num-threads&lt;br /&gt;
&amp;lt;li&amp;gt;default: 1 (as if OpenMP was not used)&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Allocation&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The allocation for the simulation, overriding the corresponding&lt;br /&gt;
  MDB entry&lt;br /&gt;
&amp;lt;li&amp;gt;option: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt;default: taken from the MDB&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Queue&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The queue for the simulation, overriding the corresponding MDB&lt;br /&gt;
  entry&lt;br /&gt;
&amp;lt;li&amp;gt;option: --queue&lt;br /&gt;
&amp;lt;li&amp;gt;default: taken from the MDB&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Processors per node&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of processors per node requested from the queueing system&lt;br /&gt;
&amp;lt;li&amp;gt;option: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt;default: all processors on a node&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Used processors per node&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of processors per node that should actually be used,&lt;br /&gt;
  allowing under-using nodes even if the queueing system does not&lt;br /&gt;
  allow it. (The remaining processors will idle and will remain&lt;br /&gt;
  unused.)&lt;br /&gt;
&amp;lt;li&amp;gt;option: --ppn-used&lt;br /&gt;
&amp;lt;li&amp;gt;default: all processors on a node&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing&lt;br /&gt;
the queuing system. Running a simulation directly uses the same&lt;br /&gt;
options, but ignores wall time limit etc. You use the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
command for this:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim run static_tov --configuration sim-debug --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
This leads to a login shell on the compute node, but is otherwise&lt;br /&gt;
similar to the submit command.&lt;br /&gt;
&lt;br /&gt;
To stop a simulation:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim stop &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim purge &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the current output (stdout and stderr) for a given simulation:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is submitted for the first time, all necessary&lt;br /&gt;
information from the Cactus build configuration is brought into a&lt;br /&gt;
specific simulation folder created underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
directory. Contained inside this folder, which has the same name as&lt;br /&gt;
the specified simulation, are the executable, run script, submit&lt;br /&gt;
script, a SIMFACTORY folder, a log file, and the output directories&lt;br /&gt;
for each individual restart.&lt;br /&gt;
&lt;br /&gt;
Simulations are self-contained, and once created do not rely on&lt;br /&gt;
outside information. For example, recompiling the executable or&lt;br /&gt;
changing the parameter file that were used to submit a simulation will&lt;br /&gt;
not influence the simulation, since the simulation contains copies of&lt;br /&gt;
both. This ensures that simulations can continue to run unperturbed&lt;br /&gt;
even weeks after they have been created.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;static_tov&amp;quot; with&lt;br /&gt;
several restarts in it:&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -l static_tov&lt;br /&gt;
 total 32&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0000&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0002&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0003&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0004&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
The SIMFACTORY folder contains the executable, the necessary script&lt;br /&gt;
files for submission and execution, and a properties.ini file that is&lt;br /&gt;
used by the Simulation Factory to store information about the&lt;br /&gt;
simulation.&lt;br /&gt;
&lt;br /&gt;
Each time a simulation is either run or submitted, a restart directory&lt;br /&gt;
is created underneath the simulation directory. This restart folder&lt;br /&gt;
has a name of the format &amp;quot;output-####&amp;quot;, starting with &amp;quot;output-0000&amp;quot;.&lt;br /&gt;
Contained inside the restart folder are several internal files, the&lt;br /&gt;
output written to stdout and stderr from the simulation, and the&lt;br /&gt;
simulation output itself. The simulation output is typically stored&lt;br /&gt;
inside a directory named after the basename of the parameter file. An&lt;br /&gt;
example output directory is:&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 output-0001]$ ls -l&lt;br /&gt;
 total 172&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      0 Sep 17 09:06 LOG&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      9 Sep 17 09:06 mpd_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     32 Sep 17 09:06 mpi_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     33 Sep 17 09:06 NODELIST&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers  20480 Sep 17 16:12 qc0-mclachlan&lt;br /&gt;
 -rw-------  1 mwt lsuusers   2520 Sep 17 21:06 qc0-mclachlan.err&lt;br /&gt;
 -rw-------  1 mwt lsuusers 108210 Sep 17 21:06 qc0-mclachlan.out&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
 lrwxrwxrwx  1 mwt lsuusers     23 Sep 17 09:06 scratch -&amp;gt; /var/scratch/mwt/250072&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers   4096 Sep 17 09:06 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is created, it copies the submit script and the run&lt;br /&gt;
script from the build configuration into the folder&lt;br /&gt;
&amp;quot;basedir/&amp;lt;simulation&amp;gt;/SIMFACTORY&amp;quot;. The executable goes in the &amp;quot;exe/&amp;quot;&lt;br /&gt;
folder, the run and submit scripts into the &amp;quot;run/&amp;quot; folder, the Cactus&lt;br /&gt;
options list into the &amp;quot;cfg/&amp;quot; folder, and the parfile into the &amp;quot;par/&amp;quot;&lt;br /&gt;
folder. Below shows an example SIMFACTORY directory&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 SIMFACTORY]$ ls -lR&lt;br /&gt;
 .:&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 cfg&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 data&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 exe&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 par&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  740 Sep 17 09:06 properties.ini&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 run&lt;br /&gt;
&lt;br /&gt;
 ./cfg:&lt;br /&gt;
 total 12&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 4041 Sep 17 09:06 OptionList&lt;br /&gt;
&lt;br /&gt;
 ./exe:&lt;br /&gt;
 total 121408&lt;br /&gt;
 -rwxr-xr-x  1 mwt lsuusers 124306159 Sep 17 09:06 cactus_sim&lt;br /&gt;
&lt;br /&gt;
 ./par:&lt;br /&gt;
 total 24&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
&lt;br /&gt;
 ./run:&lt;br /&gt;
 total 16&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 1162 Sep 17 09:06 RunScript&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  410 Sep 17 09:06 SubmitScript&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Archiving ===&lt;br /&gt;
&lt;br /&gt;
Preliminary support for archiving of simulations has been added to the&lt;br /&gt;
Simulation Factory using the PetaShare data storage system on LONI.&lt;br /&gt;
This archiving system can only be used from machines that have access&lt;br /&gt;
to PetaShare. The currently supported machines that have access to&lt;br /&gt;
Petashare are&lt;br /&gt;
&lt;br /&gt;
 bluedawg&lt;br /&gt;
 ducky&lt;br /&gt;
 eric&lt;br /&gt;
 lacumba&lt;br /&gt;
 louie&lt;br /&gt;
 neptune&lt;br /&gt;
 oliver&lt;br /&gt;
 painter&lt;br /&gt;
 poseidon&lt;br /&gt;
 queenbee&lt;br /&gt;
 spider&lt;br /&gt;
 tezpur&lt;br /&gt;
 zeke&lt;br /&gt;
&lt;br /&gt;
To use the PetaShare archiving system, the PetaShare&lt;br /&gt;
[http://www.cct.lsu.edu/~sreekanth/petashare/downloads/pcommands/pcommands-2.3.tar.gz&lt;br /&gt;
Pcommands],&lt;br /&gt;
[http://www.cct.lsu.edu/~sreekanth/petashare/pcommands-manual(2.0).php&lt;br /&gt;
(manual)] must be downloaded and installed onto your machine. Once&lt;br /&gt;
that is done, add a new section in &amp;#039;&amp;#039;&amp;#039;etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; for the&lt;br /&gt;
machine from which you wish to access PetaShare, and add the necessary&lt;br /&gt;
MDB keys. An example for the machine Queen Bee is:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 # archive information&lt;br /&gt;
 archivetype      = petashare&lt;br /&gt;
 archiveuser      = numrel&lt;br /&gt;
 archivetoolspath = /home/mwt/tools/pcommands-2.3/bin&lt;br /&gt;
 archivebasepath  = /tempZone/home/numrel/mwt/simulations&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;archivebasepath&amp;#039;&amp;#039;&amp;#039; is where the simulations will be stored on&lt;br /&gt;
PetaShare.&lt;br /&gt;
&lt;br /&gt;
Once this setup has been completed, you can archive an entire&lt;br /&gt;
simulation (including all restarts) using the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim archive &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To archive just a single restart for a given simulation, issue the&lt;br /&gt;
command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim archive &amp;lt;simulationname&amp;gt; --restart-id=&amp;lt;restartid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To print a list of all archived simulations, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim list-archived-simulations&lt;br /&gt;
&lt;br /&gt;
To retreive an archived simulation, first use the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;list-archived-simulations&amp;#039;&amp;#039;&amp;#039; command to retrieve the unique&lt;br /&gt;
identifier for the simulation, and then issue the following command to&lt;br /&gt;
retrieve a simulation. It will place the simulation in the current&lt;br /&gt;
directory.&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim get-archived-simulation &amp;lt;archiveid&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=2181</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=2181"/>
		<updated>2011-03-11T20:36:04Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory simplifies many aspects of running Cactus-based&lt;br /&gt;
simulations. It provides a central facility for managing authoritative&lt;br /&gt;
source tree versions, providing convenient access to remote HPC&lt;br /&gt;
systems, building Cactus source configurations, and managing&lt;br /&gt;
simulations all the way from submission to archiving their output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
To begin using The Simulation Factory, it needs to be checked out from&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;. The Simulation Factory is typically placed into a&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder inside a Cactus source tree. This can be&lt;br /&gt;
accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory could also be placed in an independent location&lt;br /&gt;
to be used with multiple Cactus source trees. This approach will be&lt;br /&gt;
described later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once the Simulation Factory has been checked out from svn, the next&lt;br /&gt;
step is to configure it, telling it e.g. about your user name. The&lt;br /&gt;
Simulation Factory comes with a convenient method to generate &lt;br /&gt;
some simple defaults to get started. To begin, issue the command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim setup&lt;br /&gt;
&lt;br /&gt;
Setup will prompt for a username, an email address, and an allocation. It will allow you&lt;br /&gt;
to enter additional configuration from other machines, but this is advanced, and can be &lt;br /&gt;
safely ignored. Setup will also generate a machine database entry for your local machine &lt;br /&gt;
based upon the generic machine database entry.&lt;br /&gt;
&lt;br /&gt;
=== Additional Configurations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine&lt;br /&gt;
Database. This collection of information describes all the aspects&lt;br /&gt;
that are unique about each individual HPC system, so that the&lt;br /&gt;
Simulation Factory can provide a common interface for all systems that&lt;br /&gt;
hides these differences.&lt;br /&gt;
&lt;br /&gt;
The Machine Database consists of different sections, one for each&lt;br /&gt;
machine. The section name is given in square brackets, e.g.&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[queenbee]&amp;#039;&amp;#039;&amp;#039;. There is a special section &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; that&lt;br /&gt;
provides default values for those properties that are not explicitly&lt;br /&gt;
set in the machine-specific entries.&lt;br /&gt;
&lt;br /&gt;
The Machine Database is an authoritative collection of information,&lt;br /&gt;
and is generally not meant to contain modification that are only&lt;br /&gt;
relevant for individual people. These local modifications are instead&lt;br /&gt;
maintained in the file &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; described&lt;br /&gt;
above, where one can add, change, or overwrite properties of Machine&lt;br /&gt;
Database entries. For instance, if an alternative username,&lt;br /&gt;
allocation, and sourcebasedir is needed for the machine&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section there:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = QUEENBEE_USERNAME&lt;br /&gt;
 allocation    = QUEENBEE_ALLOCATION&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that help simplifying configuration entries.&lt;br /&gt;
The most useful is probably &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;, which expands to the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry.&lt;br /&gt;
&lt;br /&gt;
For example, if you are using the same user name on many systems, but&lt;br /&gt;
have a different user name on some systems, then you would set the&lt;br /&gt;
common user name in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section, and override this for&lt;br /&gt;
those machines where your user name differs. The example&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini.complex&amp;#039;&amp;#039;&amp;#039; has examples for this.&lt;br /&gt;
&lt;br /&gt;
Most of the macros available in the Simulation Factory are described&lt;br /&gt;
in the section [[#Macros]] below.&lt;br /&gt;
&lt;br /&gt;
The command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim list-machines&lt;br /&gt;
&lt;br /&gt;
outputs a list of all preconfigured machines that the Simulation&lt;br /&gt;
Factory knows about.&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can only be used on a machine known to the&lt;br /&gt;
Simulation Factory. This means that you may have to add an entry for&lt;br /&gt;
your workstation or notebook.&lt;br /&gt;
&lt;br /&gt;
The first step is to determine the hostname of the local machine. It&lt;br /&gt;
is through this hostname that the Simulation Factory matches a Machine&lt;br /&gt;
Database entry to the machine on which it executes. The hostname can&lt;br /&gt;
be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you know the hostname, issue the following command to create a&lt;br /&gt;
new Machine Database entry, starting from a generic example:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Then edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The section header for this machine database entry must be unique&lt;br /&gt;
  among all Machine Database entries, and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  path under which all your Cactus source trees reside. (This is not&lt;br /&gt;
  the Cactus directory itself, but the directory that contains the&lt;br /&gt;
  Cactus directory.)&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder&lt;br /&gt;
  that will contain all simulation output. (This is explained in more&lt;br /&gt;
  detail below in the section [[#Managing Simulations]].)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
You can ignore the properties &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;email&amp;#039;&amp;#039;&amp;#039;, and&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory simplifies access to remote systems, both for&lt;br /&gt;
transferring files and logging in. You can synchronise (replicate) an&lt;br /&gt;
authoritative version of your Cactus source tree to remote systems,&lt;br /&gt;
obtain an interactive shell, or execute commands.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a&lt;br /&gt;
machine, or list all known machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the complete Machine Database to the screen:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the name of the machine on which the Simulation Factory is&lt;br /&gt;
currently being executed:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim print-machine&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed&lt;br /&gt;
into a central location on each machine, but are instead built&lt;br /&gt;
on-demand by every user for a certain thorn list. (One of the&lt;br /&gt;
advantages is that people can thus easily add their own thorns.) To&lt;br /&gt;
help with this approach, the Simulation Factory provides a facility to&lt;br /&gt;
synchronize a Cactus user&amp;#039;s local, authoritative source tree to remote&lt;br /&gt;
HPC systems, where it can then be compiled and run.&lt;br /&gt;
&lt;br /&gt;
Remote access is implemented on top of ssh and other ssh-like&lt;br /&gt;
mechanisms such as gsi-ssh. Currently, you must still manage all ssh&lt;br /&gt;
keys and passwords manually. (We highly recommend to use ssh keychain&lt;br /&gt;
and ssh agents to avoid having to enter passwords multiple times.)&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a source tree to a remote system, a small amount of&lt;br /&gt;
configuration must be performed. It is necessary to either verify that&lt;br /&gt;
the defaults are correct, or to define the correct values for the&lt;br /&gt;
following keys for the remote system in the Machine Database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The root directory in which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The user name on the remote system&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can output the currently configured values by issuing the command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need to change these values, then edit (on the local system)&lt;br /&gt;
the file &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add a section for the&lt;br /&gt;
remote machine. This entry will augment the existing Machine Database&lt;br /&gt;
entry and updating/replace the corresponding values. An example for&lt;br /&gt;
the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional&lt;br /&gt;
Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
To see the list of files and directories that are synchronized, look&lt;br /&gt;
at &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The list of files and directories that will be transferred when&lt;br /&gt;
the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled (on by default)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The list of files and directories that will be copied when the&lt;br /&gt;
option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled (also on by default). This&lt;br /&gt;
list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A list of files and directories that will be expressly excluded&lt;br /&gt;
from syncing, such as e.g. &amp;#039;&amp;#039;&amp;#039;CVS&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;.svn&amp;#039;&amp;#039;&amp;#039; directories.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two options, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Synchronise the complete source tree, as specified in the&lt;br /&gt;
aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry. This takes a&lt;br /&gt;
few seconds or minutes, depending on the connection.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Synchronise parameter files, as specified by the aforementioned&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. This is typically faster&lt;br /&gt;
than synchronising the source tree.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usually, you would issue the command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To synchronise only parfiles, you can negate the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If you want to synchronise not from the local machine, but from&lt;br /&gt;
another remote machine, then use&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim --remote=&amp;lt;frommachine&amp;gt; sync &amp;lt;tomachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This executes the synchronisation command on the machine&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;frommachine&amp;gt;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to log in to a remote&lt;br /&gt;
system. This is initiated with the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will automatically cd into the Cactus directory on the remote&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command (locally) via the Simulation Factory, use the&lt;br /&gt;
 command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will be executed in the Cactus directory on the remote&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be&lt;br /&gt;
quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim execute &amp;#039;ls -al&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim --remote-machine=&amp;lt;machine&amp;gt; execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim --remote-machine=queenbee execute &amp;#039;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Build Cactus Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and&lt;br /&gt;
building Cactus source trees. When a Cactus source tree is compiled,&lt;br /&gt;
the Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039; for the compiled&lt;br /&gt;
executable, storing with it related information such as the Cactus&lt;br /&gt;
options list, and the scripts necessary to submit and run jobs in a&lt;br /&gt;
queuing system. This configuration is thus a self-contained entity&lt;br /&gt;
containing everything that is necessary to perform Cactus simulations.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing Cactus configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
To build a configuration, four pieces of information are required:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Thorn list&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This defines which thorns are to be included into the configuration.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;The default option list is probably not useful in many cases.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Option List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies the compiler and build options that need to be used&lt;br /&gt;
  to build Cactus on a particular system.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;The Simulation Factory is supposed to contain good, working&lt;br /&gt;
  default option lists for all supported systems. In fact, this is one&lt;br /&gt;
  of the main strengths of the Simulation Factory. You should normally&lt;br /&gt;
  not need to override the default.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies how to submit a job to the queueing system on a&lt;br /&gt;
  particular system.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;Similar to the option list, the Simulation Factory is supposed to&lt;br /&gt;
  contain good, working default submission scripts for all supported&lt;br /&gt;
  systems.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies to how execute an MPI process on a particular&lt;br /&gt;
  system; it is closely connected to the submission script.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;Same as with the the submission script, the Simulation Factory is&lt;br /&gt;
 supposed to contain good, working default run scripts for all&lt;br /&gt;
 supported systems.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specific thornlist, issue the&lt;br /&gt;
following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to&lt;br /&gt;
&amp;#039;sim&amp;#039;. (We recommend this.) You can in addition specify any of the&lt;br /&gt;
options&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;--debug&lt;br /&gt;
&amp;lt;li&amp;gt;--optimise (default)&lt;br /&gt;
&amp;lt;li&amp;gt;--profile&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
These options create configurations for debugging, optimisation (this&lt;br /&gt;
is the default), or profiling enabled.&lt;br /&gt;
If any of these options is specified, then the configuration name will&lt;br /&gt;
be modified correspondingly, e.g. to &amp;#039;sim-debug&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reconfigure before building, i.e. re-examine the configuration&lt;br /&gt;
  options and re-run the CST stage. This happens automatically when&lt;br /&gt;
  the option list changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Clean the configuration (remove all object files etc.) before&lt;br /&gt;
  building.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cbZsul  &amp;lt;a href=&amp;quot;http://wlswjasvvkxf.com/&amp;quot;&amp;gt;wlswjasvvkxf&amp;lt;/a&amp;gt;, [url=http://aegknafsayjg.com/]aegknafsayjg[/url], [link=http://erlxqmjagmjm.com/]erlxqmjagmjm[/link], http://rbnzmidhcrnk.com/&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for all its&lt;br /&gt;
preconfigured machines. These scripts can be found in the following&lt;br /&gt;
locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list Queen Bee uses by&lt;br /&gt;
default, issue the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for&lt;br /&gt;
submitting, running, and managing simulations. This is accomplished&lt;br /&gt;
through two main commands &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations on a particular machine can be seen with&lt;br /&gt;
the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose&lt;br /&gt;
option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a&lt;br /&gt;
simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Cactus configuration to run&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The total amount of wall time required&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key &amp;#039;&amp;#039;&amp;#039;maxwalltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Processors&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The total number of processors to use&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The option &amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the first&lt;br /&gt;
time you submit a simulation. Subsequent re-submissions of the same&lt;br /&gt;
simulation (for restarting from checkpoints) will always use the same&lt;br /&gt;
configuration that was specified the first time. Here is an example of&lt;br /&gt;
submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned&lt;br /&gt;
options:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand notation where&lt;br /&gt;
you do not need to specify the option names, but have to specify the&lt;br /&gt;
options in a certain order. If you don&amp;#039;t specify a simulation name&lt;br /&gt;
using the shorthand syntax, a simulation name will be derived from&lt;br /&gt;
from the parameter file name.&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example is&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Number of OpenMP Threads&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of OpenMP threads per MPI process. (You specify the&lt;br /&gt;
  total number of processors (cores), and the number of OpenMP&lt;br /&gt;
  threads; the number of MPI processes is then calculated&lt;br /&gt;
  automatically.)&lt;br /&gt;
&amp;lt;li&amp;gt;option: --num-threads&lt;br /&gt;
&amp;lt;li&amp;gt;default: 1 (as if OpenMP was not used)&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Allocation&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The allocation for the simulation, overriding the corresponding&lt;br /&gt;
  MDB entry&lt;br /&gt;
&amp;lt;li&amp;gt;option: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt;default: taken from the MDB&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Queue&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The queue for the simulation, overriding the corresponding MDB&lt;br /&gt;
  entry&lt;br /&gt;
&amp;lt;li&amp;gt;option: --queue&lt;br /&gt;
&amp;lt;li&amp;gt;default: taken from the MDB&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Processors per node&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of processors per node requested from the queueing system&lt;br /&gt;
&amp;lt;li&amp;gt;option: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt;default: all processors on a node&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Used processors per node&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of processors per node that should actually be used,&lt;br /&gt;
  allowing under-using nodes even if the queueing system does not&lt;br /&gt;
  allow it. (The remaining processors will idle and will remain&lt;br /&gt;
  unused.)&lt;br /&gt;
&amp;lt;li&amp;gt;option: --ppn-used&lt;br /&gt;
&amp;lt;li&amp;gt;default: all processors on a node&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing&lt;br /&gt;
the queuing system. Running a simulation directly uses the same&lt;br /&gt;
options, but ignores wall time limit etc. You use the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
command for this:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim run static_tov --configuration sim-debug --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
This leads to a login shell on the compute node, but is otherwise&lt;br /&gt;
similar to the submit command.&lt;br /&gt;
&lt;br /&gt;
To stop a simulation:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim stop &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim purge &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the current output (stdout and stderr) for a given simulation:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is submitted for the first time, all necessary&lt;br /&gt;
information from the Cactus build configuration is brought into a&lt;br /&gt;
specific simulation folder created underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
directory. Contained inside this folder, which has the same name as&lt;br /&gt;
the specified simulation, are the executable, run script, submit&lt;br /&gt;
script, a SIMFACTORY folder, a log file, and the output directories&lt;br /&gt;
for each individual restart.&lt;br /&gt;
&lt;br /&gt;
Simulations are self-contained, and once created do not rely on&lt;br /&gt;
outside information. For example, recompiling the executable or&lt;br /&gt;
changing the parameter file that were used to submit a simulation will&lt;br /&gt;
not influence the simulation, since the simulation contains copies of&lt;br /&gt;
both. This ensures that simulations can continue to run unperturbed&lt;br /&gt;
even weeks after they have been created.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;static_tov&amp;quot; with&lt;br /&gt;
several restarts in it:&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -l static_tov&lt;br /&gt;
 total 32&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0000&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0002&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0003&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0004&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
The SIMFACTORY folder contains the executable, the necessary script&lt;br /&gt;
files for submission and execution, and a properties.ini file that is&lt;br /&gt;
used by the Simulation Factory to store information about the&lt;br /&gt;
simulation.&lt;br /&gt;
&lt;br /&gt;
Each time a simulation is either run or submitted, a restart directory&lt;br /&gt;
is created underneath the simulation directory. This restart folder&lt;br /&gt;
has a name of the format &amp;quot;output-####&amp;quot;, starting with &amp;quot;output-0000&amp;quot;.&lt;br /&gt;
Contained inside the restart folder are several internal files, the&lt;br /&gt;
output written to stdout and stderr from the simulation, and the&lt;br /&gt;
simulation output itself. The simulation output is typically stored&lt;br /&gt;
inside a directory named after the basename of the parameter file. An&lt;br /&gt;
example output directory is:&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 output-0001]$ ls -l&lt;br /&gt;
 total 172&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      0 Sep 17 09:06 LOG&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      9 Sep 17 09:06 mpd_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     32 Sep 17 09:06 mpi_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     33 Sep 17 09:06 NODELIST&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers  20480 Sep 17 16:12 qc0-mclachlan&lt;br /&gt;
 -rw-------  1 mwt lsuusers   2520 Sep 17 21:06 qc0-mclachlan.err&lt;br /&gt;
 -rw-------  1 mwt lsuusers 108210 Sep 17 21:06 qc0-mclachlan.out&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
 lrwxrwxrwx  1 mwt lsuusers     23 Sep 17 09:06 scratch -&amp;gt; /var/scratch/mwt/250072&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers   4096 Sep 17 09:06 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is created, it copies the submit script and the run&lt;br /&gt;
script from the build configuration into the folder&lt;br /&gt;
&amp;quot;basedir/&amp;lt;simulation&amp;gt;/SIMFACTORY&amp;quot;. The executable goes in the &amp;quot;exe/&amp;quot;&lt;br /&gt;
folder, the run and submit scripts into the &amp;quot;run/&amp;quot; folder, the Cactus&lt;br /&gt;
options list into the &amp;quot;cfg/&amp;quot; folder, and the parfile into the &amp;quot;par/&amp;quot;&lt;br /&gt;
folder. Below shows an example SIMFACTORY directory&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 SIMFACTORY]$ ls -lR&lt;br /&gt;
 .:&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 cfg&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 data&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 exe&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 par&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  740 Sep 17 09:06 properties.ini&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 run&lt;br /&gt;
&lt;br /&gt;
 ./cfg:&lt;br /&gt;
 total 12&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 4041 Sep 17 09:06 OptionList&lt;br /&gt;
&lt;br /&gt;
 ./exe:&lt;br /&gt;
 total 121408&lt;br /&gt;
 -rwxr-xr-x  1 mwt lsuusers 124306159 Sep 17 09:06 cactus_sim&lt;br /&gt;
&lt;br /&gt;
 ./par:&lt;br /&gt;
 total 24&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
&lt;br /&gt;
 ./run:&lt;br /&gt;
 total 16&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 1162 Sep 17 09:06 RunScript&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  410 Sep 17 09:06 SubmitScript&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Archiving ===&lt;br /&gt;
&lt;br /&gt;
Preliminary support for archiving of simulations has been added to the&lt;br /&gt;
Simulation Factory using the PetaShare data storage system on LONI.&lt;br /&gt;
This archiving system can only be used from machines that have access&lt;br /&gt;
to PetaShare. The currently supported machines that have access to&lt;br /&gt;
Petashare are&lt;br /&gt;
&lt;br /&gt;
 bluedawg&lt;br /&gt;
 ducky&lt;br /&gt;
 eric&lt;br /&gt;
 lacumba&lt;br /&gt;
 louie&lt;br /&gt;
 neptune&lt;br /&gt;
 oliver&lt;br /&gt;
 painter&lt;br /&gt;
 poseidon&lt;br /&gt;
 queenbee&lt;br /&gt;
 spider&lt;br /&gt;
 tezpur&lt;br /&gt;
 zeke&lt;br /&gt;
&lt;br /&gt;
To use the PetaShare archiving system, the PetaShare&lt;br /&gt;
[http://www.cct.lsu.edu/~sreekanth/petashare/downloads/pcommands/pcommands-2.3.tar.gz&lt;br /&gt;
Pcommands],&lt;br /&gt;
[http://www.cct.lsu.edu/~sreekanth/petashare/pcommands-manual(2.0).php&lt;br /&gt;
(manual)] must be downloaded and installed onto your machine. Once&lt;br /&gt;
that is done, add a new section in &amp;#039;&amp;#039;&amp;#039;etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; for the&lt;br /&gt;
machine from which you wish to access PetaShare, and add the necessary&lt;br /&gt;
MDB keys. An example for the machine Queen Bee is:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 # archive information&lt;br /&gt;
 archivetype      = petashare&lt;br /&gt;
 archiveuser      = numrel&lt;br /&gt;
 archivetoolspath = /home/mwt/tools/pcommands-2.3/bin&lt;br /&gt;
 archivebasepath  = /tempZone/home/numrel/mwt/simulations&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;archivebasepath&amp;#039;&amp;#039;&amp;#039; is where the simulations will be stored on&lt;br /&gt;
PetaShare.&lt;br /&gt;
&lt;br /&gt;
Once this setup has been completed, you can archive an entire&lt;br /&gt;
simulation (including all restarts) using the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim archive &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To archive just a single restart for a given simulation, issue the&lt;br /&gt;
command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim archive &amp;lt;simulationname&amp;gt; --restart-id=&amp;lt;restartid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To print a list of all archived simulations, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim list-archived-simulations&lt;br /&gt;
&lt;br /&gt;
To retreive an archived simulation, first use the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;list-archived-simulations&amp;#039;&amp;#039;&amp;#039; command to retrieve the unique&lt;br /&gt;
identifier for the simulation, and then issue the following command to&lt;br /&gt;
retrieve a simulation. It will place the simulation in the current&lt;br /&gt;
directory.&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim get-archived-simulation &amp;lt;archiveid&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=2180</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=2180"/>
		<updated>2011-03-11T20:31:32Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory simplifies many aspects of running Cactus-based&lt;br /&gt;
simulations. It provides a central facility for managing authoritative&lt;br /&gt;
source tree versions, providing convenient access to remote HPC&lt;br /&gt;
systems, building Cactus source configurations, and managing&lt;br /&gt;
simulations all the way from submission to archiving their output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
To begin using The Simulation Factory, it needs to be checked out from&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;. The Simulation Factory is typically placed into a&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder inside a Cactus source tree. This can be&lt;br /&gt;
accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory could also be placed in an independent location&lt;br /&gt;
to be used with multiple Cactus source trees. This approach will be&lt;br /&gt;
described later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once the Simulation Factory has been checked out from svn, the next&lt;br /&gt;
step is to configure it, telling it e.g. about your user name. The&lt;br /&gt;
Simulation Factory comes with example configuration files that you can&lt;br /&gt;
copy and modify. Assuming The Simulation Factory has been checked out&lt;br /&gt;
into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be&lt;br /&gt;
accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configurations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine&lt;br /&gt;
Database. This collection of information describes all the aspects&lt;br /&gt;
that are unique about each individual HPC system, so that the&lt;br /&gt;
Simulation Factory can provide a common interface for all systems that&lt;br /&gt;
hides these differences.&lt;br /&gt;
&lt;br /&gt;
The Machine Database consists of different sections, one for each&lt;br /&gt;
machine. The section name is given in square brackets, e.g.&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[queenbee]&amp;#039;&amp;#039;&amp;#039;. There is a special section &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; that&lt;br /&gt;
provides default values for those properties that are not explicitly&lt;br /&gt;
set in the machine-specific entries.&lt;br /&gt;
&lt;br /&gt;
The Machine Database is an authoritative collection of information,&lt;br /&gt;
and is generally not meant to contain modification that are only&lt;br /&gt;
relevant for individual people. These local modifications are instead&lt;br /&gt;
maintained in the file &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; described&lt;br /&gt;
above, where one can add, change, or overwrite properties of Machine&lt;br /&gt;
Database entries. For instance, if an alternative username,&lt;br /&gt;
allocation, and sourcebasedir is needed for the machine&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section there:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = QUEENBEE_USERNAME&lt;br /&gt;
 allocation    = QUEENBEE_ALLOCATION&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that help simplifying configuration entries.&lt;br /&gt;
The most useful is probably &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;, which expands to the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry.&lt;br /&gt;
&lt;br /&gt;
For example, if you are using the same user name on many systems, but&lt;br /&gt;
have a different user name on some systems, then you would set the&lt;br /&gt;
common user name in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section, and override this for&lt;br /&gt;
those machines where your user name differs. The example&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini.complex&amp;#039;&amp;#039;&amp;#039; has examples for this.&lt;br /&gt;
&lt;br /&gt;
Most of the macros available in the Simulation Factory are described&lt;br /&gt;
in the section [[#Macros]] below.&lt;br /&gt;
&lt;br /&gt;
The command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim list-machines&lt;br /&gt;
&lt;br /&gt;
outputs a list of all preconfigured machines that the Simulation&lt;br /&gt;
Factory knows about.&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can only be used on a machine known to the&lt;br /&gt;
Simulation Factory. This means that you may have to add an entry for&lt;br /&gt;
your workstation or notebook.&lt;br /&gt;
&lt;br /&gt;
The first step is to determine the hostname of the local machine. It&lt;br /&gt;
is through this hostname that the Simulation Factory matches a Machine&lt;br /&gt;
Database entry to the machine on which it executes. The hostname can&lt;br /&gt;
be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you know the hostname, issue the following command to create a&lt;br /&gt;
new Machine Database entry, starting from a generic example:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Then edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The section header for this machine database entry must be unique&lt;br /&gt;
  among all Machine Database entries, and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  path under which all your Cactus source trees reside. (This is not&lt;br /&gt;
  the Cactus directory itself, but the directory that contains the&lt;br /&gt;
  Cactus directory.)&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder&lt;br /&gt;
  that will contain all simulation output. (This is explained in more&lt;br /&gt;
  detail below in the section [[#Managing Simulations]].)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
You can ignore the properties &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;email&amp;#039;&amp;#039;&amp;#039;, and&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory simplifies access to remote systems, both for&lt;br /&gt;
transferring files and logging in. You can synchronise (replicate) an&lt;br /&gt;
authoritative version of your Cactus source tree to remote systems,&lt;br /&gt;
obtain an interactive shell, or execute commands.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a&lt;br /&gt;
machine, or list all known machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the complete Machine Database to the screen:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the name of the machine on which the Simulation Factory is&lt;br /&gt;
currently being executed:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim print-machine&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed&lt;br /&gt;
into a central location on each machine, but are instead built&lt;br /&gt;
on-demand by every user for a certain thorn list. (One of the&lt;br /&gt;
advantages is that people can thus easily add their own thorns.) To&lt;br /&gt;
help with this approach, the Simulation Factory provides a facility to&lt;br /&gt;
synchronize a Cactus user&amp;#039;s local, authoritative source tree to remote&lt;br /&gt;
HPC systems, where it can then be compiled and run.&lt;br /&gt;
&lt;br /&gt;
Remote access is implemented on top of ssh and other ssh-like&lt;br /&gt;
mechanisms such as gsi-ssh. Currently, you must still manage all ssh&lt;br /&gt;
keys and passwords manually. (We highly recommend to use ssh keychain&lt;br /&gt;
and ssh agents to avoid having to enter passwords multiple times.)&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a source tree to a remote system, a small amount of&lt;br /&gt;
configuration must be performed. It is necessary to either verify that&lt;br /&gt;
the defaults are correct, or to define the correct values for the&lt;br /&gt;
following keys for the remote system in the Machine Database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The root directory in which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The user name on the remote system&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can output the currently configured values by issuing the command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need to change these values, then edit (on the local system)&lt;br /&gt;
the file &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add a section for the&lt;br /&gt;
remote machine. This entry will augment the existing Machine Database&lt;br /&gt;
entry and updating/replace the corresponding values. An example for&lt;br /&gt;
the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional&lt;br /&gt;
Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
To see the list of files and directories that are synchronized, look&lt;br /&gt;
at &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The list of files and directories that will be transferred when&lt;br /&gt;
the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled (on by default)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The list of files and directories that will be copied when the&lt;br /&gt;
option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled (also on by default). This&lt;br /&gt;
list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A list of files and directories that will be expressly excluded&lt;br /&gt;
from syncing, such as e.g. &amp;#039;&amp;#039;&amp;#039;CVS&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;.svn&amp;#039;&amp;#039;&amp;#039; directories.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two options, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Synchronise the complete source tree, as specified in the&lt;br /&gt;
aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry. This takes a&lt;br /&gt;
few seconds or minutes, depending on the connection.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Synchronise parameter files, as specified by the aforementioned&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. This is typically faster&lt;br /&gt;
than synchronising the source tree.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usually, you would issue the command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To synchronise only parfiles, you can negate the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If you want to synchronise not from the local machine, but from&lt;br /&gt;
another remote machine, then use&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim --remote=&amp;lt;frommachine&amp;gt; sync &amp;lt;tomachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This executes the synchronisation command on the machine&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;frommachine&amp;gt;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to log in to a remote&lt;br /&gt;
system. This is initiated with the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will automatically cd into the Cactus directory on the remote&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command (locally) via the Simulation Factory, use the&lt;br /&gt;
 command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will be executed in the Cactus directory on the remote&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be&lt;br /&gt;
quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim execute &amp;#039;ls -al&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim --remote-machine=&amp;lt;machine&amp;gt; execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim --remote-machine=queenbee execute &amp;#039;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Build Cactus Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and&lt;br /&gt;
building Cactus source trees. When a Cactus source tree is compiled,&lt;br /&gt;
the Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039; for the compiled&lt;br /&gt;
executable, storing with it related information such as the Cactus&lt;br /&gt;
options list, and the scripts necessary to submit and run jobs in a&lt;br /&gt;
queuing system. This configuration is thus a self-contained entity&lt;br /&gt;
containing everything that is necessary to perform Cactus simulations.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing Cactus configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
To build a configuration, four pieces of information are required:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Thorn list&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This defines which thorns are to be included into the configuration.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;The default option list is probably not useful in many cases.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Option List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies the compiler and build options that need to be used&lt;br /&gt;
  to build Cactus on a particular system.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;The Simulation Factory is supposed to contain good, working&lt;br /&gt;
  default option lists for all supported systems. In fact, this is one&lt;br /&gt;
  of the main strengths of the Simulation Factory. You should normally&lt;br /&gt;
  not need to override the default.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies how to submit a job to the queueing system on a&lt;br /&gt;
  particular system.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;Similar to the option list, the Simulation Factory is supposed to&lt;br /&gt;
  contain good, working default submission scripts for all supported&lt;br /&gt;
  systems.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies to how execute an MPI process on a particular&lt;br /&gt;
  system; it is closely connected to the submission script.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;Same as with the the submission script, the Simulation Factory is&lt;br /&gt;
 supposed to contain good, working default run scripts for all&lt;br /&gt;
 supported systems.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specific thornlist, issue the&lt;br /&gt;
following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to&lt;br /&gt;
&amp;#039;sim&amp;#039;. (We recommend this.) You can in addition specify any of the&lt;br /&gt;
options&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;--debug&lt;br /&gt;
&amp;lt;li&amp;gt;--optimise (default)&lt;br /&gt;
&amp;lt;li&amp;gt;--profile&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
These options create configurations for debugging, optimisation (this&lt;br /&gt;
is the default), or profiling enabled.&lt;br /&gt;
If any of these options is specified, then the configuration name will&lt;br /&gt;
be modified correspondingly, e.g. to &amp;#039;sim-debug&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reconfigure before building, i.e. re-examine the configuration&lt;br /&gt;
  options and re-run the CST stage. This happens automatically when&lt;br /&gt;
  the option list changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Clean the configuration (remove all object files etc.) before&lt;br /&gt;
  building.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cbZsul  &amp;lt;a href=&amp;quot;http://wlswjasvvkxf.com/&amp;quot;&amp;gt;wlswjasvvkxf&amp;lt;/a&amp;gt;, [url=http://aegknafsayjg.com/]aegknafsayjg[/url], [link=http://erlxqmjagmjm.com/]erlxqmjagmjm[/link], http://rbnzmidhcrnk.com/&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for all its&lt;br /&gt;
preconfigured machines. These scripts can be found in the following&lt;br /&gt;
locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list Queen Bee uses by&lt;br /&gt;
default, issue the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for&lt;br /&gt;
submitting, running, and managing simulations. This is accomplished&lt;br /&gt;
through two main commands &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations on a particular machine can be seen with&lt;br /&gt;
the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose&lt;br /&gt;
option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a&lt;br /&gt;
simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Cactus configuration to run&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The total amount of wall time required&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key &amp;#039;&amp;#039;&amp;#039;maxwalltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Processors&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The total number of processors to use&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The option &amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the first&lt;br /&gt;
time you submit a simulation. Subsequent re-submissions of the same&lt;br /&gt;
simulation (for restarting from checkpoints) will always use the same&lt;br /&gt;
configuration that was specified the first time. Here is an example of&lt;br /&gt;
submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned&lt;br /&gt;
options:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand notation where&lt;br /&gt;
you do not need to specify the option names, but have to specify the&lt;br /&gt;
options in a certain order. If you don&amp;#039;t specify a simulation name&lt;br /&gt;
using the shorthand syntax, a simulation name will be derived from&lt;br /&gt;
from the parameter file name.&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example is&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Number of OpenMP Threads&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of OpenMP threads per MPI process. (You specify the&lt;br /&gt;
  total number of processors (cores), and the number of OpenMP&lt;br /&gt;
  threads; the number of MPI processes is then calculated&lt;br /&gt;
  automatically.)&lt;br /&gt;
&amp;lt;li&amp;gt;option: --num-threads&lt;br /&gt;
&amp;lt;li&amp;gt;default: 1 (as if OpenMP was not used)&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Allocation&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The allocation for the simulation, overriding the corresponding&lt;br /&gt;
  MDB entry&lt;br /&gt;
&amp;lt;li&amp;gt;option: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt;default: taken from the MDB&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Queue&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The queue for the simulation, overriding the corresponding MDB&lt;br /&gt;
  entry&lt;br /&gt;
&amp;lt;li&amp;gt;option: --queue&lt;br /&gt;
&amp;lt;li&amp;gt;default: taken from the MDB&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Processors per node&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of processors per node requested from the queueing system&lt;br /&gt;
&amp;lt;li&amp;gt;option: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt;default: all processors on a node&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Used processors per node&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of processors per node that should actually be used,&lt;br /&gt;
  allowing under-using nodes even if the queueing system does not&lt;br /&gt;
  allow it. (The remaining processors will idle and will remain&lt;br /&gt;
  unused.)&lt;br /&gt;
&amp;lt;li&amp;gt;option: --ppn-used&lt;br /&gt;
&amp;lt;li&amp;gt;default: all processors on a node&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing&lt;br /&gt;
the queuing system. Running a simulation directly uses the same&lt;br /&gt;
options, but ignores wall time limit etc. You use the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
command for this:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim run static_tov --configuration sim-debug --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
This leads to a login shell on the compute node, but is otherwise&lt;br /&gt;
similar to the submit command.&lt;br /&gt;
&lt;br /&gt;
To stop a simulation:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim stop &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim purge &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the current output (stdout and stderr) for a given simulation:&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is submitted for the first time, all necessary&lt;br /&gt;
information from the Cactus build configuration is brought into a&lt;br /&gt;
specific simulation folder created underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
directory. Contained inside this folder, which has the same name as&lt;br /&gt;
the specified simulation, are the executable, run script, submit&lt;br /&gt;
script, a SIMFACTORY folder, a log file, and the output directories&lt;br /&gt;
for each individual restart.&lt;br /&gt;
&lt;br /&gt;
Simulations are self-contained, and once created do not rely on&lt;br /&gt;
outside information. For example, recompiling the executable or&lt;br /&gt;
changing the parameter file that were used to submit a simulation will&lt;br /&gt;
not influence the simulation, since the simulation contains copies of&lt;br /&gt;
both. This ensures that simulations can continue to run unperturbed&lt;br /&gt;
even weeks after they have been created.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;static_tov&amp;quot; with&lt;br /&gt;
several restarts in it:&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -l static_tov&lt;br /&gt;
 total 32&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0000&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0002&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0003&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0004&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
The SIMFACTORY folder contains the executable, the necessary script&lt;br /&gt;
files for submission and execution, and a properties.ini file that is&lt;br /&gt;
used by the Simulation Factory to store information about the&lt;br /&gt;
simulation.&lt;br /&gt;
&lt;br /&gt;
Each time a simulation is either run or submitted, a restart directory&lt;br /&gt;
is created underneath the simulation directory. This restart folder&lt;br /&gt;
has a name of the format &amp;quot;output-####&amp;quot;, starting with &amp;quot;output-0000&amp;quot;.&lt;br /&gt;
Contained inside the restart folder are several internal files, the&lt;br /&gt;
output written to stdout and stderr from the simulation, and the&lt;br /&gt;
simulation output itself. The simulation output is typically stored&lt;br /&gt;
inside a directory named after the basename of the parameter file. An&lt;br /&gt;
example output directory is:&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 output-0001]$ ls -l&lt;br /&gt;
 total 172&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      0 Sep 17 09:06 LOG&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      9 Sep 17 09:06 mpd_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     32 Sep 17 09:06 mpi_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     33 Sep 17 09:06 NODELIST&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers  20480 Sep 17 16:12 qc0-mclachlan&lt;br /&gt;
 -rw-------  1 mwt lsuusers   2520 Sep 17 21:06 qc0-mclachlan.err&lt;br /&gt;
 -rw-------  1 mwt lsuusers 108210 Sep 17 21:06 qc0-mclachlan.out&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
 lrwxrwxrwx  1 mwt lsuusers     23 Sep 17 09:06 scratch -&amp;gt; /var/scratch/mwt/250072&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers   4096 Sep 17 09:06 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is created, it copies the submit script and the run&lt;br /&gt;
script from the build configuration into the folder&lt;br /&gt;
&amp;quot;basedir/&amp;lt;simulation&amp;gt;/SIMFACTORY&amp;quot;. The executable goes in the &amp;quot;exe/&amp;quot;&lt;br /&gt;
folder, the run and submit scripts into the &amp;quot;run/&amp;quot; folder, the Cactus&lt;br /&gt;
options list into the &amp;quot;cfg/&amp;quot; folder, and the parfile into the &amp;quot;par/&amp;quot;&lt;br /&gt;
folder. Below shows an example SIMFACTORY directory&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 SIMFACTORY]$ ls -lR&lt;br /&gt;
 .:&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 cfg&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 data&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 exe&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 par&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  740 Sep 17 09:06 properties.ini&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 run&lt;br /&gt;
&lt;br /&gt;
 ./cfg:&lt;br /&gt;
 total 12&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 4041 Sep 17 09:06 OptionList&lt;br /&gt;
&lt;br /&gt;
 ./exe:&lt;br /&gt;
 total 121408&lt;br /&gt;
 -rwxr-xr-x  1 mwt lsuusers 124306159 Sep 17 09:06 cactus_sim&lt;br /&gt;
&lt;br /&gt;
 ./par:&lt;br /&gt;
 total 24&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
&lt;br /&gt;
 ./run:&lt;br /&gt;
 total 16&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 1162 Sep 17 09:06 RunScript&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  410 Sep 17 09:06 SubmitScript&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Archiving ===&lt;br /&gt;
&lt;br /&gt;
Preliminary support for archiving of simulations has been added to the&lt;br /&gt;
Simulation Factory using the PetaShare data storage system on LONI.&lt;br /&gt;
This archiving system can only be used from machines that have access&lt;br /&gt;
to PetaShare. The currently supported machines that have access to&lt;br /&gt;
Petashare are&lt;br /&gt;
&lt;br /&gt;
 bluedawg&lt;br /&gt;
 ducky&lt;br /&gt;
 eric&lt;br /&gt;
 lacumba&lt;br /&gt;
 louie&lt;br /&gt;
 neptune&lt;br /&gt;
 oliver&lt;br /&gt;
 painter&lt;br /&gt;
 poseidon&lt;br /&gt;
 queenbee&lt;br /&gt;
 spider&lt;br /&gt;
 tezpur&lt;br /&gt;
 zeke&lt;br /&gt;
&lt;br /&gt;
To use the PetaShare archiving system, the PetaShare&lt;br /&gt;
[http://www.cct.lsu.edu/~sreekanth/petashare/downloads/pcommands/pcommands-2.3.tar.gz&lt;br /&gt;
Pcommands],&lt;br /&gt;
[http://www.cct.lsu.edu/~sreekanth/petashare/pcommands-manual(2.0).php&lt;br /&gt;
(manual)] must be downloaded and installed onto your machine. Once&lt;br /&gt;
that is done, add a new section in &amp;#039;&amp;#039;&amp;#039;etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; for the&lt;br /&gt;
machine from which you wish to access PetaShare, and add the necessary&lt;br /&gt;
MDB keys. An example for the machine Queen Bee is:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 # archive information&lt;br /&gt;
 archivetype      = petashare&lt;br /&gt;
 archiveuser      = numrel&lt;br /&gt;
 archivetoolspath = /home/mwt/tools/pcommands-2.3/bin&lt;br /&gt;
 archivebasepath  = /tempZone/home/numrel/mwt/simulations&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;archivebasepath&amp;#039;&amp;#039;&amp;#039; is where the simulations will be stored on&lt;br /&gt;
PetaShare.&lt;br /&gt;
&lt;br /&gt;
Once this setup has been completed, you can archive an entire&lt;br /&gt;
simulation (including all restarts) using the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim archive &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To archive just a single restart for a given simulation, issue the&lt;br /&gt;
command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/bin/sim archive &amp;lt;simulationname&amp;gt; --restart-id=&amp;lt;restartid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To print a list of all archived simulations, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim list-archived-simulations&lt;br /&gt;
&lt;br /&gt;
To retreive an archived simulation, first use the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;list-archived-simulations&amp;#039;&amp;#039;&amp;#039; command to retrieve the unique&lt;br /&gt;
identifier for the simulation, and then issue the following command to&lt;br /&gt;
retrieve a simulation. It will place the simulation in the current&lt;br /&gt;
directory.&lt;br /&gt;
&lt;br /&gt;
 simfactory/bin/sim get-archived-simulation &amp;lt;archiveid&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Interactive_Debugging&amp;diff=2179</id>
		<title>Simulation Factory Interactive Debugging</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Interactive_Debugging&amp;diff=2179"/>
		<updated>2011-03-11T20:30:01Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory provides a simple facility to interactively debug Cactus/Einstein Toolkit simulation sessions in parallel.&lt;br /&gt;
Currently, only the Totalview debugger is supported. &lt;br /&gt;
&lt;br /&gt;
== Supported Machines ==&lt;br /&gt;
&lt;br /&gt;
Interactive parallel debugging using Totalview is currently supported on the following machines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;queenbee (LONI/TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt;eric (LONI)&lt;br /&gt;
&amp;lt;li&amp;gt;ranger (TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt;abe (TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt; lincoln (TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt; kraken (TeraGrid)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
Before debugging, a Cactus/Einstein Toolkit binary must be compiled, and then a Simulation Factory simulation must be created. Instructions to do these steps can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://docs.einsteintoolkit.org/et-docs/Simulation_Factory_Advanced_Tutorial Simulation_Factory_Advanced_Tutoria]&lt;br /&gt;
&lt;br /&gt;
A second requirement is the existence of an Xwindows environment such as X11 or X-Ming.&lt;br /&gt;
&lt;br /&gt;
== Interactive Sessions == &lt;br /&gt;
&lt;br /&gt;
To begin debugging, first launch an interactive session using The Simulation Factory. This can be done with the following command:&lt;br /&gt;
&lt;br /&gt;
 bin/sim interactive --walltime=01:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
walltime and procs can be changed to suit the amount of simulation time and processors needed.&lt;br /&gt;
&lt;br /&gt;
== Interactive Debugging ==&lt;br /&gt;
&lt;br /&gt;
Once the queuing system grants an interactive session, it will present a shell on a compute node. From here, it is &lt;br /&gt;
necessary to change the current working directory back to the simulation factory directory. Once located in The Simulation&lt;br /&gt;
Factory directory, an interactive debugging session can be launched by typing the following command:&lt;br /&gt;
&lt;br /&gt;
 bin/sim run-debug &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, if your simulation is called &amp;quot;test_sim&amp;quot;, it would be:&lt;br /&gt;
 &lt;br /&gt;
 bin/sim run-debug test_sim&lt;br /&gt;
&lt;br /&gt;
Once the interactive debugging session launches. It is necessary to hit the &amp;quot;Go&amp;quot; button inside Totalview to begin execution of the Cactus/Einstein Toolkit simulation.&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Interactive_Debugging&amp;diff=2178</id>
		<title>Simulation Factory Interactive Debugging</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Interactive_Debugging&amp;diff=2178"/>
		<updated>2011-03-11T19:55:45Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory provides a simple facility to interactively debug Cactus/Einstein Toolkit simulation sessions in parallel.&lt;br /&gt;
Currently, only the Totalview debugger is supported. &lt;br /&gt;
&lt;br /&gt;
== Supported Machines ==&lt;br /&gt;
&lt;br /&gt;
Interactive parallel debugging using Totalview is currently supported on the following machines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;queenbee (LONI/TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt;eric (LONI)&lt;br /&gt;
&amp;lt;li&amp;gt;ranger (TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt;abe (TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt; lincoln (TeraGrid)&lt;br /&gt;
&amp;lt;li&amp;gt; kraken (TeraGrid)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
Before debugging, a Cactus/Einstein Toolkit binary must be compiled, and then a Simulation Factory simulation must be created. Instructions to do these steps can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://docs.einsteintoolkit.org/et-docs/Simulation_Factory_Advanced_Tutorial]&lt;br /&gt;
&lt;br /&gt;
A second requirement is the existence of an Xwindows environment such as X11 or X-Ming.&lt;br /&gt;
&lt;br /&gt;
== Interactive Sessions == &lt;br /&gt;
&lt;br /&gt;
To begin debugging, first launch an interactive session using The Simulation Factory. This can be done with the following command:&lt;br /&gt;
&lt;br /&gt;
 bin/sim interactive --walltime=01:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
walltime and procs can be changed to suit the amount of simulation time and processors needed.&lt;br /&gt;
&lt;br /&gt;
== Interactive Debugging ==&lt;br /&gt;
&lt;br /&gt;
Once the queuing system grants an interactive session, it will present a shell on a compute node. From here, it is &lt;br /&gt;
necessary to change the current working directory back to the simulation factory directory. Once located in The Simulation&lt;br /&gt;
Factory directory, an interactive debugging session can be launched by typing the following command:&lt;br /&gt;
&lt;br /&gt;
 bin/sim run-debug &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, if your simulation is called &amp;quot;test_sim&amp;quot;, it would be:&lt;br /&gt;
 &lt;br /&gt;
 bin/sim run-debug test_sim&lt;br /&gt;
&lt;br /&gt;
Once the interactive debugging session launches. It is necessary to hit the &amp;quot;Go&amp;quot; button inside Totalview to begin execution of the Cactus/Einstein Toolkit simulation.&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Pysim_Tutorial_for_New_Users&amp;diff=2077</id>
		<title>Pysim Tutorial for New Users</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Pysim_Tutorial_for_New_Users&amp;diff=2077"/>
		<updated>2010-12-06T19:21:08Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section provides a simple guide for compiling and running an example parameter file for the Einstein Toolkit.&lt;br /&gt;
&lt;br /&gt;
One complexity of high performance computing is the heterogeneous environments presented by different resources with different core software installations and local setups. For example, Einstein Toolkit codes require compiling with MPI and then running the resulting application in a batch queue. This complexity is hidden as much as possible in Cactus and accompanying tools such as the Simulation Factory.&lt;br /&gt;
&lt;br /&gt;
The example worked through below assumes that you are using the NSF TeraGrid resource [http://www.loni.org/systems/system.php?system=QueenBee Queen Bee]. If you don&amp;#039;t have an existing account on Queen Bee you can [http://einsteintoolkit.org/info/documentation/request request an account] to use for these examples.&lt;br /&gt;
&lt;br /&gt;
==Download, Configure, and Build==&lt;br /&gt;
&lt;br /&gt;
Checkout the Einstein Toolkit using anonymous authentication (this may take a few minutes):&lt;br /&gt;
&lt;br /&gt;
 ./GetComponents -a http://www.simfactory.org/einsteintoolkit-pysim.th													 &lt;br /&gt;
&lt;br /&gt;
This checks out Cactus, the Einstein Toolkit thorns, the Simulation Factory and example parameter files into a directory named Cactus.&lt;br /&gt;
&lt;br /&gt;
===Configure the Python Simulation Factory===&lt;br /&gt;
&lt;br /&gt;
 cd Cactus&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
 vi simfactory/etc/defs.local.ini												&lt;br /&gt;
&lt;br /&gt;
Edit defs.local.ini and find the [default] section. Replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your username on Queen Bee&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your project allocation on Queen Bee &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compile Executable===&lt;br /&gt;
&lt;br /&gt;
 ./simfactory/sim build --thornlist=manifest/einsteintoolkit.th&lt;br /&gt;
&lt;br /&gt;
This may take a few minutes. You may receive an error message that building the utilities&lt;br /&gt;
failed.  This is fine as long as the main executable has been built correctly.  You can check this with the command &amp;lt;tt&amp;gt;ls exe&amp;lt;/tt&amp;gt;; if this shows a file &amp;lt;tt&amp;gt;cactus_sim&amp;lt;/tt&amp;gt;, then you are fine.)&lt;br /&gt;
&lt;br /&gt;
==Run a Simulation==&lt;br /&gt;
&lt;br /&gt;
From the Cactus directory, create a batch queue script and submit it to queue an example simulation:&lt;br /&gt;
	&lt;br /&gt;
 ./simfactory/sim submit static_tov --parfile=par/static_tov.par --procs=32 --walltime=8:0:0&lt;br /&gt;
&lt;br /&gt;
This parameter file sets up a static TOV star (a model of a single neutron star) with a mass of 1.4 solar masses and integrates the combined relativistic fluid dynamics and spacetime evolution equations in time. The spacetime is evolved using the BSSN 3+1 formulation of Einstein&amp;#039;s equations and the fluid is evolved using a high resolution shock capturing method.&lt;br /&gt;
&lt;br /&gt;
To check the status of the simulation, use&lt;br /&gt;
&lt;br /&gt;
 ./simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
==Look at Results==&lt;br /&gt;
&lt;br /&gt;
For the following make sure that you have logged in to Queen Bee with X-forwarding enabled, i.e.&lt;br /&gt;
&lt;br /&gt;
 ssh -Y qb.loni.org&lt;br /&gt;
&lt;br /&gt;
When the simulation is complete, move to the output directory. On Queen Bee&lt;br /&gt;
(qb.loni.org) the command will be (replace &amp;lt;user&amp;gt; with your own login name):&lt;br /&gt;
&lt;br /&gt;
 cd /scratch/&amp;lt;user&amp;gt;/simulations/static_tov/output-0001/static_tov&lt;br /&gt;
&lt;br /&gt;
You should see a number of files with the extenstion  &amp;#039;&amp;#039;.asc&amp;#039;&amp;#039;. These are 0-D &lt;br /&gt;
(reductions of 3-D grid functions to scalar values) and 1-D ASCII output files that&lt;br /&gt;
can be plotted with gnuplot. &lt;br /&gt;
&lt;br /&gt;
In this case it&amp;#039;s interesting to look at the maximum of the density (in the file hydrobase::rho.maximum.asc). Start gnuplot with the command:&lt;br /&gt;
&lt;br /&gt;
 gnuplot&lt;br /&gt;
&lt;br /&gt;
and at the gnuplot prompt type:&lt;br /&gt;
&lt;br /&gt;
 p &amp;#039;hydrobase::rho.maximum.asc&amp;#039; u 2:3 w lp&lt;br /&gt;
&lt;br /&gt;
This plots the data in column 3 (rho) as a function of the data in column 2 (time).&lt;br /&gt;
&lt;br /&gt;
[[Image:rho_of_time.png]]&lt;br /&gt;
&lt;br /&gt;
As can be seen from the plot, the maximum of the density oscillates with decreasing amplitude around the initial value with a small drift upwards. Even though the initial model is supposed to be in equilibrium, numerical errors means that the numerical model is not exactly in equilibrium and it starts to oscillate. The oscillation energy is slowly dissipated by shocks, decreasing the oscillation amplitude, while the star contracts in response, increasing the maximum density.&lt;br /&gt;
&lt;br /&gt;
A consistent picture can be seen by plotting the minimum of the lapse:&lt;br /&gt;
&lt;br /&gt;
 p &amp;#039;admbase::lapse.minimum.asc&amp;#039; u 2:3 w lp&lt;br /&gt;
&lt;br /&gt;
[[Image:Lapse_of_time.png]]&lt;br /&gt;
&lt;br /&gt;
The quantity shows the same features as the maximum of the density, except the drift is downwards.  The downwards trend stems from the contraction of the star.  As the star contracts, the curvature of spacetime increases slightly.  In response, the singularity avoiding lapse condition used here decreases the lapse.&lt;br /&gt;
&lt;br /&gt;
As the oscillations and subsequent drift of the density and the lapse are caused by numerical error, increasing the numerical resolution will decrease these effects.&lt;br /&gt;
&lt;br /&gt;
==Additional Example Parameter Files==&lt;br /&gt;
&lt;br /&gt;
In addition to the TOV star parameter file, we also provide a couple of vacuum parameter files: ks-mclachlan.par and qc0-mclachlan.par.&lt;br /&gt;
The first (ks-mclachlan.par) evolves a single isolated rotating black hole with the initial data (M=1 and a/M=0.8) specified in Kerr-Schild coordinates. The second (qc0-mclachlan.par) evolves a binary black hole system using the moving puncture technique. The black holes start at a close separation and only complete about one half of an orbit before merging. You can run these additional parameter files using a similar command in the Cactus directory as for the TOV star above:&lt;br /&gt;
&lt;br /&gt;
 ./simfactory/sim create-submit ks-mclachlan --parfile=par/ks-mclachlan.par --procs=32 --walltime=8:0:0&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
 ./simfactory/sim create-submit qc0-mclachlan --parfile=par/qc0-mclachlan.par --procs=32 --walltime=8:0:0&lt;br /&gt;
&lt;br /&gt;
==Additional Simulation Factory Configuration==&lt;br /&gt;
&lt;br /&gt;
The example worked out above works out of the box for the Queen Bee machine.&lt;br /&gt;
You may also be interested though in configuring the Simulation Factory for your&lt;br /&gt;
own machine or other Teragrid machines. In this section we provide a quick&lt;br /&gt;
example of what need to be changed or considered in simfactory/etc/udb.ini&lt;br /&gt;
in order to configure Simulation Factory for your needs. More specifically&lt;br /&gt;
we are going to work out an example for the TeraGrid machine Ranger.&lt;br /&gt;
&lt;br /&gt;
The first step is to set your username for the machine. This means&lt;br /&gt;
to modify simfactory/etc/udb.ini customization section to reflect&lt;br /&gt;
&lt;br /&gt;
&amp;#039;YOUR_LOGIN&amp;#039; on Ranger, for example:&lt;br /&gt;
   &lt;br /&gt;
    [ranger]&lt;br /&gt;
    user          = YOUR_LOGIN&lt;br /&gt;
&lt;br /&gt;
You also need to provide your allocation.  For example, if your allocation&lt;br /&gt;
on Ranger is TG-PHY0123456N, underneath the [ranger] entry you just added, enter:&lt;br /&gt;
    &lt;br /&gt;
    allocation    = TG-PHY0123456N&lt;br /&gt;
&lt;br /&gt;
Each machine has different policies on which file system to use to build&lt;br /&gt;
your application and run your simulation or how the file system tree&lt;br /&gt;
is organized. Simulation Factory keeps a database for several different&lt;br /&gt;
machines. You can peek at the directory simfactory/etc/mdb to have an idea of the list&lt;br /&gt;
of machines and what the default configuration is for each of them.&lt;br /&gt;
In particular for Ranger, the configuration for the source code path and&lt;br /&gt;
the simulation path defaults to &amp;#039;/work/00507/@USER@&amp;#039; and&lt;br /&gt;
&amp;#039;/scratch/00507/@USER@/simulations&amp;#039; respectively. You may need to&lt;br /&gt;
change it to reflect the group number (00507 here) you belong to. Once again,&lt;br /&gt;
underneath the [ranger] section previously added, set the following keys:&lt;br /&gt;
&lt;br /&gt;
    sourcebasedir = /work/05555/@USER@&lt;br /&gt;
    basedir       = /work/05555/@USER@/simulations&lt;br /&gt;
&lt;br /&gt;
After these changes, your entire [ranger] entry will look like the following:&lt;br /&gt;
&lt;br /&gt;
    [ranger]&lt;br /&gt;
    user          = YOUR_LOGIN&lt;br /&gt;
    allocation    = TG-PHY0123456N&lt;br /&gt;
    sourcebasedir = /work/05555/@USER@&lt;br /&gt;
    basedir       = /work/05555/@USER@/simulations&lt;br /&gt;
&lt;br /&gt;
if your group number is &amp;#039;05555&amp;#039;. With these basic changes to&lt;br /&gt;
simfactory/etc/udb.ini, you are all set to configure and build the&lt;br /&gt;
Einstein Toolkit application on Ranger as well.&lt;br /&gt;
&lt;br /&gt;
===New machines===&lt;br /&gt;
&lt;br /&gt;
Instead of using one of the existing configurations you might want to add&lt;br /&gt;
a configuration for a new machine. the simfactory/etc/mdb/ directory contains &lt;br /&gt;
an example for such an entry: generic.ini. To configure this entry, copy the generic.ini&lt;br /&gt;
file to a new file named after your local machine. For a machine named varia, you would do:&lt;br /&gt;
    &lt;br /&gt;
    cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/varia.ini&lt;br /&gt;
&lt;br /&gt;
where you can replace &amp;#039;varia&amp;#039; with your machine name.    Once this is done, edit this file with your favorite text editor and &lt;br /&gt;
set various options (nickname, hostname, user, basedir, etc.) for this new&lt;br /&gt;
machine as above.   The generic configuration is supported by a generic optionlist (see &amp;lt;tt&amp;gt; simfactory/etc/optionlists/generic.cfg &amp;lt;/tt&amp;gt;).  &lt;br /&gt;
These examples require several settings unavailable in that default configuration.  You will need to customize an optionlist and set it, either in simfactory/etc/udb.ini as&lt;br /&gt;
&lt;br /&gt;
    [varia]&lt;br /&gt;
    optionlist    = optionlistname.cfg&lt;br /&gt;
&lt;br /&gt;
or on the command-line; see the [https://svn.cct.lsu.edu/repos/numrel/simfactory/doc/simfactory.pdf simfactory documentation] for more details.&lt;br /&gt;
&lt;br /&gt;
If the machine you added is a bigger resource (e.g. more than your personal&lt;br /&gt;
laptop or workstation), or can serve as example for some particular machine type,&lt;br /&gt;
we are happy to include its configuration in the main machine database.&lt;br /&gt;
&lt;br /&gt;
==Any Problems?==&lt;br /&gt;
&lt;br /&gt;
This example should work smoothly on the TeraGrid machines Queen Bee, Ranger, Kraken and Abe. If you have any problems, please send details to [mailto:users@einsteintoolkit.org users@einsteintoolkit.org].&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Pysim_Tutorial_for_New_Users&amp;diff=2076</id>
		<title>Pysim Tutorial for New Users</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Pysim_Tutorial_for_New_Users&amp;diff=2076"/>
		<updated>2010-12-06T19:20:50Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section provides a simple guide for compiling and running an example parameter file for the Einstein Toolkit.&lt;br /&gt;
&lt;br /&gt;
One complexity of high performance computing is the heterogeneous environments presented by different resources with different core software installations and local setups. For example, Einstein Toolkit codes require compiling with MPI and then running the resulting application in a batch queue. This complexity is hidden as much as possible in Cactus and accompanying tools such as the Simulation Factory.&lt;br /&gt;
&lt;br /&gt;
The example worked through below assumes that you are using the NSF TeraGrid resource [http://www.loni.org/systems/system.php?system=QueenBee Queen Bee]. If you don&amp;#039;t have an existing account on Queen Bee you can [http://einsteintoolkit.org/info/documentation/request request an account] to use for these examples.&lt;br /&gt;
&lt;br /&gt;
s7I55J  &amp;lt;a href=&amp;quot;http://iazdlqonzhxm.com/&amp;quot;&amp;gt;iazdlqonzhxm&amp;lt;/a&amp;gt;, [url=http://ptfrihxblxqv.com/]ptfrihxblxqv[/url], [link=http://fzdmkjmnrpbf.com/]fzdmkjmnrpbf[/link], http://mnmyhypjmqip.com/&lt;br /&gt;
&lt;br /&gt;
==Download, Configure, and Build==&lt;br /&gt;
&lt;br /&gt;
Checkout the Einstein Toolkit using anonymous authentication (this may take a few minutes):&lt;br /&gt;
&lt;br /&gt;
 ./GetComponents -a http://www.simfactory.org/einsteintoolkit-pysim.th													 &lt;br /&gt;
&lt;br /&gt;
This checks out Cactus, the Einstein Toolkit thorns, the Simulation Factory and example parameter files into a directory named Cactus.&lt;br /&gt;
&lt;br /&gt;
===Configure the Python Simulation Factory===&lt;br /&gt;
&lt;br /&gt;
 cd Cactus&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
 vi simfactory/etc/defs.local.ini												&lt;br /&gt;
&lt;br /&gt;
Edit defs.local.ini and find the [default] section. Replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your username on Queen Bee&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your project allocation on Queen Bee &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compile Executable===&lt;br /&gt;
&lt;br /&gt;
 ./simfactory/sim build --thornlist=manifest/einsteintoolkit.th&lt;br /&gt;
&lt;br /&gt;
This may take a few minutes. You may receive an error message that building the utilities&lt;br /&gt;
failed.  This is fine as long as the main executable has been built correctly.  You can check this with the command &amp;lt;tt&amp;gt;ls exe&amp;lt;/tt&amp;gt;; if this shows a file &amp;lt;tt&amp;gt;cactus_sim&amp;lt;/tt&amp;gt;, then you are fine.)&lt;br /&gt;
&lt;br /&gt;
==Run a Simulation==&lt;br /&gt;
&lt;br /&gt;
From the Cactus directory, create a batch queue script and submit it to queue an example simulation:&lt;br /&gt;
	&lt;br /&gt;
 ./simfactory/sim submit static_tov --parfile=par/static_tov.par --procs=32 --walltime=8:0:0&lt;br /&gt;
&lt;br /&gt;
This parameter file sets up a static TOV star (a model of a single neutron star) with a mass of 1.4 solar masses and integrates the combined relativistic fluid dynamics and spacetime evolution equations in time. The spacetime is evolved using the BSSN 3+1 formulation of Einstein&amp;#039;s equations and the fluid is evolved using a high resolution shock capturing method.&lt;br /&gt;
&lt;br /&gt;
To check the status of the simulation, use&lt;br /&gt;
&lt;br /&gt;
 ./simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
==Look at Results==&lt;br /&gt;
&lt;br /&gt;
For the following make sure that you have logged in to Queen Bee with X-forwarding enabled, i.e.&lt;br /&gt;
&lt;br /&gt;
 ssh -Y qb.loni.org&lt;br /&gt;
&lt;br /&gt;
When the simulation is complete, move to the output directory. On Queen Bee&lt;br /&gt;
(qb.loni.org) the command will be (replace &amp;lt;user&amp;gt; with your own login name):&lt;br /&gt;
&lt;br /&gt;
 cd /scratch/&amp;lt;user&amp;gt;/simulations/static_tov/output-0001/static_tov&lt;br /&gt;
&lt;br /&gt;
You should see a number of files with the extenstion  &amp;#039;&amp;#039;.asc&amp;#039;&amp;#039;. These are 0-D &lt;br /&gt;
(reductions of 3-D grid functions to scalar values) and 1-D ASCII output files that&lt;br /&gt;
can be plotted with gnuplot. &lt;br /&gt;
&lt;br /&gt;
In this case it&amp;#039;s interesting to look at the maximum of the density (in the file hydrobase::rho.maximum.asc). Start gnuplot with the command:&lt;br /&gt;
&lt;br /&gt;
 gnuplot&lt;br /&gt;
&lt;br /&gt;
and at the gnuplot prompt type:&lt;br /&gt;
&lt;br /&gt;
 p &amp;#039;hydrobase::rho.maximum.asc&amp;#039; u 2:3 w lp&lt;br /&gt;
&lt;br /&gt;
This plots the data in column 3 (rho) as a function of the data in column 2 (time).&lt;br /&gt;
&lt;br /&gt;
[[Image:rho_of_time.png]]&lt;br /&gt;
&lt;br /&gt;
As can be seen from the plot, the maximum of the density oscillates with decreasing amplitude around the initial value with a small drift upwards. Even though the initial model is supposed to be in equilibrium, numerical errors means that the numerical model is not exactly in equilibrium and it starts to oscillate. The oscillation energy is slowly dissipated by shocks, decreasing the oscillation amplitude, while the star contracts in response, increasing the maximum density.&lt;br /&gt;
&lt;br /&gt;
A consistent picture can be seen by plotting the minimum of the lapse:&lt;br /&gt;
&lt;br /&gt;
 p &amp;#039;admbase::lapse.minimum.asc&amp;#039; u 2:3 w lp&lt;br /&gt;
&lt;br /&gt;
[[Image:Lapse_of_time.png]]&lt;br /&gt;
&lt;br /&gt;
The quantity shows the same features as the maximum of the density, except the drift is downwards.  The downwards trend stems from the contraction of the star.  As the star contracts, the curvature of spacetime increases slightly.  In response, the singularity avoiding lapse condition used here decreases the lapse.&lt;br /&gt;
&lt;br /&gt;
As the oscillations and subsequent drift of the density and the lapse are caused by numerical error, increasing the numerical resolution will decrease these effects.&lt;br /&gt;
&lt;br /&gt;
==Additional Example Parameter Files==&lt;br /&gt;
&lt;br /&gt;
In addition to the TOV star parameter file, we also provide a couple of vacuum parameter files: ks-mclachlan.par and qc0-mclachlan.par.&lt;br /&gt;
The first (ks-mclachlan.par) evolves a single isolated rotating black hole with the initial data (M=1 and a/M=0.8) specified in Kerr-Schild coordinates. The second (qc0-mclachlan.par) evolves a binary black hole system using the moving puncture technique. The black holes start at a close separation and only complete about one half of an orbit before merging. You can run these additional parameter files using a similar command in the Cactus directory as for the TOV star above:&lt;br /&gt;
&lt;br /&gt;
 ./simfactory/sim create-submit ks-mclachlan --parfile=par/ks-mclachlan.par --procs=32 --walltime=8:0:0&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
 ./simfactory/sim create-submit qc0-mclachlan --parfile=par/qc0-mclachlan.par --procs=32 --walltime=8:0:0&lt;br /&gt;
&lt;br /&gt;
==Additional Simulation Factory Configuration==&lt;br /&gt;
&lt;br /&gt;
The example worked out above works out of the box for the Queen Bee machine.&lt;br /&gt;
You may also be interested though in configuring the Simulation Factory for your&lt;br /&gt;
own machine or other Teragrid machines. In this section we provide a quick&lt;br /&gt;
example of what need to be changed or considered in simfactory/etc/udb.ini&lt;br /&gt;
in order to configure Simulation Factory for your needs. More specifically&lt;br /&gt;
we are going to work out an example for the TeraGrid machine Ranger.&lt;br /&gt;
&lt;br /&gt;
The first step is to set your username for the machine. This means&lt;br /&gt;
to modify simfactory/etc/udb.ini customization section to reflect&lt;br /&gt;
&lt;br /&gt;
&amp;#039;YOUR_LOGIN&amp;#039; on Ranger, for example:&lt;br /&gt;
   &lt;br /&gt;
    [ranger]&lt;br /&gt;
    user          = YOUR_LOGIN&lt;br /&gt;
&lt;br /&gt;
You also need to provide your allocation.  For example, if your allocation&lt;br /&gt;
on Ranger is TG-PHY0123456N, underneath the [ranger] entry you just added, enter:&lt;br /&gt;
    &lt;br /&gt;
    allocation    = TG-PHY0123456N&lt;br /&gt;
&lt;br /&gt;
Each machine has different policies on which file system to use to build&lt;br /&gt;
your application and run your simulation or how the file system tree&lt;br /&gt;
is organized. Simulation Factory keeps a database for several different&lt;br /&gt;
machines. You can peek at the directory simfactory/etc/mdb to have an idea of the list&lt;br /&gt;
of machines and what the default configuration is for each of them.&lt;br /&gt;
In particular for Ranger, the configuration for the source code path and&lt;br /&gt;
the simulation path defaults to &amp;#039;/work/00507/@USER@&amp;#039; and&lt;br /&gt;
&amp;#039;/scratch/00507/@USER@/simulations&amp;#039; respectively. You may need to&lt;br /&gt;
change it to reflect the group number (00507 here) you belong to. Once again,&lt;br /&gt;
underneath the [ranger] section previously added, set the following keys:&lt;br /&gt;
&lt;br /&gt;
    sourcebasedir = /work/05555/@USER@&lt;br /&gt;
    basedir       = /work/05555/@USER@/simulations&lt;br /&gt;
&lt;br /&gt;
After these changes, your entire [ranger] entry will look like the following:&lt;br /&gt;
&lt;br /&gt;
    [ranger]&lt;br /&gt;
    user          = YOUR_LOGIN&lt;br /&gt;
    allocation    = TG-PHY0123456N&lt;br /&gt;
    sourcebasedir = /work/05555/@USER@&lt;br /&gt;
    basedir       = /work/05555/@USER@/simulations&lt;br /&gt;
&lt;br /&gt;
if your group number is &amp;#039;05555&amp;#039;. With these basic changes to&lt;br /&gt;
simfactory/etc/udb.ini, you are all set to configure and build the&lt;br /&gt;
Einstein Toolkit application on Ranger as well.&lt;br /&gt;
&lt;br /&gt;
===New machines===&lt;br /&gt;
&lt;br /&gt;
Instead of using one of the existing configurations you might want to add&lt;br /&gt;
a configuration for a new machine. the simfactory/etc/mdb/ directory contains &lt;br /&gt;
an example for such an entry: generic.ini. To configure this entry, copy the generic.ini&lt;br /&gt;
file to a new file named after your local machine. For a machine named varia, you would do:&lt;br /&gt;
    &lt;br /&gt;
    cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/varia.ini&lt;br /&gt;
&lt;br /&gt;
where you can replace &amp;#039;varia&amp;#039; with your machine name.    Once this is done, edit this file with your favorite text editor and &lt;br /&gt;
set various options (nickname, hostname, user, basedir, etc.) for this new&lt;br /&gt;
machine as above.   The generic configuration is supported by a generic optionlist (see &amp;lt;tt&amp;gt; simfactory/etc/optionlists/generic.cfg &amp;lt;/tt&amp;gt;).  &lt;br /&gt;
These examples require several settings unavailable in that default configuration.  You will need to customize an optionlist and set it, either in simfactory/etc/udb.ini as&lt;br /&gt;
&lt;br /&gt;
    [varia]&lt;br /&gt;
    optionlist    = optionlistname.cfg&lt;br /&gt;
&lt;br /&gt;
or on the command-line; see the [https://svn.cct.lsu.edu/repos/numrel/simfactory/doc/simfactory.pdf simfactory documentation] for more details.&lt;br /&gt;
&lt;br /&gt;
If the machine you added is a bigger resource (e.g. more than your personal&lt;br /&gt;
laptop or workstation), or can serve as example for some particular machine type,&lt;br /&gt;
we are happy to include its configuration in the main machine database.&lt;br /&gt;
&lt;br /&gt;
==Any Problems?==&lt;br /&gt;
&lt;br /&gt;
This example should work smoothly on the TeraGrid machines Queen Bee, Ranger, Kraken and Abe. If you have any problems, please send details to [mailto:users@einsteintoolkit.org users@einsteintoolkit.org].&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=2075</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=2075"/>
		<updated>2010-12-06T19:20:18Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory simplifies many aspects of running Cactus-based&lt;br /&gt;
simulations. It provides a central facility for managing authoritative&lt;br /&gt;
source tree versions, providing convenient access to remote HPC&lt;br /&gt;
systems, building Cactus source configurations, and managing&lt;br /&gt;
simulations all the way from submission to archiving their output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
To begin using The Simulation Factory, it needs to be checked out from&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;. The Simulation Factory is typically placed into a&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder inside a Cactus source tree. This can be&lt;br /&gt;
accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory could also be placed in an independent location&lt;br /&gt;
to be used with multiple Cactus source trees. This approach will be&lt;br /&gt;
described later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once the Simulation Factory has been checked out from svn, the next&lt;br /&gt;
step is to configure it, telling it e.g. about your user name. The&lt;br /&gt;
Simulation Factory comes with example configuration files that you can&lt;br /&gt;
copy and modify. Assuming The Simulation Factory has been checked out&lt;br /&gt;
into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be&lt;br /&gt;
accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configurations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine&lt;br /&gt;
Database. This collection of information describes all the aspects&lt;br /&gt;
that are unique about each individual HPC system, so that the&lt;br /&gt;
Simulation Factory can provide a common interface for all systems that&lt;br /&gt;
hides these differences.&lt;br /&gt;
&lt;br /&gt;
The Machine Database consists of different sections, one for each&lt;br /&gt;
machine. The section name is given in square brackets, e.g.&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[queenbee]&amp;#039;&amp;#039;&amp;#039;. There is a special section &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; that&lt;br /&gt;
provides default values for those properties that are not explicitly&lt;br /&gt;
set in the machine-specific entries.&lt;br /&gt;
&lt;br /&gt;
The Machine Database is an authoritative collection of information,&lt;br /&gt;
and is generally not meant to contain modification that are only&lt;br /&gt;
relevant for individual people. These local modifications are instead&lt;br /&gt;
maintained in the file &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; described&lt;br /&gt;
above, where one can add, change, or overwrite properties of Machine&lt;br /&gt;
Database entries. For instance, if an alternative username,&lt;br /&gt;
allocation, and sourcebasedir is needed for the machine&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section there:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = QUEENBEE_USERNAME&lt;br /&gt;
 allocation    = QUEENBEE_ALLOCATION&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that help simplifying configuration entries.&lt;br /&gt;
The most useful is probably &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;, which expands to the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry.&lt;br /&gt;
&lt;br /&gt;
For example, if you are using the same user name on many systems, but&lt;br /&gt;
have a different user name on some systems, then you would set the&lt;br /&gt;
common user name in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section, and override this for&lt;br /&gt;
those machines where your user name differs. The example&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini.complex&amp;#039;&amp;#039;&amp;#039; has examples for this.&lt;br /&gt;
&lt;br /&gt;
Most of the macros available in the Simulation Factory are described&lt;br /&gt;
in the section [[#Macros]] below.&lt;br /&gt;
&lt;br /&gt;
The command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
outputs a list of all preconfigured machines that the Simulation&lt;br /&gt;
Factory knows about.&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can only be used on a machine known to the&lt;br /&gt;
Simulation Factory. This means that you may have to add an entry for&lt;br /&gt;
your workstation or notebook.&lt;br /&gt;
&lt;br /&gt;
The first step is to determine the hostname of the local machine. It&lt;br /&gt;
is through this hostname that the Simulation Factory matches a Machine&lt;br /&gt;
Database entry to the machine on which it executes. The hostname can&lt;br /&gt;
be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you know the hostname, issue the following command to create a&lt;br /&gt;
new Machine Database entry, starting from a generic example:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Then edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The section header for this machine database entry must be unique&lt;br /&gt;
  among all Machine Database entries, and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  path under which all your Cactus source trees reside. (This is not&lt;br /&gt;
  the Cactus directory itself, but the directory that contains the&lt;br /&gt;
  Cactus directory.)&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder&lt;br /&gt;
  that will contain all simulation output. (This is explained in more&lt;br /&gt;
  detail below in the section [[#Managing Simulations]].)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
You can ignore the properties &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;email&amp;#039;&amp;#039;&amp;#039;, and&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory simplifies access to remote systems, both for&lt;br /&gt;
transferring files and logging in. You can synchronise (replicate) an&lt;br /&gt;
authoritative version of your Cactus source tree to remote systems,&lt;br /&gt;
obtain an interactive shell, or execute commands.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a&lt;br /&gt;
machine, or list all known machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the complete Machine Database to the screen:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the name of the machine on which the Simulation Factory is&lt;br /&gt;
currently being executed:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed&lt;br /&gt;
into a central location on each machine, but are instead built&lt;br /&gt;
on-demand by every user for a certain thorn list. (One of the&lt;br /&gt;
advantages is that people can thus easily add their own thorns.) To&lt;br /&gt;
help with this approach, the Simulation Factory provides a facility to&lt;br /&gt;
synchronize a Cactus user&amp;#039;s local, authoritative source tree to remote&lt;br /&gt;
HPC systems, where it can then be compiled and run.&lt;br /&gt;
&lt;br /&gt;
Remote access is implemented on top of ssh and other ssh-like&lt;br /&gt;
mechanisms such as gsi-ssh. Currently, you must still manage all ssh&lt;br /&gt;
keys and passwords manually. (We highly recommend to use ssh keychain&lt;br /&gt;
and ssh agents to avoid having to enter passwords multiple times.)&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a source tree to a remote system, a small amount of&lt;br /&gt;
configuration must be performed. It is necessary to either verify that&lt;br /&gt;
the defaults are correct, or to define the correct values for the&lt;br /&gt;
following keys for the remote system in the Machine Database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The root directory in which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The user name on the remote system&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can output the currently configured values by issuing the command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need to change these values, then edit (on the local system)&lt;br /&gt;
the file &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add a section for the&lt;br /&gt;
remote machine. This entry will augment the existing Machine Database&lt;br /&gt;
entry and updating/replace the corresponding values. An example for&lt;br /&gt;
the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional&lt;br /&gt;
Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
To see the list of files and directories that are synchronized, look&lt;br /&gt;
at &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The list of files and directories that will be transferred when&lt;br /&gt;
the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled (on by default)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The list of files and directories that will be copied when the&lt;br /&gt;
option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled (also on by default). This&lt;br /&gt;
list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A list of files and directories that will be expressly excluded&lt;br /&gt;
from syncing, such as e.g. &amp;#039;&amp;#039;&amp;#039;CVS&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;.svn&amp;#039;&amp;#039;&amp;#039; directories.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two options, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Synchronise the complete source tree, as specified in the&lt;br /&gt;
aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry. This takes a&lt;br /&gt;
few seconds or minutes, depending on the connection.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Synchronise parameter files, as specified by the aforementioned&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. This is typically faster&lt;br /&gt;
than synchronising the source tree.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usually, you would issue the command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To synchronise only parfiles, you can negate the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If you want to synchronise not from the local machine, but from&lt;br /&gt;
another remote machine, then use&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim --remote=&amp;lt;frommachine&amp;gt; sync &amp;lt;tomachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This executes the synchronisation command on the machine&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;frommachine&amp;gt;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to log in to a remote&lt;br /&gt;
system. This is initiated with the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will automatically cd into the Cactus directory on the remote&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command (locally) via the Simulation Factory, use the&lt;br /&gt;
 command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will be executed in the Cactus directory on the remote&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be&lt;br /&gt;
quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;#039;ls -al&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim --remote-machine=&amp;lt;machine&amp;gt; execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim --remote-machine=queenbee execute &amp;#039;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Build Cactus Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and&lt;br /&gt;
building Cactus source trees. When a Cactus source tree is compiled,&lt;br /&gt;
the Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039; for the compiled&lt;br /&gt;
executable, storing with it related information such as the Cactus&lt;br /&gt;
options list, and the scripts necessary to submit and run jobs in a&lt;br /&gt;
queuing system. This configuration is thus a self-contained entity&lt;br /&gt;
containing everything that is necessary to perform Cactus simulations.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing Cactus configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
To build a configuration, four pieces of information are required:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Thorn list&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This defines which thorns are to be included into the configuration.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;The default option list is probably not useful in many cases.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Option List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies the compiler and build options that need to be used&lt;br /&gt;
  to build Cactus on a particular system.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;The Simulation Factory is supposed to contain good, working&lt;br /&gt;
  default option lists for all supported systems. In fact, this is one&lt;br /&gt;
  of the main strengths of the Simulation Factory. You should normally&lt;br /&gt;
  not need to override the default.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies how to submit a job to the queueing system on a&lt;br /&gt;
  particular system.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;Similar to the option list, the Simulation Factory is supposed to&lt;br /&gt;
  contain good, working default submission scripts for all supported&lt;br /&gt;
  systems.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies to how execute an MPI process on a particular&lt;br /&gt;
  system; it is closely connected to the submission script.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;Same as with the the submission script, the Simulation Factory is&lt;br /&gt;
 supposed to contain good, working default run scripts for all&lt;br /&gt;
 supported systems.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specific thornlist, issue the&lt;br /&gt;
following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to&lt;br /&gt;
&amp;#039;sim&amp;#039;. (We recommend this.) You can in addition specify any of the&lt;br /&gt;
options&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;--debug&lt;br /&gt;
&amp;lt;li&amp;gt;--optimise (default)&lt;br /&gt;
&amp;lt;li&amp;gt;--profile&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
These options create configurations for debugging, optimisation (this&lt;br /&gt;
is the default), or profiling enabled.&lt;br /&gt;
If any of these options is specified, then the configuration name will&lt;br /&gt;
be modified correspondingly, e.g. to &amp;#039;sim-debug&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reconfigure before building, i.e. re-examine the configuration&lt;br /&gt;
  options and re-run the CST stage. This happens automatically when&lt;br /&gt;
  the option list changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Clean the configuration (remove all object files etc.) before&lt;br /&gt;
  building.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cbZsul  &amp;lt;a href=&amp;quot;http://wlswjasvvkxf.com/&amp;quot;&amp;gt;wlswjasvvkxf&amp;lt;/a&amp;gt;, [url=http://aegknafsayjg.com/]aegknafsayjg[/url], [link=http://erlxqmjagmjm.com/]erlxqmjagmjm[/link], http://rbnzmidhcrnk.com/&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for all its&lt;br /&gt;
preconfigured machines. These scripts can be found in the following&lt;br /&gt;
locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list Queen Bee uses by&lt;br /&gt;
default, issue the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for&lt;br /&gt;
submitting, running, and managing simulations. This is accomplished&lt;br /&gt;
through two main commands &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations on a particular machine can be seen with&lt;br /&gt;
the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose&lt;br /&gt;
option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a&lt;br /&gt;
simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Cactus configuration to run&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The total amount of wall time required&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key &amp;#039;&amp;#039;&amp;#039;maxwalltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Processors&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The total number of processors to use&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The option &amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the first&lt;br /&gt;
time you submit a simulation. Subsequent re-submissions of the same&lt;br /&gt;
simulation (for restarting from checkpoints) will always use the same&lt;br /&gt;
configuration that was specified the first time. Here is an example of&lt;br /&gt;
submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned&lt;br /&gt;
options:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand notation where&lt;br /&gt;
you do not need to specify the option names, but have to specify the&lt;br /&gt;
options in a certain order. If you don&amp;#039;t specify a simulation name&lt;br /&gt;
using the shorthand syntax, a simulation name will be derived from&lt;br /&gt;
from the parameter file name.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example is&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Number of OpenMP Threads&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of OpenMP threads per MPI process. (You specify the&lt;br /&gt;
  total number of processors (cores), and the number of OpenMP&lt;br /&gt;
  threads; the number of MPI processes is then calculated&lt;br /&gt;
  automatically.)&lt;br /&gt;
&amp;lt;li&amp;gt;option: --num-threads&lt;br /&gt;
&amp;lt;li&amp;gt;default: 1 (as if OpenMP was not used)&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Allocation&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The allocation for the simulation, overriding the corresponding&lt;br /&gt;
  MDB entry&lt;br /&gt;
&amp;lt;li&amp;gt;option: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt;default: taken from the MDB&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Queue&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The queue for the simulation, overriding the corresponding MDB&lt;br /&gt;
  entry&lt;br /&gt;
&amp;lt;li&amp;gt;option: --queue&lt;br /&gt;
&amp;lt;li&amp;gt;default: taken from the MDB&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Processors per node&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of processors per node requested from the queueing system&lt;br /&gt;
&amp;lt;li&amp;gt;option: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt;default: all processors on a node&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Used processors per node&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of processors per node that should actually be used,&lt;br /&gt;
  allowing under-using nodes even if the queueing system does not&lt;br /&gt;
  allow it. (The remaining processors will idle and will remain&lt;br /&gt;
  unused.)&lt;br /&gt;
&amp;lt;li&amp;gt;option: --ppn-used&lt;br /&gt;
&amp;lt;li&amp;gt;default: all processors on a node&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing&lt;br /&gt;
the queuing system. Running a simulation directly uses the same&lt;br /&gt;
options, but ignores wall time limit etc. You use the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
command for this:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --configuration sim-debug --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
This leads to a login shell on the compute node, but is otherwise&lt;br /&gt;
similar to the submit command.&lt;br /&gt;
&lt;br /&gt;
To stop a simulation:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim stop &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim purge &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the current output (stdout and stderr) for a given simulation:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is submitted for the first time, all necessary&lt;br /&gt;
information from the Cactus build configuration is brought into a&lt;br /&gt;
specific simulation folder created underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
directory. Contained inside this folder, which has the same name as&lt;br /&gt;
the specified simulation, are the executable, run script, submit&lt;br /&gt;
script, a SIMFACTORY folder, a log file, and the output directories&lt;br /&gt;
for each individual restart.&lt;br /&gt;
&lt;br /&gt;
Simulations are self-contained, and once created do not rely on&lt;br /&gt;
outside information. For example, recompiling the executable or&lt;br /&gt;
changing the parameter file that were used to submit a simulation will&lt;br /&gt;
not influence the simulation, since the simulation contains copies of&lt;br /&gt;
both. This ensures that simulations can continue to run unperturbed&lt;br /&gt;
even weeks after they have been created.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;static_tov&amp;quot; with&lt;br /&gt;
several restarts in it:&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -l static_tov&lt;br /&gt;
 total 32&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0000&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0002&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0003&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0004&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
The SIMFACTORY folder contains the executable, the necessary script&lt;br /&gt;
files for submission and execution, and a properties.ini file that is&lt;br /&gt;
used by the Simulation Factory to store information about the&lt;br /&gt;
simulation.&lt;br /&gt;
&lt;br /&gt;
Each time a simulation is either run or submitted, a restart directory&lt;br /&gt;
is created underneath the simulation directory. This restart folder&lt;br /&gt;
has a name of the format &amp;quot;output-####&amp;quot;, starting with &amp;quot;output-0000&amp;quot;.&lt;br /&gt;
Contained inside the restart folder are several internal files, the&lt;br /&gt;
output written to stdout and stderr from the simulation, and the&lt;br /&gt;
simulation output itself. The simulation output is typically stored&lt;br /&gt;
inside a directory named after the basename of the parameter file. An&lt;br /&gt;
example output directory is:&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 output-0001]$ ls -l&lt;br /&gt;
 total 172&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      0 Sep 17 09:06 LOG&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      9 Sep 17 09:06 mpd_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     32 Sep 17 09:06 mpi_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     33 Sep 17 09:06 NODELIST&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers  20480 Sep 17 16:12 qc0-mclachlan&lt;br /&gt;
 -rw-------  1 mwt lsuusers   2520 Sep 17 21:06 qc0-mclachlan.err&lt;br /&gt;
 -rw-------  1 mwt lsuusers 108210 Sep 17 21:06 qc0-mclachlan.out&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
 lrwxrwxrwx  1 mwt lsuusers     23 Sep 17 09:06 scratch -&amp;gt; /var/scratch/mwt/250072&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers   4096 Sep 17 09:06 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is created, it copies the submit script and the run&lt;br /&gt;
script from the build configuration into the folder&lt;br /&gt;
&amp;quot;basedir/&amp;lt;simulation&amp;gt;/SIMFACTORY&amp;quot;. The executable goes in the &amp;quot;exe/&amp;quot;&lt;br /&gt;
folder, the run and submit scripts into the &amp;quot;run/&amp;quot; folder, the Cactus&lt;br /&gt;
options list into the &amp;quot;cfg/&amp;quot; folder, and the parfile into the &amp;quot;par/&amp;quot;&lt;br /&gt;
folder. Below shows an example SIMFACTORY directory&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 SIMFACTORY]$ ls -lR&lt;br /&gt;
 .:&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 cfg&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 data&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 exe&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 par&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  740 Sep 17 09:06 properties.ini&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 run&lt;br /&gt;
&lt;br /&gt;
 ./cfg:&lt;br /&gt;
 total 12&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 4041 Sep 17 09:06 OptionList&lt;br /&gt;
&lt;br /&gt;
 ./exe:&lt;br /&gt;
 total 121408&lt;br /&gt;
 -rwxr-xr-x  1 mwt lsuusers 124306159 Sep 17 09:06 cactus_sim&lt;br /&gt;
&lt;br /&gt;
 ./par:&lt;br /&gt;
 total 24&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
&lt;br /&gt;
 ./run:&lt;br /&gt;
 total 16&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 1162 Sep 17 09:06 RunScript&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  410 Sep 17 09:06 SubmitScript&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Archiving ===&lt;br /&gt;
&lt;br /&gt;
Preliminary support for archiving of simulations has been added to the&lt;br /&gt;
Simulation Factory using the PetaShare data storage system on LONI.&lt;br /&gt;
This archiving system can only be used from machines that have access&lt;br /&gt;
to PetaShare. The currently supported machines that have access to&lt;br /&gt;
Petashare are&lt;br /&gt;
&lt;br /&gt;
 bluedawg&lt;br /&gt;
 ducky&lt;br /&gt;
 eric&lt;br /&gt;
 lacumba&lt;br /&gt;
 louie&lt;br /&gt;
 neptune&lt;br /&gt;
 oliver&lt;br /&gt;
 painter&lt;br /&gt;
 poseidon&lt;br /&gt;
 queenbee&lt;br /&gt;
 spider&lt;br /&gt;
 tezpur&lt;br /&gt;
 zeke&lt;br /&gt;
&lt;br /&gt;
To use the PetaShare archiving system, the PetaShare&lt;br /&gt;
[http://www.cct.lsu.edu/~sreekanth/petashare/downloads/pcommands/pcommands-2.3.tar.gz&lt;br /&gt;
Pcommands],&lt;br /&gt;
[http://www.cct.lsu.edu/~sreekanth/petashare/pcommands-manual(2.0).php&lt;br /&gt;
(manual)] must be downloaded and installed onto your machine. Once&lt;br /&gt;
that is done, add a new section in &amp;#039;&amp;#039;&amp;#039;etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; for the&lt;br /&gt;
machine from which you wish to access PetaShare, and add the necessary&lt;br /&gt;
MDB keys. An example for the machine Queen Bee is:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 # archive information&lt;br /&gt;
 archivetype      = petashare&lt;br /&gt;
 archiveuser      = numrel&lt;br /&gt;
 archivetoolspath = /home/mwt/tools/pcommands-2.3/bin&lt;br /&gt;
 archivebasepath  = /tempZone/home/numrel/mwt/simulations&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;archivebasepath&amp;#039;&amp;#039;&amp;#039; is where the simulations will be stored on&lt;br /&gt;
PetaShare.&lt;br /&gt;
&lt;br /&gt;
Once this setup has been completed, you can archive an entire&lt;br /&gt;
simulation (including all restarts) using the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim archive &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To archive just a single restart for a given simulation, issue the&lt;br /&gt;
command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim archive &amp;lt;simulationname&amp;gt; --restart-id=&amp;lt;restartid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To print a list of all archived simulations, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-archived-simulations&lt;br /&gt;
&lt;br /&gt;
To retreive an archived simulation, first use the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;list-archived-simulations&amp;#039;&amp;#039;&amp;#039; command to retrieve the unique&lt;br /&gt;
identifier for the simulation, and then issue the following command to&lt;br /&gt;
retrieve a simulation. It will place the simulation in the current&lt;br /&gt;
directory.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim get-archived-simulation &amp;lt;archiveid&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1907</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1907"/>
		<updated>2010-11-29T15:33:02Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory simplifies many aspects of running Cactus-based&lt;br /&gt;
simulations. It provides a central facility for managing authoritative&lt;br /&gt;
source tree versions, providing convenient access to remote HPC&lt;br /&gt;
systems, building Cactus source configurations, and managing&lt;br /&gt;
simulations all the way from submission to archiving their output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
To begin using The Simulation Factory, it needs to be checked out from&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;. The Simulation Factory is typically placed into a&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder inside a Cactus source tree. This can be&lt;br /&gt;
accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory could also be placed in an independent location&lt;br /&gt;
to be used with multiple Cactus source trees. This approach will be&lt;br /&gt;
described later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once the Simulation Factory has been checked out from svn, the next&lt;br /&gt;
step is to configure it, telling it e.g. about your user name. The&lt;br /&gt;
Simulation Factory comes with example configuration files that you can&lt;br /&gt;
copy and modify. Assuming The Simulation Factory has been checked out&lt;br /&gt;
into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be&lt;br /&gt;
accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configurations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine&lt;br /&gt;
Database. This collection of information describes all the aspects&lt;br /&gt;
that are unique about each individual HPC system, so that the&lt;br /&gt;
Simulation Factory can provide a common interface for all systems that&lt;br /&gt;
hides these differences.&lt;br /&gt;
&lt;br /&gt;
The Machine Database consists of different sections, one for each&lt;br /&gt;
machine. The section name is given in square brackets, e.g.&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[queenbee]&amp;#039;&amp;#039;&amp;#039;. There is a special section &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; that&lt;br /&gt;
provides default values for those properties that are not explicitly&lt;br /&gt;
set in the machine-specific entries.&lt;br /&gt;
&lt;br /&gt;
The Machine Database is an authoritative collection of information,&lt;br /&gt;
and is generally not meant to contain modification that are only&lt;br /&gt;
relevant for individual people. These local modifications are instead&lt;br /&gt;
maintained in the file &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; described&lt;br /&gt;
above, where one can add, change, or overwrite properties of Machine&lt;br /&gt;
Database entries. For instance, if an alternative username,&lt;br /&gt;
allocation, and sourcebasedir is needed for the machine&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section there:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = QUEENBEE_USERNAME&lt;br /&gt;
 allocation    = QUEENBEE_ALLOCATION&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that help simplifying configuration entries.&lt;br /&gt;
The most useful is probably &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;, which expands to the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry.&lt;br /&gt;
&lt;br /&gt;
For example, if you are using the same user name on many systems, but&lt;br /&gt;
have a different user name on some systems, then you would set the&lt;br /&gt;
common user name in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section, and override this for&lt;br /&gt;
those machines where your user name differs. The example&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini.complex&amp;#039;&amp;#039;&amp;#039; has examples for this.&lt;br /&gt;
&lt;br /&gt;
Most of the macros available in the Simulation Factory are described&lt;br /&gt;
in the section [[#Macros]] below.&lt;br /&gt;
&lt;br /&gt;
The command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
outputs a list of all preconfigured machines that the Simulation&lt;br /&gt;
Factory knows about.&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can only be used on a machine known to the&lt;br /&gt;
Simulation Factory. This means that you may have to add an entry for&lt;br /&gt;
your workstation or notebook.&lt;br /&gt;
&lt;br /&gt;
The first step is to determine the hostname of the local machine. It&lt;br /&gt;
is through this hostname that the Simulation Factory matches a Machine&lt;br /&gt;
Database entry to the machine on which it executes. The hostname can&lt;br /&gt;
be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you know the hostname, issue the following command to create a&lt;br /&gt;
new Machine Database entry, starting from a generic example:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Then edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The section header for this machine database entry must be unique&lt;br /&gt;
  among all Machine Database entries, and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  path under which all your Cactus source trees reside. (This is not&lt;br /&gt;
  the Cactus directory itself, but the directory that contains the&lt;br /&gt;
  Cactus directory.)&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder&lt;br /&gt;
  that will contain all simulation output. (This is explained in more&lt;br /&gt;
  detail below in the section [[#Managing Simulations]].)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
You can ignore the properties &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;email&amp;#039;&amp;#039;&amp;#039;, and&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory simplifies access to remote systems, both for&lt;br /&gt;
transferring files and logging in. You can synchronise (replicate) an&lt;br /&gt;
authoritative version of your Cactus source tree to remote systems,&lt;br /&gt;
obtain an interactive shell, or execute commands.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a&lt;br /&gt;
machine, or list all known machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the complete Machine Database to the screen:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the name of the machine on which the Simulation Factory is&lt;br /&gt;
currently being executed:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed&lt;br /&gt;
into a central location on each machine, but are instead built&lt;br /&gt;
on-demand by every user for a certain thorn list. (One of the&lt;br /&gt;
advantages is that people can thus easily add their own thorns.) To&lt;br /&gt;
help with this approach, the Simulation Factory provides a facility to&lt;br /&gt;
synchronize a Cactus user&amp;#039;s local, authoritative source tree to remote&lt;br /&gt;
HPC systems, where it can then be compiled and run.&lt;br /&gt;
&lt;br /&gt;
Remote access is implemented on top of ssh and other ssh-like&lt;br /&gt;
mechanisms such as gsi-ssh. Currently, you must still manage all ssh&lt;br /&gt;
keys and passwords manually. (We highly recommend to use ssh keychain&lt;br /&gt;
and ssh agents to avoid having to enter passwords multiple times.)&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a source tree to a remote system, a small amount of&lt;br /&gt;
configuration must be performed. It is necessary to either verify that&lt;br /&gt;
the defaults are correct, or to define the correct values for the&lt;br /&gt;
following keys for the remote system in the Machine Database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The root directory in which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The user name on the remote system&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can output the currently configured values by issuing the command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need to change these values, then edit (on the local system)&lt;br /&gt;
the file &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add a section for the&lt;br /&gt;
remote machine. This entry will augment the existing Machine Database&lt;br /&gt;
entry and updating/replace the corresponding values. An example for&lt;br /&gt;
the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional&lt;br /&gt;
Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
To see the list of files and directories that are synchronized, look&lt;br /&gt;
at &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The list of files and directories that will be transferred when&lt;br /&gt;
the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled (on by default)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The list of files and directories that will be copied when the&lt;br /&gt;
option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled (also on by default). This&lt;br /&gt;
list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A list of files and directories that will be expressly excluded&lt;br /&gt;
from syncing, such as e.g. &amp;#039;&amp;#039;&amp;#039;CVS&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;.svn&amp;#039;&amp;#039;&amp;#039; directories.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two options, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Synchronise the complete source tree, as specified in the&lt;br /&gt;
aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry. This takes a&lt;br /&gt;
few seconds or minutes, depending on the connection.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Synchronise parameter files, as specified by the aforementioned&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. This is typically faster&lt;br /&gt;
than synchronising the source tree.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usually, you would issue the command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To synchronise only parfiles, you can negate the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If you want to synchronise not from the local machine, but from&lt;br /&gt;
another remote machine, then use&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim --remote=&amp;lt;frommachine&amp;gt; sync &amp;lt;tomachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This executes the synchronisation command on the machine&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;frommachine&amp;gt;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to log in to a remote&lt;br /&gt;
system. This is initiated with the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will automatically cd into the Cactus directory on the remote&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command (locally) via the Simulation Factory, use the&lt;br /&gt;
 command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command will be executed in the Cactus directory on the remote&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be&lt;br /&gt;
quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;#039;ls -al&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim --remote-machine=&amp;lt;machine&amp;gt; execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim --remote-machine=queenbee execute &amp;#039;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Build Cactus Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and&lt;br /&gt;
building Cactus source trees. When a Cactus source tree is compiled,&lt;br /&gt;
the Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039; for the compiled&lt;br /&gt;
executable, storing with it related information such as the Cactus&lt;br /&gt;
options list, and the scripts necessary to submit and run jobs in a&lt;br /&gt;
queuing system. This configuration is thus a self-contained entity&lt;br /&gt;
containing everything that is necessary to perform Cactus simulations.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing Cactus configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
To build a configuration, four pieces of information are required:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Thorn list&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This defines which thorns are to be included into the configuration.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;The default option list is probably not useful in many cases.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Option List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies the compiler and build options that need to be used&lt;br /&gt;
  to build Cactus on a particular system.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;The Simulation Factory is supposed to contain good, working&lt;br /&gt;
  default option lists for all supported systems. In fact, this is one&lt;br /&gt;
  of the main strengths of the Simulation Factory. You should normally&lt;br /&gt;
  not need to override the default.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies how to submit a job to the queueing system on a&lt;br /&gt;
  particular system.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;Similar to the option list, the Simulation Factory is supposed to&lt;br /&gt;
  contain good, working default submission scripts for all supported&lt;br /&gt;
  systems.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This specifies to how execute an MPI process on a particular&lt;br /&gt;
  system; it is closely connected to the submission script.&lt;br /&gt;
&amp;lt;li&amp;gt;Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt;Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt;Same as with the the submission script, the Simulation Factory is&lt;br /&gt;
 supposed to contain good, working default run scripts for all&lt;br /&gt;
 supported systems.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specific thornlist, issue the&lt;br /&gt;
following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to&lt;br /&gt;
&amp;#039;sim&amp;#039;. (We recommend this.) You can in addition specify any of the&lt;br /&gt;
options&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;--debug&lt;br /&gt;
&amp;lt;li&amp;gt;--optimise (default)&lt;br /&gt;
&amp;lt;li&amp;gt;--profile&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
These options create configurations for debugging, optimisation (this&lt;br /&gt;
is the default), or profiling enabled.&lt;br /&gt;
If any of these options is specified, then the configuration name will&lt;br /&gt;
be modified correspondingly, e.g. to &amp;#039;sim-debug&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reconfigure before building, i.e. re-examine the configuration&lt;br /&gt;
  options and re-run the CST stage. This happens automatically when&lt;br /&gt;
  the option list changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Clean the configuration (remove all object files etc.) before&lt;br /&gt;
  building.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cbZsul  &amp;lt;a href=&amp;quot;http://wlswjasvvkxf.com/&amp;quot;&amp;gt;wlswjasvvkxf&amp;lt;/a&amp;gt;, [url=http://aegknafsayjg.com/]aegknafsayjg[/url], [link=http://erlxqmjagmjm.com/]erlxqmjagmjm[/link], http://rbnzmidhcrnk.com/&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for all its&lt;br /&gt;
preconfigured machines. These scripts can be found in the following&lt;br /&gt;
locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt;Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list Queen Bee uses by&lt;br /&gt;
default, issue the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for&lt;br /&gt;
submitting, running, and managing simulations. This is accomplished&lt;br /&gt;
through two main commands &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations on a particular machine can be seen with&lt;br /&gt;
the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose&lt;br /&gt;
option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a&lt;br /&gt;
simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Cactus configuration to run&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The total amount of wall time required&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key &amp;#039;&amp;#039;&amp;#039;maxwalltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Processors&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The total number of processors to use&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The option &amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the first&lt;br /&gt;
time you submit a simulation. Subsequent re-submissions of the same&lt;br /&gt;
simulation (for restarting from checkpoints) will always use the same&lt;br /&gt;
configuration that was specified the first time. Here is an example of&lt;br /&gt;
submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned&lt;br /&gt;
options:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand notation where&lt;br /&gt;
you do not need to specify the option names, but have to specify the&lt;br /&gt;
options in a certain order. If you don&amp;#039;t specify a simulation name&lt;br /&gt;
using the shorthand syntax, a simulation name will be derived from&lt;br /&gt;
from the parameter file name.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example is&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Number of OpenMP Threads&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of OpenMP threads per MPI process. (You specify the&lt;br /&gt;
  total number of processors (cores), and the number of OpenMP&lt;br /&gt;
  threads; the number of MPI processes is then calculated&lt;br /&gt;
  automatically.)&lt;br /&gt;
&amp;lt;li&amp;gt;option: --num-threads&lt;br /&gt;
&amp;lt;li&amp;gt;default: 1 (as if OpenMP was not used)&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Allocation&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The allocation for the simulation, overriding the corresponding&lt;br /&gt;
  MDB entry&lt;br /&gt;
&amp;lt;li&amp;gt;option: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt;default: taken from the MDB&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Queue&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The queue for the simulation, overriding the corresponding MDB&lt;br /&gt;
  entry&lt;br /&gt;
&amp;lt;li&amp;gt;option: --queue&lt;br /&gt;
&amp;lt;li&amp;gt;default: taken from the MDB&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Processors per node&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of processors per node requested from the queueing system&lt;br /&gt;
&amp;lt;li&amp;gt;option: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt;default: all processors on a node&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Used processors per node&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of processors per node that should actually be used,&lt;br /&gt;
  allowing under-using nodes even if the queueing system does not&lt;br /&gt;
  allow it. (The remaining processors will idle and will remain&lt;br /&gt;
  unused.)&lt;br /&gt;
&amp;lt;li&amp;gt;option: --ppn-used&lt;br /&gt;
&amp;lt;li&amp;gt;default: all processors on a node&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing&lt;br /&gt;
the queuing system. Running a simulation directly uses the same&lt;br /&gt;
options, but ignores wall time limit etc. You use the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
command for this:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --configuration sim-debug --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
This leads to a login shell on the compute node, but is otherwise&lt;br /&gt;
similar to the submit command.&lt;br /&gt;
&lt;br /&gt;
To stop a simulation:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim stop &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim purge &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the current output (stdout and stderr) for a given simulation:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is submitted for the first time, all necessary&lt;br /&gt;
information from the Cactus build configuration is brought into a&lt;br /&gt;
specific simulation folder created underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
directory. Contained inside this folder, which has the same name as&lt;br /&gt;
the specified simulation, are the executable, run script, submit&lt;br /&gt;
script, a SIMFACTORY folder, a log file, and the output directories&lt;br /&gt;
for each individual restart.&lt;br /&gt;
&lt;br /&gt;
Simulations are self-contained, and once created do not rely on&lt;br /&gt;
outside information. For example, recompiling the executable or&lt;br /&gt;
changing the parameter file that were used to submit a simulation will&lt;br /&gt;
not influence the simulation, since the simulation contains copies of&lt;br /&gt;
both. This ensures that simulations can continue to run unperturbed&lt;br /&gt;
even weeks after they have been created.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;static_tov&amp;quot; with&lt;br /&gt;
several restarts in it:&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -l static_tov&lt;br /&gt;
 total 32&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0000&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0002&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0003&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0004&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
The SIMFACTORY folder contains the executable, the necessary script&lt;br /&gt;
files for submission and execution, and a properties.ini file that is&lt;br /&gt;
used by the Simulation Factory to store information about the&lt;br /&gt;
simulation.&lt;br /&gt;
&lt;br /&gt;
Each time a simulation is either run or submitted, a restart directory&lt;br /&gt;
is created underneath the simulation directory. This restart folder&lt;br /&gt;
has a name of the format &amp;quot;output-####&amp;quot;, starting with &amp;quot;output-0000&amp;quot;.&lt;br /&gt;
Contained inside the restart folder are several internal files, the&lt;br /&gt;
output written to stdout and stderr from the simulation, and the&lt;br /&gt;
simulation output itself. The simulation output is typically stored&lt;br /&gt;
inside a directory named after the basename of the parameter file. An&lt;br /&gt;
example output directory is:&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 output-0001]$ ls -l&lt;br /&gt;
 total 172&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      0 Sep 17 09:06 LOG&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      9 Sep 17 09:06 mpd_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     32 Sep 17 09:06 mpi_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     33 Sep 17 09:06 NODELIST&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers  20480 Sep 17 16:12 qc0-mclachlan&lt;br /&gt;
 -rw-------  1 mwt lsuusers   2520 Sep 17 21:06 qc0-mclachlan.err&lt;br /&gt;
 -rw-------  1 mwt lsuusers 108210 Sep 17 21:06 qc0-mclachlan.out&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
 lrwxrwxrwx  1 mwt lsuusers     23 Sep 17 09:06 scratch -&amp;gt; /var/scratch/mwt/250072&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers   4096 Sep 17 09:06 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is created, it copies the submit script and the run&lt;br /&gt;
script from the build configuration into the folder&lt;br /&gt;
&amp;quot;basedir/&amp;lt;simulation&amp;gt;/SIMFACTORY&amp;quot;. The executable goes in the &amp;quot;exe/&amp;quot;&lt;br /&gt;
folder, the run and submit scripts into the &amp;quot;run/&amp;quot; folder, the Cactus&lt;br /&gt;
options list into the &amp;quot;cfg/&amp;quot; folder, and the parfile into the &amp;quot;par/&amp;quot;&lt;br /&gt;
folder. Below shows an example SIMFACTORY directory&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 SIMFACTORY]$ ls -lR&lt;br /&gt;
 .:&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 cfg&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 data&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 exe&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 par&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  740 Sep 17 09:06 properties.ini&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 run&lt;br /&gt;
&lt;br /&gt;
 ./cfg:&lt;br /&gt;
 total 12&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 4041 Sep 17 09:06 OptionList&lt;br /&gt;
&lt;br /&gt;
 ./exe:&lt;br /&gt;
 total 121408&lt;br /&gt;
 -rwxr-xr-x  1 mwt lsuusers 124306159 Sep 17 09:06 cactus_sim&lt;br /&gt;
&lt;br /&gt;
 ./par:&lt;br /&gt;
 total 24&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
&lt;br /&gt;
 ./run:&lt;br /&gt;
 total 16&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 1162 Sep 17 09:06 RunScript&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  410 Sep 17 09:06 SubmitScript&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Archiving ===&lt;br /&gt;
&lt;br /&gt;
Preliminary support for archiving of simulations has been added to the&lt;br /&gt;
Simulation Factory using the PetaShare data storage system on LONI.&lt;br /&gt;
This archiving system can only be used from machines that have access&lt;br /&gt;
to PetaShare. The currently supported machines that have access to&lt;br /&gt;
Petashare are&lt;br /&gt;
&lt;br /&gt;
 bluedawg&lt;br /&gt;
 ducky&lt;br /&gt;
 eric&lt;br /&gt;
 lacumba&lt;br /&gt;
 louie&lt;br /&gt;
 neptune&lt;br /&gt;
 oliver&lt;br /&gt;
 painter&lt;br /&gt;
 poseidon&lt;br /&gt;
 queenbee&lt;br /&gt;
 spider&lt;br /&gt;
 tezpur&lt;br /&gt;
 zeke&lt;br /&gt;
&lt;br /&gt;
To use the PetaShare archiving system, the PetaShare&lt;br /&gt;
[http://www.cct.lsu.edu/~sreekanth/petashare/downloads/pcommands/pcommands-2.3.tar.gz&lt;br /&gt;
Pcommands],&lt;br /&gt;
[http://www.cct.lsu.edu/~sreekanth/petashare/pcommands-manual(2.0).php&lt;br /&gt;
(manual)] must be downloaded and installed onto your machine. Once&lt;br /&gt;
that is done, add a new section in &amp;#039;&amp;#039;&amp;#039;etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; for the&lt;br /&gt;
machine from which you wish to access PetaShare, and add the necessary&lt;br /&gt;
MDB keys. An example for the machine Queen Bee is:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 # archive information&lt;br /&gt;
 archivetype      = petashare&lt;br /&gt;
 archiveuser      = numrel&lt;br /&gt;
 archivetoolspath = /home/mwt/tools/pcommands-2.3/bin&lt;br /&gt;
 archivebasepath  = /tempZone/home/numrel/mwt/simulations&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;archivebasepath&amp;#039;&amp;#039;&amp;#039; is where the simulations will be stored on&lt;br /&gt;
PetaShare.&lt;br /&gt;
&lt;br /&gt;
Once this setup has been completed, you can archive an entire&lt;br /&gt;
simulation (including all restarts) using the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim archive &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To archive just a single restart for a given simulation, issue the&lt;br /&gt;
command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim archive &amp;lt;simulationname&amp;gt; --restart-id=&amp;lt;restartid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To print a list of all archived simulations, use the command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-archived-simulations&lt;br /&gt;
&lt;br /&gt;
To retreive an archived simulation, first use the&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;list-archived-simulations&amp;#039;&amp;#039;&amp;#039; command to retrieve the unique&lt;br /&gt;
identifier for the simulation, and then issue the following command to&lt;br /&gt;
retrieve a simulation. It will place the simulation in the current&lt;br /&gt;
directory.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim get-archived-simulation &amp;lt;archiveid&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1811</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1811"/>
		<updated>2010-09-30T19:13:24Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Archiving */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; time you submit a simulation. Subsequent submissions of the same simulation will use whatever configuration was specified the first time. Here is an example of submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned options&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand, where you can specify the options in a certain order. If you don&amp;#039;t specify a simulation name using&lt;br /&gt;
the shorthand syntax, it will attempt to derive the simulation name from the basename of the parfile specified.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Processors Per Node&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors per node to use. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of memory to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --memory&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1024&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;cpufreq&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The frequency of the CPU&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --cpufreq&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 0&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The allocation for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;queue&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The queue for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --queue&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;checkpt&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing a queuing system. Running a simulation directly uses the same options, minus the walltime, as submitting a simulation, only using the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; command instead. An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
If this simulation does not exist, &amp;#039;&amp;#039;&amp;#039;--configuration=&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039; will need to be specified the first time the simulation is run.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
To stop a simulation&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim stop &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim purge &amp;lt;simulationname&amp;gt;[--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the output for a given simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is run for the first time, all the necessary information from the Cactus build configuration is brought into a specific simulation folder created &lt;br /&gt;
underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;. Contained inside this folder, which has the same name as the specified simulation, are the executable, the run script, the submit script, the SIMFACTORY folder, a log file, and the output directories of each individual restart.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;btest&amp;quot; with several restarts in it&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -al btest&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 17 09:03 .&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 27 11:32 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0002&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0003&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0004&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0005&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SIMFACTORY folder contains the executable, the necessary script files needed for submitting and execution, and a properties.ini file that is used by the Simulation Factory to store &lt;br /&gt;
information about the simulation. &lt;br /&gt;
&lt;br /&gt;
Each time a simulation is either run or submitted, a restart directory is created underneath the simulation directory.  This restart folder has the format of output-####, starting with&lt;br /&gt;
output-0001. Contained inside the restart folder are several internal files, the output written to stdout and stderr from the simulation, and the simulation output itself. The simulation output is stored inside a directory named after the basename of the parameter file. An example output directory is below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 output-0001]$ ls -al&lt;br /&gt;
 total 172&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 17 21:06 .&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 27 11:29 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      0 Sep 17 09:06 LOG&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      9 Sep 17 09:06 mpd_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     32 Sep 17 09:06 mpi_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     33 Sep 17 09:06 NODELIST&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers  20480 Sep 17 16:12 qc0-mclachlan&lt;br /&gt;
 -rw-------  1 mwt lsuusers   2520 Sep 17 21:06 qc0-mclachlan.err&lt;br /&gt;
 -rw-------  1 mwt lsuusers 108210 Sep 17 21:06 qc0-mclachlan.out&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
 lrwxrwxrwx  1 mwt lsuusers     23 Sep 17 09:06 scratch -&amp;gt; /var/scratch/mwt/250072&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers   4096 Sep 17 09:06 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is created, it copies the submit script and the run script from the build configuration into the basedir/&amp;lt;simulation&amp;gt;/SIMFACTORY folder. The executable goes in the exe/ folder, the run and submit scripts into the run/ folder, the Cactus options list into the cfg/ folder, and the parfile into the par/ folder. Below shows an example SIMFACTORY directory&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 SIMFACTORY]$ ls -alR&lt;br /&gt;
 .:&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 cfg&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 data&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 exe&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 par&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  740 Sep 17 09:06 properties.ini&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 run&lt;br /&gt;
&lt;br /&gt;
 ./cfg:&lt;br /&gt;
 total 12&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 4041 Sep 17 09:06 OptionList&lt;br /&gt;
&lt;br /&gt;
 ./exe:&lt;br /&gt;
 total 121408&lt;br /&gt;
 -rwxr-xr-x  1 mwt lsuusers 124306159 Sep 17 09:06 cactus_sim&lt;br /&gt;
&lt;br /&gt;
 ./par:&lt;br /&gt;
 total 24&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
&lt;br /&gt;
 ./run:&lt;br /&gt;
 total 16&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 1162 Sep 17 09:06 RunScript&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  410 Sep 17 09:06 SubmitScript&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Archiving ===&lt;br /&gt;
&lt;br /&gt;
Preliminary support for archiving of simulations has been added to The Simulation Factory using the Petashare data storage system. This archiving system can only be used from machines that have access to Petashare. The currently supported machines that have access to Petashare are&lt;br /&gt;
&lt;br /&gt;
 queenbee&lt;br /&gt;
 tezpur&lt;br /&gt;
 eric&lt;br /&gt;
 ducky&lt;br /&gt;
 neptune&lt;br /&gt;
 zeke&lt;br /&gt;
 spider&lt;br /&gt;
 oliver&lt;br /&gt;
 lacumba&lt;br /&gt;
 painter&lt;br /&gt;
 bluedawg&lt;br /&gt;
 poseidon&lt;br /&gt;
 louie&lt;br /&gt;
&lt;br /&gt;
In order to use the Petashare archiving system, the Petashare [http://www.cct.lsu.edu/~sreekanth/petashare/downloads/pcommands/pcommands-2.3.tar.gz Pcommands], [http://www.cct.lsu.edu/~sreekanth/petashare/pcommands-manual(2.0).php (manual)] must be downloaded and installed into your local directory. Once that&amp;#039;s done, add a new section in &amp;#039;&amp;#039;&amp;#039;etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; for the machine you wish to access petashare from, and add the necessary keys. An example for the machine queenbee is below&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 # archive information&lt;br /&gt;
 archivetype      = petashare&lt;br /&gt;
 archiveuser      = numrel&lt;br /&gt;
 archivetoolspath = /home/mwt/tools/pcommands-2.3/bin&lt;br /&gt;
 archivebasepath  = /tempZone/home/numrel/mwt/simulations&lt;br /&gt;
&lt;br /&gt;
archivebasepath is where the simulations will be stored on petashare. &lt;br /&gt;
&lt;br /&gt;
Once setup has been completed, you can archive an entire simulation (including all restarts) using the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim archive &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To archive just a single restart for a given simulation, you can issue the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim archive &amp;lt;simulationname&amp;gt; -- restart-id=&amp;lt;restartid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get a list of all archived simulations, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-archived-simulations&lt;br /&gt;
&lt;br /&gt;
To retreive an archived simulation, first use the &amp;#039;&amp;#039;&amp;#039;list-archived-simulations&amp;#039;&amp;#039;&amp;#039; command to retrieve the unique identifier for the simulation, and then issue the following command to retrieve a simulation. It will place the simulation in the current directory.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim get-archived-simulation &amp;lt;archiveid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1810</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1810"/>
		<updated>2010-09-30T19:11:20Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Archiving */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; time you submit a simulation. Subsequent submissions of the same simulation will use whatever configuration was specified the first time. Here is an example of submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned options&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand, where you can specify the options in a certain order. If you don&amp;#039;t specify a simulation name using&lt;br /&gt;
the shorthand syntax, it will attempt to derive the simulation name from the basename of the parfile specified.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Processors Per Node&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors per node to use. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of memory to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --memory&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1024&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;cpufreq&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The frequency of the CPU&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --cpufreq&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 0&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The allocation for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;queue&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The queue for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --queue&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;checkpt&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing a queuing system. Running a simulation directly uses the same options, minus the walltime, as submitting a simulation, only using the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; command instead. An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
If this simulation does not exist, &amp;#039;&amp;#039;&amp;#039;--configuration=&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039; will need to be specified the first time the simulation is run.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
To stop a simulation&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim stop &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim purge &amp;lt;simulationname&amp;gt;[--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the output for a given simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is run for the first time, all the necessary information from the Cactus build configuration is brought into a specific simulation folder created &lt;br /&gt;
underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;. Contained inside this folder, which has the same name as the specified simulation, are the executable, the run script, the submit script, the SIMFACTORY folder, a log file, and the output directories of each individual restart.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;btest&amp;quot; with several restarts in it&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -al btest&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 17 09:03 .&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 27 11:32 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0002&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0003&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0004&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0005&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SIMFACTORY folder contains the executable, the necessary script files needed for submitting and execution, and a properties.ini file that is used by the Simulation Factory to store &lt;br /&gt;
information about the simulation. &lt;br /&gt;
&lt;br /&gt;
Each time a simulation is either run or submitted, a restart directory is created underneath the simulation directory.  This restart folder has the format of output-####, starting with&lt;br /&gt;
output-0001. Contained inside the restart folder are several internal files, the output written to stdout and stderr from the simulation, and the simulation output itself. The simulation output is stored inside a directory named after the basename of the parameter file. An example output directory is below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 output-0001]$ ls -al&lt;br /&gt;
 total 172&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 17 21:06 .&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 27 11:29 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      0 Sep 17 09:06 LOG&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      9 Sep 17 09:06 mpd_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     32 Sep 17 09:06 mpi_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     33 Sep 17 09:06 NODELIST&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers  20480 Sep 17 16:12 qc0-mclachlan&lt;br /&gt;
 -rw-------  1 mwt lsuusers   2520 Sep 17 21:06 qc0-mclachlan.err&lt;br /&gt;
 -rw-------  1 mwt lsuusers 108210 Sep 17 21:06 qc0-mclachlan.out&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
 lrwxrwxrwx  1 mwt lsuusers     23 Sep 17 09:06 scratch -&amp;gt; /var/scratch/mwt/250072&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers   4096 Sep 17 09:06 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is created, it copies the submit script and the run script from the build configuration into the basedir/&amp;lt;simulation&amp;gt;/SIMFACTORY folder. The executable goes in the exe/ folder, the run and submit scripts into the run/ folder, the Cactus options list into the cfg/ folder, and the parfile into the par/ folder. Below shows an example SIMFACTORY directory&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 SIMFACTORY]$ ls -alR&lt;br /&gt;
 .:&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 cfg&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 data&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 exe&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 par&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  740 Sep 17 09:06 properties.ini&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 run&lt;br /&gt;
&lt;br /&gt;
 ./cfg:&lt;br /&gt;
 total 12&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 4041 Sep 17 09:06 OptionList&lt;br /&gt;
&lt;br /&gt;
 ./exe:&lt;br /&gt;
 total 121408&lt;br /&gt;
 -rwxr-xr-x  1 mwt lsuusers 124306159 Sep 17 09:06 cactus_sim&lt;br /&gt;
&lt;br /&gt;
 ./par:&lt;br /&gt;
 total 24&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
&lt;br /&gt;
 ./run:&lt;br /&gt;
 total 16&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 1162 Sep 17 09:06 RunScript&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  410 Sep 17 09:06 SubmitScript&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Archiving ===&lt;br /&gt;
&lt;br /&gt;
Preliminary support for archiving of simulations has been added to The Simulation Factory using the Petashare data storage system. This archiving system can only be used from machines that have access to Petashare. The currently supported machines that have access to Petashare are&lt;br /&gt;
&lt;br /&gt;
 queenbee&lt;br /&gt;
 tezpur&lt;br /&gt;
 eric&lt;br /&gt;
 ducky&lt;br /&gt;
 neptune&lt;br /&gt;
 zeke&lt;br /&gt;
 spider&lt;br /&gt;
 oliver&lt;br /&gt;
 lacumba&lt;br /&gt;
 painter&lt;br /&gt;
 bluedawg&lt;br /&gt;
 poseidon&lt;br /&gt;
 louie&lt;br /&gt;
&lt;br /&gt;
In order to use the Petashare archiving system, the Petashare [http://www.cct.lsu.edu/~sreekanth/petashare/downloads/pcommands/pcommands-2.3.tar.gz Pcommands] must be downloaded and installed into your local directory. Once that&amp;#039;s done, add a new section in &amp;#039;&amp;#039;&amp;#039;etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; for the machine you wish to access petashare from, and add the necessary keys. An example for the machine queenbee is below&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 # archive information&lt;br /&gt;
 archivetype      = petashare&lt;br /&gt;
 archiveuser      = numrel&lt;br /&gt;
 archivetoolspath = /home/mwt/tools/pcommands-2.3/bin&lt;br /&gt;
 archivebasepath  = /tempZone/home/numrel/mwt/simulations&lt;br /&gt;
&lt;br /&gt;
archivebasepath is where the simulations will be stored on petashare. &lt;br /&gt;
&lt;br /&gt;
Once setup has been completed, you can archive an entire simulation (including all restarts) using the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim archive &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To archive just a single restart for a given simulation, you can issue the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim archive &amp;lt;simulationname&amp;gt; -- restart-id=&amp;lt;restartid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get a list of all archived simulations, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-archived-simulations&lt;br /&gt;
&lt;br /&gt;
To retreive an archived simulation, first use the &amp;#039;&amp;#039;&amp;#039;list-archived-simulations&amp;#039;&amp;#039;&amp;#039; command to retrieve the unique identifier for the simulation, and then issue the following command to retrieve a simulation. It will place the simulation in the current directory.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim get-archived-simulation &amp;lt;archiveid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1809</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1809"/>
		<updated>2010-09-30T19:10:26Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Other Advanced Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; time you submit a simulation. Subsequent submissions of the same simulation will use whatever configuration was specified the first time. Here is an example of submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned options&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand, where you can specify the options in a certain order. If you don&amp;#039;t specify a simulation name using&lt;br /&gt;
the shorthand syntax, it will attempt to derive the simulation name from the basename of the parfile specified.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Processors Per Node&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors per node to use. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of memory to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --memory&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1024&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;cpufreq&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The frequency of the CPU&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --cpufreq&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 0&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The allocation for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;queue&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The queue for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --queue&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;checkpt&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing a queuing system. Running a simulation directly uses the same options, minus the walltime, as submitting a simulation, only using the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; command instead. An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
If this simulation does not exist, &amp;#039;&amp;#039;&amp;#039;--configuration=&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039; will need to be specified the first time the simulation is run.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
To stop a simulation&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim stop &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim purge &amp;lt;simulationname&amp;gt;[--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the output for a given simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is run for the first time, all the necessary information from the Cactus build configuration is brought into a specific simulation folder created &lt;br /&gt;
underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;. Contained inside this folder, which has the same name as the specified simulation, are the executable, the run script, the submit script, the SIMFACTORY folder, a log file, and the output directories of each individual restart.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;btest&amp;quot; with several restarts in it&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -al btest&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 17 09:03 .&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 27 11:32 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0002&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0003&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0004&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0005&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SIMFACTORY folder contains the executable, the necessary script files needed for submitting and execution, and a properties.ini file that is used by the Simulation Factory to store &lt;br /&gt;
information about the simulation. &lt;br /&gt;
&lt;br /&gt;
Each time a simulation is either run or submitted, a restart directory is created underneath the simulation directory.  This restart folder has the format of output-####, starting with&lt;br /&gt;
output-0001. Contained inside the restart folder are several internal files, the output written to stdout and stderr from the simulation, and the simulation output itself. The simulation output is stored inside a directory named after the basename of the parameter file. An example output directory is below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 output-0001]$ ls -al&lt;br /&gt;
 total 172&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 17 21:06 .&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 27 11:29 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      0 Sep 17 09:06 LOG&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      9 Sep 17 09:06 mpd_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     32 Sep 17 09:06 mpi_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     33 Sep 17 09:06 NODELIST&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers  20480 Sep 17 16:12 qc0-mclachlan&lt;br /&gt;
 -rw-------  1 mwt lsuusers   2520 Sep 17 21:06 qc0-mclachlan.err&lt;br /&gt;
 -rw-------  1 mwt lsuusers 108210 Sep 17 21:06 qc0-mclachlan.out&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
 lrwxrwxrwx  1 mwt lsuusers     23 Sep 17 09:06 scratch -&amp;gt; /var/scratch/mwt/250072&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers   4096 Sep 17 09:06 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is created, it copies the submit script and the run script from the build configuration into the basedir/&amp;lt;simulation&amp;gt;/SIMFACTORY folder. The executable goes in the exe/ folder, the run and submit scripts into the run/ folder, the Cactus options list into the cfg/ folder, and the parfile into the par/ folder. Below shows an example SIMFACTORY directory&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 SIMFACTORY]$ ls -alR&lt;br /&gt;
 .:&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 cfg&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 data&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 exe&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 par&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  740 Sep 17 09:06 properties.ini&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 run&lt;br /&gt;
&lt;br /&gt;
 ./cfg:&lt;br /&gt;
 total 12&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 4041 Sep 17 09:06 OptionList&lt;br /&gt;
&lt;br /&gt;
 ./exe:&lt;br /&gt;
 total 121408&lt;br /&gt;
 -rwxr-xr-x  1 mwt lsuusers 124306159 Sep 17 09:06 cactus_sim&lt;br /&gt;
&lt;br /&gt;
 ./par:&lt;br /&gt;
 total 24&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
&lt;br /&gt;
 ./run:&lt;br /&gt;
 total 16&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 1162 Sep 17 09:06 RunScript&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  410 Sep 17 09:06 SubmitScript&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Archiving ===&lt;br /&gt;
&lt;br /&gt;
Preliminary support for archiving of simulations has been added to The Simulation Factory using the Petashare data storage system. This archiving system can only be used from machines that have access to Petashare. The currently supported machines that have access to Petashare are&lt;br /&gt;
&lt;br /&gt;
 queenbee&lt;br /&gt;
 tezpur&lt;br /&gt;
 eric&lt;br /&gt;
 ducky&lt;br /&gt;
 neptune&lt;br /&gt;
 zeke&lt;br /&gt;
 spider&lt;br /&gt;
 oliver&lt;br /&gt;
 lacumba&lt;br /&gt;
 painter&lt;br /&gt;
 bluedawg&lt;br /&gt;
 poseidon&lt;br /&gt;
 louie&lt;br /&gt;
&lt;br /&gt;
In order to use the Petashare archiving system, the Petashare [http://www.cct.lsu.edu/~sreekanth/petashare/downloads/pcommands/pcommands-2.3.tar.gz Pcommands] must be downloaded and installed into your local directory. Once that&amp;#039;s done, add a new section in &amp;#039;&amp;#039;&amp;#039;etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; for the machine you wish to access petashare from, and add the necessary keys. An example for the machine queenbee is below&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 # archive information&lt;br /&gt;
 archivetype      = petashare&lt;br /&gt;
 archiveuser      = numrel&lt;br /&gt;
 archivetoolspath = /home/mwt/tools/pcommands-2.3/bin&lt;br /&gt;
 archivebasepath  = /tempZone/home/numrel/mwt/simulations&lt;br /&gt;
&lt;br /&gt;
archivebasepath is where the simulations will be stored on petashare. &lt;br /&gt;
&lt;br /&gt;
Once setup has been completed, you can archive an entire simulation (including all restarts) using the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim archive &amp;lt;simulationname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To archive just a single restart for a given simulation, you can issue the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim archive &amp;lt;simulationname&amp;gt; -- restart-id=&amp;lt;restartid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get a list of all archived simulations, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-archived-simulations&lt;br /&gt;
&lt;br /&gt;
To retreive an archived simulation, first use the &amp;#039;&amp;#039;&amp;#039;list-archived-simulations&amp;#039;&amp;#039;&amp;#039; command to retrieve the unique identifier for the simulation, and then issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim get-archived-simulation &amp;lt;archiveid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will place the simulation in the current directory.&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1808</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1808"/>
		<updated>2010-09-30T19:01:36Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Script Locations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; time you submit a simulation. Subsequent submissions of the same simulation will use whatever configuration was specified the first time. Here is an example of submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned options&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand, where you can specify the options in a certain order. If you don&amp;#039;t specify a simulation name using&lt;br /&gt;
the shorthand syntax, it will attempt to derive the simulation name from the basename of the parfile specified.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Processors Per Node&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors per node to use. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of memory to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --memory&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1024&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;cpufreq&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The frequency of the CPU&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --cpufreq&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 0&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The allocation for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;queue&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The queue for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --queue&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;checkpt&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing a queuing system. Running a simulation directly uses the same options, minus the walltime, as submitting a simulation, only using the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; command instead. An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
If this simulation does not exist, &amp;#039;&amp;#039;&amp;#039;--configuration=&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039; will need to be specified the first time the simulation is run.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
To stop a simulation&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim stop &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim purge &amp;lt;simulationname&amp;gt;[--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the output for a given simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is run for the first time, all the necessary information from the Cactus build configuration is brought into a specific simulation folder created &lt;br /&gt;
underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;. Contained inside this folder, which has the same name as the specified simulation, are the executable, the run script, the submit script, the SIMFACTORY folder, a log file, and the output directories of each individual restart.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;btest&amp;quot; with several restarts in it&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -al btest&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 17 09:03 .&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 27 11:32 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0002&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0003&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0004&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0005&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SIMFACTORY folder contains the executable, the necessary script files needed for submitting and execution, and a properties.ini file that is used by the Simulation Factory to store &lt;br /&gt;
information about the simulation. &lt;br /&gt;
&lt;br /&gt;
Each time a simulation is either run or submitted, a restart directory is created underneath the simulation directory.  This restart folder has the format of output-####, starting with&lt;br /&gt;
output-0001. Contained inside the restart folder are several internal files, the output written to stdout and stderr from the simulation, and the simulation output itself. The simulation output is stored inside a directory named after the basename of the parameter file. An example output directory is below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 output-0001]$ ls -al&lt;br /&gt;
 total 172&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 17 21:06 .&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 27 11:29 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      0 Sep 17 09:06 LOG&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      9 Sep 17 09:06 mpd_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     32 Sep 17 09:06 mpi_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     33 Sep 17 09:06 NODELIST&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers  20480 Sep 17 16:12 qc0-mclachlan&lt;br /&gt;
 -rw-------  1 mwt lsuusers   2520 Sep 17 21:06 qc0-mclachlan.err&lt;br /&gt;
 -rw-------  1 mwt lsuusers 108210 Sep 17 21:06 qc0-mclachlan.out&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
 lrwxrwxrwx  1 mwt lsuusers     23 Sep 17 09:06 scratch -&amp;gt; /var/scratch/mwt/250072&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers   4096 Sep 17 09:06 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is created, it copies the submit script and the run script from the build configuration into the basedir/&amp;lt;simulation&amp;gt;/SIMFACTORY folder. The executable goes in the exe/ folder, the run and submit scripts into the run/ folder, the Cactus options list into the cfg/ folder, and the parfile into the par/ folder. Below shows an example SIMFACTORY directory&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 SIMFACTORY]$ ls -alR&lt;br /&gt;
 .:&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 cfg&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 data&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 exe&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 par&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  740 Sep 17 09:06 properties.ini&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 run&lt;br /&gt;
&lt;br /&gt;
 ./cfg:&lt;br /&gt;
 total 12&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 4041 Sep 17 09:06 OptionList&lt;br /&gt;
&lt;br /&gt;
 ./exe:&lt;br /&gt;
 total 121408&lt;br /&gt;
 -rwxr-xr-x  1 mwt lsuusers 124306159 Sep 17 09:06 cactus_sim&lt;br /&gt;
&lt;br /&gt;
 ./par:&lt;br /&gt;
 total 24&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
&lt;br /&gt;
 ./run:&lt;br /&gt;
 total 16&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 1162 Sep 17 09:06 RunScript&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  410 Sep 17 09:06 SubmitScript&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1807</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1807"/>
		<updated>2010-09-30T19:01:21Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Script Locations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; time you submit a simulation. Subsequent submissions of the same simulation will use whatever configuration was specified the first time. Here is an example of submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned options&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand, where you can specify the options in a certain order. If you don&amp;#039;t specify a simulation name using&lt;br /&gt;
the shorthand syntax, it will attempt to derive the simulation name from the basename of the parfile specified.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Processors Per Node&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors per node to use. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of memory to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --memory&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1024&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;cpufreq&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The frequency of the CPU&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --cpufreq&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 0&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The allocation for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;queue&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The queue for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --queue&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;checkpt&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing a queuing system. Running a simulation directly uses the same options, minus the walltime, as submitting a simulation, only using the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; command instead. An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
If this simulation does not exist, &amp;#039;&amp;#039;&amp;#039;--configuration=&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039; will need to be specified the first time the simulation is run.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
To stop a simulation&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim stop &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim purge &amp;lt;simulationname&amp;gt;[--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the output for a given simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is run for the first time, all the necessary information from the Cactus build configuration is brought into a specific simulation folder created &lt;br /&gt;
underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;. Contained inside this folder, which has the same name as the specified simulation, are the executable, the run script, the submit script, the SIMFACTORY folder, a log file, and the output directories of each individual restart.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;btest&amp;quot; with several restarts in it&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -al btest&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 17 09:03 .&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 27 11:32 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0002&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0003&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0004&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0005&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SIMFACTORY folder contains the executable, the necessary script files needed for submitting and execution, and a properties.ini file that is used by the Simulation Factory to store &lt;br /&gt;
information about the simulation. &lt;br /&gt;
&lt;br /&gt;
Each time a simulation is either run or submitted, a restart directory is created underneath the simulation directory.  This restart folder has the format of output-####, starting with&lt;br /&gt;
output-0001. Contained inside the restart folder are several internal files, the output written to stdout and stderr from the simulation, and the simulation output itself. The simulation output is stored inside a directory named after the basename of the parameter file. An example output directory is below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 output-0001]$ ls -al&lt;br /&gt;
 total 172&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 17 21:06 .&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 27 11:29 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      0 Sep 17 09:06 LOG&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      9 Sep 17 09:06 mpd_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     32 Sep 17 09:06 mpi_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     33 Sep 17 09:06 NODELIST&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers  20480 Sep 17 16:12 qc0-mclachlan&lt;br /&gt;
 -rw-------  1 mwt lsuusers   2520 Sep 17 21:06 qc0-mclachlan.err&lt;br /&gt;
 -rw-------  1 mwt lsuusers 108210 Sep 17 21:06 qc0-mclachlan.out&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
 lrwxrwxrwx  1 mwt lsuusers     23 Sep 17 09:06 scratch -&amp;gt; /var/scratch/mwt/250072&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers   4096 Sep 17 09:06 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is created, it copies the submit script and the run script from the build configuration into the basedir/&amp;lt;simulation&amp;gt;/SIMFACTORY folder. The executable goes in the exe/ folder, the run and submit scripts into the run/ folder, the Cactus options list into the cfg/ folder, and the parfile into the par/ folder. Below shows an example SIMFACTORY directory&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 SIMFACTORY]$ ls -alR&lt;br /&gt;
 .:&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 cfg&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 data&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 exe&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 par&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  740 Sep 17 09:06 properties.ini&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 run&lt;br /&gt;
 &lt;br /&gt;
 ./cfg:&lt;br /&gt;
 total 12&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 4041 Sep 17 09:06 OptionList&lt;br /&gt;
&lt;br /&gt;
 ./exe:&lt;br /&gt;
 total 121408&lt;br /&gt;
 -rwxr-xr-x  1 mwt lsuusers 124306159 Sep 17 09:06 cactus_sim&lt;br /&gt;
&lt;br /&gt;
 ./par:&lt;br /&gt;
 total 24&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
&lt;br /&gt;
 ./run:&lt;br /&gt;
 total 16&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 1162 Sep 17 09:06 RunScript&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  410 Sep 17 09:06 SubmitScript&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1806</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1806"/>
		<updated>2010-09-30T19:01:10Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Script Locations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; time you submit a simulation. Subsequent submissions of the same simulation will use whatever configuration was specified the first time. Here is an example of submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned options&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand, where you can specify the options in a certain order. If you don&amp;#039;t specify a simulation name using&lt;br /&gt;
the shorthand syntax, it will attempt to derive the simulation name from the basename of the parfile specified.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Processors Per Node&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors per node to use. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of memory to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --memory&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1024&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;cpufreq&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The frequency of the CPU&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --cpufreq&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 0&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The allocation for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;queue&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The queue for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --queue&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;checkpt&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing a queuing system. Running a simulation directly uses the same options, minus the walltime, as submitting a simulation, only using the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; command instead. An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
If this simulation does not exist, &amp;#039;&amp;#039;&amp;#039;--configuration=&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039; will need to be specified the first time the simulation is run.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
To stop a simulation&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim stop &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim purge &amp;lt;simulationname&amp;gt;[--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the output for a given simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is run for the first time, all the necessary information from the Cactus build configuration is brought into a specific simulation folder created &lt;br /&gt;
underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;. Contained inside this folder, which has the same name as the specified simulation, are the executable, the run script, the submit script, the SIMFACTORY folder, a log file, and the output directories of each individual restart.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;btest&amp;quot; with several restarts in it&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -al btest&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 17 09:03 .&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 27 11:32 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0002&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0003&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0004&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0005&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SIMFACTORY folder contains the executable, the necessary script files needed for submitting and execution, and a properties.ini file that is used by the Simulation Factory to store &lt;br /&gt;
information about the simulation. &lt;br /&gt;
&lt;br /&gt;
Each time a simulation is either run or submitted, a restart directory is created underneath the simulation directory.  This restart folder has the format of output-####, starting with&lt;br /&gt;
output-0001. Contained inside the restart folder are several internal files, the output written to stdout and stderr from the simulation, and the simulation output itself. The simulation output is stored inside a directory named after the basename of the parameter file. An example output directory is below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 output-0001]$ ls -al&lt;br /&gt;
 total 172&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 17 21:06 .&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 27 11:29 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      0 Sep 17 09:06 LOG&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      9 Sep 17 09:06 mpd_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     32 Sep 17 09:06 mpi_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     33 Sep 17 09:06 NODELIST&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers  20480 Sep 17 16:12 qc0-mclachlan&lt;br /&gt;
 -rw-------  1 mwt lsuusers   2520 Sep 17 21:06 qc0-mclachlan.err&lt;br /&gt;
 -rw-------  1 mwt lsuusers 108210 Sep 17 21:06 qc0-mclachlan.out&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
 lrwxrwxrwx  1 mwt lsuusers     23 Sep 17 09:06 scratch -&amp;gt; /var/scratch/mwt/250072&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers   4096 Sep 17 09:06 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is created, it copies the submit script and the run script from the build configuration into the basedir/&amp;lt;simulation&amp;gt;/SIMFACTORY folder. The executable goes in the exe/ folder, the run and submit scripts into the run/ folder, the Cactus options list into the cfg/ folder, and the parfile into the par/ folder. Below shows an example SIMFACTORY directory&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 SIMFACTORY]$ ls -alR&lt;br /&gt;
 .:&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 cfg&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 data&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:05 exe&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 par&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  740 Sep 17 09:06 properties.ini&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers 4096 Sep 17 09:06 run&lt;br /&gt;
 &lt;br /&gt;
 ./cfg:&lt;br /&gt;
 total 12&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 4041 Sep 17 09:06 OptionList&lt;br /&gt;
&lt;br /&gt;
 ./exe:&lt;br /&gt;
 total 121408&lt;br /&gt;
 -rwxr-xr-x  1 mwt lsuusers 124306159 Sep 17 09:06 cactus_sim&lt;br /&gt;
&lt;br /&gt;
 ./par:&lt;br /&gt;
 total 24&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers 13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
&lt;br /&gt;
./run:&lt;br /&gt;
total 16&lt;br /&gt;
-rw-r--r--  1 mwt lsuusers 1162 Sep 17 09:06 RunScript&lt;br /&gt;
-rw-r--r--  1 mwt lsuusers  410 Sep 17 09:06 SubmitScript&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1805</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1805"/>
		<updated>2010-09-30T18:55:40Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* What&amp;#039;s Produced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; time you submit a simulation. Subsequent submissions of the same simulation will use whatever configuration was specified the first time. Here is an example of submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned options&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand, where you can specify the options in a certain order. If you don&amp;#039;t specify a simulation name using&lt;br /&gt;
the shorthand syntax, it will attempt to derive the simulation name from the basename of the parfile specified.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Processors Per Node&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors per node to use. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of memory to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --memory&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1024&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;cpufreq&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The frequency of the CPU&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --cpufreq&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 0&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The allocation for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;queue&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The queue for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --queue&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;checkpt&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing a queuing system. Running a simulation directly uses the same options, minus the walltime, as submitting a simulation, only using the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; command instead. An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
If this simulation does not exist, &amp;#039;&amp;#039;&amp;#039;--configuration=&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039; will need to be specified the first time the simulation is run.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
To stop a simulation&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim stop &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim purge &amp;lt;simulationname&amp;gt;[--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the output for a given simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is run for the first time, all the necessary information from the Cactus build configuration is brought into a specific simulation folder created &lt;br /&gt;
underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;. Contained inside this folder, which has the same name as the specified simulation, are the executable, the run script, the submit script, the SIMFACTORY folder, a log file, and the output directories of each individual restart.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;btest&amp;quot; with several restarts in it&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -al btest&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 17 09:03 .&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 27 11:32 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0002&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0003&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0004&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0005&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SIMFACTORY folder contains the executable, the necessary script files needed for submitting and execution, and a properties.ini file that is used by the Simulation Factory to store &lt;br /&gt;
information about the simulation. &lt;br /&gt;
&lt;br /&gt;
Each time a simulation is either run or submitted, a restart directory is created underneath the simulation directory.  This restart folder has the format of output-####, starting with&lt;br /&gt;
output-0001. Contained inside the restart folder are several internal files, the output written to stdout and stderr from the simulation, and the simulation output itself. The simulation output is stored inside a directory named after the basename of the parameter file. An example output directory is below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 output-0001]$ ls -al&lt;br /&gt;
 total 172&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 17 21:06 .&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers   4096 Sep 27 11:29 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      0 Sep 17 09:06 LOG&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers      9 Sep 17 09:06 mpd_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     32 Sep 17 09:06 mpi_nodefile&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers     33 Sep 17 09:06 NODELIST&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers  20480 Sep 17 16:12 qc0-mclachlan&lt;br /&gt;
 -rw-------  1 mwt lsuusers   2520 Sep 17 21:06 qc0-mclachlan.err&lt;br /&gt;
 -rw-------  1 mwt lsuusers 108210 Sep 17 21:06 qc0-mclachlan.out&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers  13621 Sep 17 09:06 qc0-mclachlan.par&lt;br /&gt;
 lrwxrwxrwx  1 mwt lsuusers     23 Sep 17 09:06 scratch -&amp;gt; /var/scratch/mwt/250072&lt;br /&gt;
 drwxr-xr-x  2 mwt lsuusers   4096 Sep 17 09:06 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1804</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1804"/>
		<updated>2010-09-30T18:50:20Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* What&amp;#039;s Produced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; time you submit a simulation. Subsequent submissions of the same simulation will use whatever configuration was specified the first time. Here is an example of submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned options&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand, where you can specify the options in a certain order. If you don&amp;#039;t specify a simulation name using&lt;br /&gt;
the shorthand syntax, it will attempt to derive the simulation name from the basename of the parfile specified.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Processors Per Node&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors per node to use. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of memory to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --memory&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1024&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;cpufreq&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The frequency of the CPU&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --cpufreq&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 0&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The allocation for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;queue&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The queue for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --queue&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;checkpt&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing a queuing system. Running a simulation directly uses the same options, minus the walltime, as submitting a simulation, only using the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; command instead. An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
If this simulation does not exist, &amp;#039;&amp;#039;&amp;#039;--configuration=&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039; will need to be specified the first time the simulation is run.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
To stop a simulation&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim stop &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim purge &amp;lt;simulationname&amp;gt;[--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the output for a given simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
When a simulation is run for the first time, all the necessary information from the Cactus build configuration is brought into a specific simulation folder created &lt;br /&gt;
underneath the &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;. Contained inside this folder, which has the same name as the specified simulation, are the executable, the run script, the submit script, the SIMFACTORY folder, a log file, and the output directories of each individual restart.&lt;br /&gt;
&lt;br /&gt;
Here is the contents of the simulation folder &amp;quot;btest&amp;quot; with several restarts in it&lt;br /&gt;
&lt;br /&gt;
 [mwt@eric2 simulations]$ ls -al btest&lt;br /&gt;
 total 32&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 17 09:03 .&lt;br /&gt;
 drwxr-xr-x  8 mwt lsuusers 4096 Sep 27 11:32 ..&lt;br /&gt;
 -rw-r--r--  1 mwt lsuusers    0 Sep 30 13:30 LOG&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 10:19 output-0001&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:19 output-0002&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Aug 20 10:24 output-0003&lt;br /&gt;
 drwxr-xr-x  3 mwt lsuusers 4096 Aug 20 23:57 output-0004&lt;br /&gt;
 drwxr-xr-x  4 mwt lsuusers 4096 Sep 17 09:02 output-0005&lt;br /&gt;
 drwxr-xr-x  7 mwt lsuusers 4096 Aug 20 10:18 SIMFACTORY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a simulation is either run or submitted, a &amp;#039;&amp;#039;&amp;#039;restart&amp;#039;&amp;#039;&amp;#039; is created. This restart&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1803</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1803"/>
		<updated>2010-09-30T18:35:20Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Running a Simulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; time you submit a simulation. Subsequent submissions of the same simulation will use whatever configuration was specified the first time. Here is an example of submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned options&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand, where you can specify the options in a certain order. If you don&amp;#039;t specify a simulation name using&lt;br /&gt;
the shorthand syntax, it will attempt to derive the simulation name from the basename of the parfile specified.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Processors Per Node&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors per node to use. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of memory to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --memory&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1024&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;cpufreq&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The frequency of the CPU&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --cpufreq&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 0&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The allocation for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;queue&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The queue for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --queue&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;checkpt&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing a queuing system. Running a simulation directly uses the same options, minus the walltime, as submitting a simulation, only using the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; command instead. An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
If this simulation does not exist, &amp;#039;&amp;#039;&amp;#039;--configuration=&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039; will need to be specified the first time the simulation is run.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
To stop a simulation&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim stop &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim purge &amp;lt;simulationname&amp;gt;[--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the output for a given simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1802</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1802"/>
		<updated>2010-09-30T18:34:45Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Managing Simulations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; time you submit a simulation. Subsequent submissions of the same simulation will use whatever configuration was specified the first time. Here is an example of submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned options&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand, where you can specify the options in a certain order. If you don&amp;#039;t specify a simulation name using&lt;br /&gt;
the shorthand syntax, it will attempt to derive the simulation name from the basename of the parfile specified.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Processors Per Node&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors per node to use. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of memory to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --memory&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1024&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;cpufreq&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The frequency of the CPU&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --cpufreq&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 0&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The allocation for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --allocation&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;queue&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The queue for the simulation to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --queue&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;checkpt&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing a queuing system. Running a simulation directly uses the same options, minus the walltime, as submitting a simulation, only using the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; command instead. An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
If this simulation does not exist, like previously, &amp;#039;&amp;#039;&amp;#039;--configuration=&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039; will need to be specified the first time the simulation is run.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Running ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
&lt;br /&gt;
To launch an interactive session on a compute node, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim interactive --procs=8 --walltime=4:00:00&lt;br /&gt;
&lt;br /&gt;
To stop a simulation&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim stop &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To purge (put in the basedir/TRASH folder) an existing simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim purge &amp;lt;simulationname&amp;gt;[--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
To show the output for a given simulation&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim show-output &amp;lt;simulationname&amp;gt; [--restart-id=&amp;lt;restartid&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1801</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1801"/>
		<updated>2010-09-30T18:29:19Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Managing Simulations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; time you submit a simulation. Subsequent submissions of the same simulation will use whatever configuration was specified the first time. Here is an example of submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned options&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand, where you can specify the options in a certain order. If you don&amp;#039;t specify a simulation name using&lt;br /&gt;
the shorthand syntax, it will attempt to derive the simulation name from the basename of the parfile specified.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional Options: Submission ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Processors Per Node&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors per node to use. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --ppn&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of memory to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --memory&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1024&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;cpufreq&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The frequency of the CPU&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --cpufreq&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 0&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can execute a simulation directly, bypassing a queuing system. Running a simulation directly uses the same options, minus the walltime, as submitting a simulation, only using the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; command instead. An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim run static_tov --parfile=par/static_tov.par --procs=8&lt;br /&gt;
&lt;br /&gt;
If this simulation does not exist, like previously, &amp;#039;&amp;#039;&amp;#039;--configuration=&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039; will need to be specified the first time the simulation is run.&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
See [[#Aditional Options: Submission]]&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1800</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1800"/>
		<updated>2010-09-30T18:19:59Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Managing Simulations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;--configuration&amp;#039;&amp;#039;&amp;#039; only needs to be specified the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; time you submit a simulation. Subsequent submissions of the same simulation will use whatever configuration was specified the first time. Here is an example of submitting a simulation named &amp;quot;static_tov&amp;quot; using the aforementioned options&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit static_tov --configuration sim-debug --parfile=par/static_tov.par --walltime=4:00:00 --procs=8&lt;br /&gt;
&lt;br /&gt;
It is possible to submit a simulation using shorthand, where you can specify the options in a certain order. If you don&amp;#039;t specify a simulation name using&lt;br /&gt;
the shorthand syntax, it will attempt to derive the simulation name from the basename of the parfile specified.&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit [&amp;lt;simulationname&amp;gt;] &amp;lt;parfile&amp;gt; &amp;lt;walltime&amp;gt; &amp;lt;procs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim submit par/static_tov.par 4:00:00 8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1799</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1799"/>
		<updated>2010-09-30T18:14:10Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Managing Simulations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1798</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1798"/>
		<updated>2010-09-30T18:13:41Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Managing Simulations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
Four primary pieces of information are necessary when submitting a simulation to the host queuing system. They are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus build configuration to use.&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --configuration&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: &amp;quot;sim&amp;quot;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Parfile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Cactus parameter file to use&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039;: --parfile&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Walltime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The amount of CPU time to request&lt;br /&gt;
&amp;lt;li&amp;gt; option: --walltime&lt;br /&gt;
&amp;lt;li&amp;gt; default: MDB Key: maxwalltime&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Procs&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The number of processors to use &lt;br /&gt;
&amp;lt;li&amp;gt; option: --procs&lt;br /&gt;
&amp;lt;li&amp;gt; default: 1&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1796</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1796"/>
		<updated>2010-09-29T18:42:52Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1795</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1795"/>
		<updated>2010-09-29T17:55:35Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Managing Simulations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient, consistent facility for submitting, executing, and managing simulations. This is accomplished through two main commands: &amp;#039;&amp;#039;&amp;#039;submit&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
The status of all simulations can be seen with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations&lt;br /&gt;
&lt;br /&gt;
If a more detailed look at each simulation is required, the verbose option can be specified&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-simulations --verbose&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
&lt;br /&gt;
When submitting a simulation&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1794</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1794"/>
		<updated>2010-09-29T16:53:12Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Script Locations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: optionlist&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: submitscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; MDB Key: runscript&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To determine, for instance, which option list queenbee uses by default, issue the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb queenbee | grep optionlist&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1793</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1793"/>
		<updated>2010-09-29T16:50:21Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Script Locations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides default scripts for every one of its preconfigured machines. These scripts can be found in the following locations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Option Lists&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/optionlists&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Submit Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/submitscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;Run Scripts&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Location: simfactory/etc/runscripts&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1792</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1792"/>
		<updated>2010-09-29T16:46:46Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* What&amp;#039;s Produced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1791</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1791"/>
		<updated>2010-09-29T16:46:22Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* What&amp;#039;s Produced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1790</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1790"/>
		<updated>2010-09-29T16:45:52Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* What&amp;#039;s Produced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList                         * Specified Cactus options list &lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1789</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1789"/>
		<updated>2010-09-29T16:45:43Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* What&amp;#039;s Produced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList                     * Specified Cactus options list &lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1788</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1788"/>
		<updated>2010-09-29T16:45:06Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* What&amp;#039;s Produced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  &amp;#039;&amp;#039;&amp;#039;Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1787</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1787"/>
		<updated>2010-09-29T16:44:57Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* What&amp;#039;s Produced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;&amp;#039;&amp;#039;sim&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  &amp;#039;&amp;#039;&amp;#039;* Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1786</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1786"/>
		<updated>2010-09-29T16:44:13Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* What&amp;#039;s Produced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;sim&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe/&lt;br /&gt;
 Cactus/exe/cactus_sim                                  * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
 Cactus/configs/sim/&lt;br /&gt;
 Cactus/configs/sim/bindings/&lt;br /&gt;
 Cactus/configs/sim/build/&lt;br /&gt;
 Cactus/configs/sim/config-data/&lt;br /&gt;
 Cactus/configs/sim/lib/&lt;br /&gt;
 Cactus/configs/sim/scratch/&lt;br /&gt;
 Cactus/configs/sim/OptionList&lt;br /&gt;
 Cactus/configs/sim/RunScript&lt;br /&gt;
 Cactus/configs/sim/SubmitScript&lt;br /&gt;
 Cactus/configs/sim/ThornList&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1785</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1785"/>
		<updated>2010-09-29T16:41:29Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory creates a configuration based upon the input parameters (or defaults) and the compiled executable. Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree. The following is an example directory structure of the compiled configuration &amp;#039;sim&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Cactus/&lt;br /&gt;
 Cactus/exe&lt;br /&gt;
 Cactus/exe/cactus_sim * Follows the naming convention cactus_&amp;lt;configuration&amp;gt;&lt;br /&gt;
 Cactus/configs&lt;br /&gt;
 Cactus/configs/&lt;br /&gt;
&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1784</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1784"/>
		<updated>2010-09-29T16:26:30Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* = Additional Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1783</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1783"/>
		<updated>2010-09-29T16:26:21Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Building a Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
==== Additional Options ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1782</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1782"/>
		<updated>2010-09-29T16:22:16Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Building a Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
The following additional arguments can be specified&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--debug&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--optimise&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--profile&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--unsafe&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--reconfig&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;--clean&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you choose to omit the configuration name, it will default to &amp;#039;sim&amp;#039;. If one of the following options is specified, debug, profile, unsafe, and optimise, then the configuration name&lt;br /&gt;
will append the specified option onto the end of it. For instance, if you specify --debug with a configuration name &amp;#039;mybuild&amp;#039;, then the configuration name will be mybuild-debug&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1781</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1781"/>
		<updated>2010-09-29T16:19:43Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Building a Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For any pre-configured Machine Database entry, the defaults for &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; should suffice.&lt;br /&gt;
&lt;br /&gt;
The following additional arguments can be specified&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; --debug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable debugging in the Cactus executable&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; --optimise &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable optimisation in the Cactus executable&lt;br /&gt;
&amp;lt;li&amp;gt; * WIll be OFF if --debug is enabled. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; --profile&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with profiling &lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; --unsafe&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Build Cactus with unsafe options&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; --reconfig&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Force Cactus to reconfigure before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; --clean&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Clean Cactus before building&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To build a configuration with a specified thornlist, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim build [&amp;lt;configurationname&amp;gt;] --thornlist=&amp;lt;thornlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can omit&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1780</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1780"/>
		<updated>2010-09-29T16:12:29Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Building a Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Thornlist&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;thornlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--thornlist=&amp;lt;thornlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Options List&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;optionlist&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--optionlist=&amp;lt;optionlist&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Submission Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;submitscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--submitscript=&amp;lt;submitscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The Run Script&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Default: &amp;#039;&amp;#039;&amp;#039;runscript&amp;#039;&amp;#039;&amp;#039; parameter of the Machine Database entry&lt;br /&gt;
&amp;lt;li&amp;gt; Override: &amp;#039;&amp;#039;&amp;#039;--runscript=&amp;lt;runscript&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1779</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1779"/>
		<updated>2010-09-29T16:08:28Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Cactus Build Configurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a central facility for configuring and building Cactus source tree. When a Cactus source tree is compiled, The Simulation Factory creates a &amp;#039;&amp;#039;&amp;#039;configuration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
for the compiled executable, storing with it information such as the Cactus options list, and the provided submission and run scripts. This configuration represents the core of what is necessary to perform Cactus execution and submission.&lt;br /&gt;
&lt;br /&gt;
Configurations live in the &amp;#039;&amp;#039;&amp;#039;configs&amp;#039;&amp;#039;&amp;#039; folder inside the Cactus source tree, and compiled executables live inside the &amp;#039;&amp;#039;&amp;#039;exe&amp;#039;&amp;#039;&amp;#039; folder also inside the Cactus source tree.&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
&lt;br /&gt;
To list all existing configurations, use the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-configurations&lt;br /&gt;
&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to build a configuration, four pieces of information are needed. &lt;br /&gt;
&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1778</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1778"/>
		<updated>2010-09-29T15:57:46Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Local/Remote Command Execution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/g {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1777</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1777"/>
		<updated>2010-09-29T15:57:10Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Syncing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To sync only parfiles, you can negate the  &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; argument with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt; --nosync-sourcetree&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/s {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1776</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1776"/>
		<updated>2010-09-29T15:54:44Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Syncing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/s {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1775</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1775"/>
		<updated>2010-09-29T15:53:41Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Syncing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sourcetree&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sourcetree&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039; configuration entry.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of the list of files and folders specified by the aforementioned &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039; configuration entry. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/s {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1774</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1774"/>
		<updated>2010-09-29T15:51:14Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-sources&amp;#039;&amp;#039;&amp;#039; is enabled&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied when the option &amp;#039;&amp;#039;&amp;#039;--sync-parfiles&amp;#039;&amp;#039;&amp;#039; is enabled. This list of files typically includes just parameter files.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to true. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/s {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1773</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1773"/>
		<updated>2010-09-29T15:48:34Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Performing a Sync */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync command takes two arguments, both of which default to true. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enable syncing of &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sync-parfiles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A default sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/s {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
	<entry>
		<id>https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1772</id>
		<title>Simulation Factory Advanced Tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.einsteintoolkit.org/et-docs/index.php?title=Simulation_Factory_Advanced_Tutorial&amp;diff=1772"/>
		<updated>2010-09-29T15:45:52Z</updated>

		<summary type="html">&lt;p&gt;Mthomas: /* Syncing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simulation Factory is an effective method for controlling all facets of a Cactus simulation. It provides a central&lt;br /&gt;
facility for managing an authoritative source tree, controlling and providing remote access to many commonly-used HPC machines including &lt;br /&gt;
LONI and the TeraGrid, builds and compiles a Cactus source tree into many independent configurations, and can also manage a simulation all the&lt;br /&gt;
way from creation to output.&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
In order to begin using The Simulation Factory, it must be checked out from &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039;.  The Simulation Factory typically resides in the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
folder inside a Cactus source tree. This can be accomplished with the following &amp;#039;&amp;#039;&amp;#039;svn&amp;#039;&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_2010 simfactory&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory can also be placed in an independent location to be used with multiple Cactus source trees. This approach will be detailed later.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Once The Simulation Factory has been checked out from svn, the next step is to create two required configuration files. Assuming The Simulation Factory&lt;br /&gt;
has been checked out into the &amp;#039;&amp;#039;&amp;#039;simfactory&amp;#039;&amp;#039;&amp;#039; folder, this initial configuration can be accomplished with the following commands:&lt;br /&gt;
 &lt;br /&gt;
 cp simfactory/etc/defs.ini.example simfactory/etc/defs.ini&lt;br /&gt;
 cp simfactory/etc/defs.local.ini.simple simfactory/etc/defs.local.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_LOGIN with your usual username&lt;br /&gt;
&amp;lt;li&amp;gt;YOUR@EMAIL.ADDRESS with your usual email address &lt;br /&gt;
&amp;lt;li&amp;gt;YOUR_ALLOCATION with your usual allocation&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Configuration ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory contains a database known as the Machine Database. This collection of information is used to define and help mitigate the uniqueness of each individual HPC machine. The Machine Database is an authoritative collection of information, and is generally not meant to be edited by a user. To add, or change properties of a Machine Database entry, &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; is used. For instance, if an alternative username, allocation, and sourcebasedir is needed for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039;, you would add the following section:&lt;br /&gt;
&lt;br /&gt;
 [queenbee]&lt;br /&gt;
 user          = queenbee_username&lt;br /&gt;
 allocation    = queenbee_allocation&lt;br /&gt;
 sourcebasedir = /work/@USER@&lt;br /&gt;
&lt;br /&gt;
There are several macros that can aide in simplifying configuration. For configuration purposes, the most useful is &amp;#039;&amp;#039;&amp;#039;@USER@&amp;#039;&amp;#039;&amp;#039;. This macro expands to the &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039; property of the Machine Database entry. If user was defined in the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; then it will contain that value. An expanded list of useful macros can be found in the [[#Macros]] section&lt;br /&gt;
&lt;br /&gt;
To get a list of preconfigured machines, issue the following command:&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
=== Local Workstation Configuration ===&lt;br /&gt;
&lt;br /&gt;
In order to use a local workstation with The Simulation Factory, a Machine Database entry must be created. Before getting started, the hostname of the local&lt;br /&gt;
machine must be determined. It is through this hostname that The Simulation Factory matches a Machine Database entry to the executing machine. The hostname&lt;br /&gt;
can be determined using the following command:&lt;br /&gt;
 &lt;br /&gt;
 hostname&lt;br /&gt;
&lt;br /&gt;
Once you have the hostname, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 cp simfactory/etc/mdb/generic.ini simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&lt;br /&gt;
&lt;br /&gt;
Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/mdb/&amp;lt;hostname&amp;gt;.ini&amp;#039;&amp;#039;&amp;#039; and replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;[generic]&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;[&amp;lt;hostname&amp;gt;]&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The section header for this machine database entry must be a unique value and must match the &amp;#039;&amp;#039;&amp;#039;nickname&amp;#039;&amp;#039;&amp;#039; property exactly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;nickname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;nickname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;hostname = generic&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;hostname = &amp;lt;hostname&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir = /home/@USER@&amp;#039;&amp;#039;&amp;#039; with the correct &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039; path under which all your Cactus source trees reside. &lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir = /home/@USER@/simulations&amp;#039;&amp;#039;&amp;#039; with the desired folder for simulation output&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
user, email, and allocation can safely be ignored, as the values from the &amp;#039;&amp;#039;&amp;#039;[default]&amp;#039;&amp;#039;&amp;#039; section of &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; will propagate to this entry.&lt;br /&gt;
&lt;br /&gt;
== Accessing Remote Systems ==&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides a convenient facility for handling remote communication and file transfer with any known machine. Using this facility, a user can synchronize &lt;br /&gt;
an authoritative source tree, get an interactive shell on the remote system, or execute a command, locally or remotely. &lt;br /&gt;
&lt;br /&gt;
=== Information Commands === &lt;br /&gt;
&lt;br /&gt;
The following commands can be used to discover information about a machine, or list all known, configured machines.&lt;br /&gt;
&lt;br /&gt;
List all known machines&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim list-machines&lt;br /&gt;
&lt;br /&gt;
List details about a single machine&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim list-machine &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print the current Machine Database to the screen&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb&lt;br /&gt;
&lt;br /&gt;
Print the Machine Database entry for a single machine&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the machine that The Simulation Factory is currently being executed on&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
Historically, Cactus and the Einstein Toolkit have not been installed into a central location, and instead are built on-demand for a certain thornlist. In order to aide this approach, The Simulation Factory has the ability to synchronize a Cactus/Einstein Toolkit developer&amp;#039;s local, authoritative source tree to a remote HPC machine to be compiled and ran. &lt;br /&gt;
&lt;br /&gt;
Remote access services are implemented on top of ssh, and ssh-like mechanisms such as gsi-ssh. Currently you must manually manage all ssh keys and passwords.&lt;br /&gt;
&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
&lt;br /&gt;
Before syncing a small amount of configuration must be performed. It is necessary to either verify the defaults are correct, or to define the correct values for the following keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;sourcebasedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory under which the Cactus source tree will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;basedir&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The root directory which all simulation output will reside&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The username for remote access&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see the configured values by issuing the following command&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim print-mdb &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is determined that the values for those entries need to be changed. Edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.local.ini&amp;#039;&amp;#039;&amp;#039; and add an entry for the machine being used. This entry will augment&lt;br /&gt;
the existing Machine Database entry, updating the default values with the values specified. An example for the machine &amp;#039;&amp;#039;&amp;#039;queenbee&amp;#039;&amp;#039;&amp;#039; can be see in the [[#Additional Configuration]] section.&lt;br /&gt;
&lt;br /&gt;
Additionally, to see/modify the list of files and directories that are synchronized, edit &amp;#039;&amp;#039;&amp;#039;simfactory/etc/defs.ini&amp;#039;&amp;#039;&amp;#039; and find the following two keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-sources&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be copied&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; &amp;#039;&amp;#039;&amp;#039;rsync-excludes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The list of files and directories that will be expressly excluded from syncing&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performing a Sync ====&lt;br /&gt;
&lt;br /&gt;
A sync can be performed by issuing the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the desire is to perform a sync from one remote machine to another remote machine, this can be accomplished with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim sync &amp;lt;tomachine&amp;gt; --remotemachine=&amp;lt;frommachine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Login ===&lt;br /&gt;
&lt;br /&gt;
The Simulation Factory provides the ability to receive an interactive shell on the remote system. This can be initiated with the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim login &amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Local/Remote Command Execution ===&lt;br /&gt;
&lt;br /&gt;
To execute a command locally via The Simulation Factory, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the command is complex, and requires arguments, the command must be quoted. For example&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;quot;ls -al&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To execute a remote command, use the following command&lt;br /&gt;
&lt;br /&gt;
 simfactory/sim execute &amp;lt;command&amp;gt; --remotemachine=&amp;lt;machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a complex command being executed remotely is&lt;br /&gt;
 &lt;br /&gt;
 simfactory/sim execute &amp;quot;find . -name *.py -exec sed -i .bk -n s/foo/bar/s {} \;&amp;quot; --remotemachine=queenbee&lt;br /&gt;
&lt;br /&gt;
== Cactus Build Configurations ==&lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Building a Configuration ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Managing Simulations == &lt;br /&gt;
&lt;br /&gt;
=== Information Commands ===&lt;br /&gt;
=== Submitting a Simulation ===&lt;br /&gt;
=== Running a Simulation ===&lt;br /&gt;
=== Other Simulation Commands ===&lt;br /&gt;
=== What&amp;#039;s Produced ===&lt;br /&gt;
=== Script Locations ===&lt;br /&gt;
&lt;br /&gt;
== Other Advanced Features ==&lt;br /&gt;
&lt;br /&gt;
=== Macros === &lt;br /&gt;
=== Archiving ===&lt;/div&gt;</summary>
		<author><name>Mthomas</name></author>
		
	</entry>
</feed>