/usr/share/doc/simgrid/html/options.html is in simgrid-doc 3.10-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>SimGrid: Simgrid options and configurations</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">SimGrid
 <span id="projectnumber">3.10</span>
</div>
<div id="projectbrief">Versatile Simulation of Distributed Systems</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="http://simgrid.gforge.inria.fr/"><span>Home page</span></a></li>
<li><a href="http://simgrid.gforge.inria.fr/documentation.html"><span>Online documentation</span></a></li>
<li><a href="https://gforge.inria.fr/projects/simgrid"><span>Dev's Corner</span></a></li>
<li> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('options.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">Simgrid options and configurations </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>A number of options can be given at runtime to change the default SimGrid behavior. For a complete list of all configuration options accepted by the SimGrid version used in your simulator, simply pass the –help configuration flag to your program. If some of the options are not documented on this page, this is a bug that you should please report so that we can fix it. Note that some of the options presented here may not be available in your simulators, depending on the <a class="el" href="install.html#install_src_config">compile-time options</a> that you used.</p>
<h1><a class="anchor" id="options_using"></a>
Passing configuration options to the simulators</h1>
<p>There is several way to pass configuration options to the simulators. The most common way is to use the <code>–cfg</code> command line argument. For example, to set the item <code>Item</code> to the value <code>Value</code>, simply type the following: </p>
<pre class="fragment">my_simulator --cfg=Item:Value (other arguments)
</pre><p>Several <code>–cfg</code> command line arguments can naturally be used. If you need to include spaces in the argument, don't forget to quote the argument. You can even escape the included quotes (write \' for ' if you have your argument between ').</p>
<p>Another solution is to use the <code><config></code> tag in the platform file. The only restriction is that this tag must occure before the first platform element (be it <code><AS></code>, <code><cluster></code>, <code><peer></code> or whatever). The <code><config></code> tag takes an <code>id</code> attribute, but it is currently ignored so you don't really need to pass it. The important par is that within that tag, you can pass one or several <code><prop></code> tags to specify the configuration to use. For example, setting <code>Item</code> to <code>Value</code> can be done by adding the following to the beginning of your platform file: </p>
<pre class="fragment"><config>
<prop id="Item" value="Value"/>
</config>
</pre><p>A last solution is to pass your configuration directly using the C interface. If you happen to use the MSG interface, this is very easy with the <a class="el" href="group__msg__simulation.html#ga35037b57281f860b92ed7704d37de78f" title="set a configuration variable">MSG_config()</a> function. If you do not use MSG, that's a bit more complex, as you have to mess with the internal configuration set directly as follows. Check the <a class="el" href="group__XBT__config.html">relevant page</a> for details on all the functions you can use in this context, <code>_sg_cfg_set</code> being the only configuration set currently used in SimGrid.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include <xbt/config.h></span></div>
<div class="line"></div>
<div class="line"><span class="keyword">extern</span> <a class="code" href="group__XBT__cfg__use.html#gac5894d3947cb042db07d729ebfe064ca" title="Configuration set's data type is opaque.">xbt_cfg_t</a> _sg_cfg_set;</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[]) {</div>
<div class="line"> <a class="code" href="group__SD__simulation.html#gaa4c19ede9d99b8925e62f30c52f1e65f" title="Initializes SD internal data.">SD_init</a>(&argc, argv);</div>
<div class="line"></div>
<div class="line"> <span class="comment">/* Prefer MSG_config() if you use MSG!! */</span></div>
<div class="line"> <a class="code" href="group__XBT__cfg__use.html#ga660f47d0af70382a502cee9734e32229" title="Add values parsed from a string into a config set.">xbt_cfg_set_parse</a>(_sg_cfg_set,<span class="stringliteral">"Item:Value"</span>);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Rest of your code</span></div>
<div class="line">}</div>
</div><!-- fragment --><h1><a class="anchor" id="options_model"></a>
Configuring the platform models</h1>
<h2><a class="anchor" id="options_model_select"></a>
Selecting the platform models</h2>
<p>SimGrid comes with several network and CPU models built in, and you can change the used model at runtime by changing the passed configuration. The three main configuration items are given below. For each of these items, passing the special <code>help</code> value gives you a short description of all possible values. Also, <code>–help-models</code> should provide information about all models for all existing resources.</p>
<ul>
<li><b>network/model</b>: specify the used network model</li>
<li><b>cpu/model</b>: specify the used CPU model</li>
<li><b>workstation/model</b>: specify the used workstation model</li>
</ul>
<p>As of writting, the accepted network models are the following. Over the time new models can be added, and some experimental models can be removed; check the values on your simulators for an uptodate information. Note that the CM02 model is described in the research report <a href="ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR2002/RR2002-40.ps.gz">A Network Model for Simulation of Grid Application</a> while LV08 is described in <a href="http://mescal.imag.fr/membres/arnaud.legrand/articles/simutools09.pdf">Accuracy Study and Improvement of Network Simulation in the SimGrid Framework</a>.</p>
<ul>
<li><b>LV08</b> (default one): Realistic network analytic model (slow-start modeled by multiplying latency by 10.4, bandwidth by .92; bottleneck sharing uses a payload of S=8775 for evaluating RTT)</li>
<li><b>Constant:</b> Simplistic network model where all communication take a constant time (one second). This model provides the lowest realism, but is (marginally) faster.</li>
<li><b>SMPI:</b> Realistic network model specifically tailored for HPC settings (accurate modeling of slow start with correction factors on three intervals: < 1KiB, < 64 KiB, >= 64 KiB). See also <a class="el" href="options.html#options_model_network_coefs">this section</a> for more info.</li>
<li><b>CM02:</b> Legacy network analytic model (Very similar to LV08, but without corrective factors. The timings of small messages are thus poorly modeled)</li>
<li><b>Reno:</b> Model from Steven H. Low using lagrange_solve instead of lmm_solve (experts only; check the code for more info).</li>
<li><b>Reno2:</b> Model from Steven H. Low using lagrange_solve instead of lmm_solve (experts only; check the code for more info).</li>
<li><b>Vegas:</b> Model from Steven H. Low using lagrange_solve instead of lmm_solve (experts only; check the code for more info).</li>
</ul>
<p>If you compiled SimGrid accordingly, you can use packet-level network simulators as network models (see <a class="el" href="pls.html">Packet level simulation</a>). In that case, you have two extra models, described below, and some <a class="el" href="options.html#options_pls">specific</a>additional configuration flags".</p>
<ul>
<li><b>GTNets:</b> Network pseudo-model using the GTNets simulator instead of an analytic model</li>
<li><b>NS3:</b> Network pseudo-model using the NS3 tcp model instead of an analytic model</li>
</ul>
<p>Concerning the CPU, we have only one model for now:</p>
<ul>
<li><b>Cas01:</b> Simplistic CPU model (time=size/power)</li>
</ul>
<p>The workstation concept is the aggregation of a CPU with a network card. Three models exists, but actually, only 2 of them are interesting. The "compound" one is simply due to the way our internal code is organized, and can easily be ignored. So at the end, you have two workstation models: The default one allows to aggregate an existing CPU model with an existing network model, but does not allow parallel tasks because these beasts need some collaboration between the network and CPU model. That is why, ptask_07 is used by default when using SimDag.</p>
<ul>
<li><b>default:</b> Default workstation model. Currently, CPU:Cas01 and network:LV08 (with cross traffic enabled)</li>
<li><b>compound:</b> Workstation model that is automatically chosen if you change the network and CPU models</li>
<li><b>ptask_L07:</b> Workstation model somehow similar to Cas01+CM02 but allowing parallel tasks</li>
</ul>
<h2><a class="anchor" id="options_model_optim"></a>
Optimization level of the platform models</h2>
<p>The network and CPU models that are based on lmm_solve (that is, all our analytical models) accept specific optimization configurations.</p>
<ul>
<li>items <b>network/optim</b> and <b>CPU/optim</b> (both default to 'Lazy'):<ul>
<li><b>Lazy:</b> Lazy action management (partial invalidation in lmm + heap in action remaining).</li>
<li><b>TI:</b> Trace integration. Highly optimized mode when using availability traces (only available for the Cas01 CPU model for now).</li>
<li><b>Full:</b> Full update of remaining and variables. Slow but may be useful when debugging.</li>
</ul>
</li>
<li>items <b>network/maxmin_selective_update</b> and <b>cpu/maxmin_selective_update</b>: configure whether the underlying should be lazily updated or not. It should have no impact on the computed timings, but should speed up the computation.</li>
</ul>
<p>It is still possible to disable the <code>maxmin_selective_update</code> feature because it can reveal counter-productive in very specific scenarios where the interaction level is high. In particular, if all your communication share a given backbone link, you should disable it: without <code>maxmin_selective_update</code>, every communications are updated at each step through a simple loop over them. With that feature enabled, every communications will still get updated in this case (because of the dependency induced by the backbone), but through a complicated pattern aiming at following the actual dependencies.</p>
<h2><a class="anchor" id="options_model_precision"></a>
Numerical precision of the platform models</h2>
<p>The analytical models handle a lot of floating point values. It is possible to change the epsilon used to update and compare them through the <b>maxmin/precision</b> item (default value: 0.00001). Changing it may speedup the simulation by discarding very small actions, at the price of a reduced numerical precision.</p>
<h2><a class="anchor" id="options_model_nthreads"></a>
Parallel threads for model updates</h2>
<p>By default, Surf computes the analytical models sequentially to share their resources and update their actions. It is possible to run them in parallel, using the <b>surf/nthreads</b> item (default value: 1). If you use a negative or null value, the amount of available cores is automatically detected and used instead.</p>
<p>Depending on the workload of the models and their complexity, you may get a speedup or a slowdown because of the synchronization costs of threads.</p>
<h2><a class="anchor" id="options_model_network"></a>
Configuring the Network model</h2>
<h3><a class="anchor" id="options_model_network_gamma"></a>
Maximal TCP window size</h3>
<p>The analytical models need to know the maximal TCP window size to take the TCP congestion mechanism into account. This is set to 20000 by default, but can be changed using the <b>network/TCP_gamma</b> item.</p>
<p>On linux, this value can be retrieved using the following commands. Both give a set of values, and you should use the last one, which is the maximal size.</p>
<pre class="fragment">cat /proc/sys/net/ipv4/tcp_rmem # gives the sender window
cat /proc/sys/net/ipv4/tcp_wmem # gives the receiver window
</pre><h3><a class="anchor" id="options_model_network_coefs"></a>
Corrective simulation factors</h3>
<p>These factors allow to betterly take the slow start into account. The corresponding values were computed through data fitting one the timings of packet-level simulators. You should not change these values unless you are really certain of what you are doing. See <a href="http://mescal.imag.fr/membres/arnaud.legrand/articles/simutools09.pdf">Accuracy Study and Improvement of Network Simulation in the SimGrid Framework</a> for more informations about these coeficients.</p>
<p>If you are using the SMPI model, these correction coeficients are themselves corrected by constant values depending on the size of the exchange. Again, only hardcore experts should bother about this fact.</p>
<h3><a class="anchor" id="options_model_network_crosstraffic"></a>
Simulating cross-traffic</h3>
<p>As of SimGrid v3.7, cross-traffic effects can be taken into account in analytical simulations. It means that ongoing and incoming communication flows are treated independently. In addition, the LV08 model adds 0.05 of usage on the opposite direction for each new created flow. This can be useful to simulate some important TCP phenomena such as ack compression.</p>
<p>For that to work, your platform must have two links for each pair of interconnected hosts. An example of usable platform is available in <code>examples/msg/gtnets/crosstraffic-p.xml</code>.</p>
<p>This is activated through the <b>network/crosstraffic</b> item, that can be set to 0 (disable this feature) or 1 (enable it).</p>
<p>Note that with the default workstation model this option is activated by default.</p>
<h3><a class="anchor" id="options_model_network_coord"></a>
Coordinated-based network models</h3>
<p>When you want to use network coordinates, as it happens when you use an <AS> in your platform file with <code>Vivaldi</code> as a routing, you must set the <b>network/coordinates</b> to <code>yes</code> so that all mandatory initialization are done in the simulator.</p>
<h3><a class="anchor" id="options_model_network_sendergap"></a>
Simulating sender gap</h3>
<p>(this configuration item is experimental and may change or disapear)</p>
<p>It is possible to specify a timing gap between consecutive emission on the same network card through the <b>network/sender_gap</b> item. This is still under investigation as of writting, and the default value is to wait 10 microseconds (1e-5 seconds) between emissions.</p>
<h3><a class="anchor" id="options_model_network_asyncsend"></a>
Simulating asyncronous send</h3>
<p>(this configuration item is experimental and may change or disapear)</p>
<p>It is possible to specify that messages below a certain size will be sent as soon as the call to MPI_Send is issued, without waiting for the correspondant receive. This threshold can be configured through the <b>smpi/async_small_thres</b> item. The default value is 0. This behavior can also be manually set for MSG mailboxes, by setting the receiving mode of the mailbox with a call to <a class="el" href="group__msg__mailbox__management.html#ga6f960676ac24fb9c64da2bfcc6f24da8">MSG_mailbox_set_async</a> . For MSG, all messages sent to this mailbox will have this behavior, so consider using two mailboxes if needed.</p>
<p>This value needs to be smaller than or equals to the threshold set at <a class="el" href="options.html#options_model_smpi_detached">Simulating MPI detached send</a> , because asynchronous messages are meant to be detached as well.</p>
<h3><a class="anchor" id="options_pls"></a>
Configuring packet-level pseudo-models</h3>
<p>When using the packet-level pseudo-models, several specific configuration flags are provided to configure the associated tools. There is by far not enough such SimGrid flags to cover every aspects of the associated tools, since we only added the items that we needed ourselves. Feel free to request more items (or even better: provide patches adding more items).</p>
<p>When using NS3, the only existing item is <b>ns3/TcpModel</b>, corresponding to the ns3::TcpL4Protocol::SocketType configuration item in NS3. The only valid values (enforced on the SimGrid side) are 'NewReno' or 'Reno' or 'Tahoe'.</p>
<p>When using GTNeTS, two items exist:</p>
<ul>
<li><b>gtnets/jitter</b>, that is a double value to oscillate the link latency, uniformly in random interval [-latency*gtnets_jitter,latency*gtnets_jitter). It defaults to 0.</li>
<li><b>gtnets/jitter_seed</b>, the positive seed used to reproduce jitted results. Its value must be in [1,1e8] and defaults to 10.</li>
</ul>
<h1><a class="anchor" id="options_modelchecking"></a>
Configuring the Model-Checking</h1>
<p>To enable the experimental SimGrid model-checking support the program should be executed with the command line argument </p>
<pre class="fragment">--cfg=model-check:1
</pre><p> Safety properties are expressed as assertions using the function </p>
<pre class="fragment">void MC_assert(int prop);
</pre><h2><a class="anchor" id="options_modelchecking_liveness"></a>
Specifying a liveness property</h2>
<p>If you want to specify liveness properties (beware, that's experimental), you have to pass them on the command line, specifying the name of the file containing the property, as formated by the ltl2ba program.</p>
<pre class="fragment">--cfg=model-check/property:<filename>
</pre><p>Of course, specifying a liveness property enables the model-checking so that you don't have to give <code>–cfg=model-check:1</code> in addition.</p>
<h2><a class="anchor" id="options_modelchecking_steps"></a>
Going for stateful verification</h2>
<p>By default, the system is backtracked to its initial state to explore another path instead of backtracking to the exact step before the fork that we want to explore (this is called stateless verification). This is done this way because saving intermediate states can rapidly exhaust the available memory. If you want, you can change the value of the <code>model-check/checkpoint</code> variable. For example, the following configuration will ask to take a checkpoint every step. Beware, this will certainly explode your memory. Larger values are probably better, make sure to experiment a bit to find the right setting for your specific system.</p>
<pre class="fragment">--cfg=model-check/checkpoint:1
</pre><p>Of course, specifying this option enables the model-checking so that you don't have to give <code>–cfg=model-check:1</code> in addition.</p>
<h2><a class="anchor" id="options_modelchecking_reduction"></a>
Specifying the kind of reduction</h2>
<p>The main issue when using the model-checking is the state space explosion. To counter that problem, several exploration reduction techniques can be used. There is unfortunately no silver bullet here, and the most efficient reduction techniques cannot be applied to any properties. In particular, the DPOR method cannot be applied on liveness properties since it may break some cycles in the exploration that are important to the property validity.</p>
<pre class="fragment">--cfg=model-check/reduction:<technique>
</pre><p>For now, this configuration variable can take 2 values: none: Do not apply any kind of reduction (mandatory for now for liveness properties) dpor: Apply Dynamic Partial Ordering Reduction. Only valid if you verify local safety properties.</p>
<p>Of course, specifying a reduction technique enables the model-checking so that you don't have to give <code>–cfg=model-check:1</code> in addition.</p>
<h1><a class="anchor" id="options_virt"></a>
Configuring the User Process Virtualization</h1>
<h2><a class="anchor" id="options_virt_factory"></a>
Selecting the virtualization factory</h2>
<p>In SimGrid, the user code is virtualized in a specific mecanism allowing the simulation kernel to control its execution: when a user process requires a blocking action (such as sending a message), it is interrupted, and only gets released when the simulated clock reaches the point where the blocking operation is done.</p>
<p>In SimGrid, the containers in which user processes are virtualized are called contexts. Several context factory are provided, and you can select the one you want to use with the <b>contexts/factory</b> configuration item. Some of the following may not exist on your machine because of portability issues. In any case, the default one should be the most effcient one (please report bugs if the auto-detection fails for you). They are sorted here from the slowest to the most effient:</p>
<ul>
<li><b>thread:</b> very slow factory using full featured threads (either pthreads or windows native threads)</li>
<li><b>ucontext:</b> fast factory using System V contexts (or a portability layer of our own on top of Windows fibers)</li>
<li><b>raw:</b> amazingly fast factory using a context switching mecanism of our own, directly implemented in assembly (only available for x86 and amd64 platforms for now)</li>
</ul>
<p>The only reason to change this setting is when the debugging tools get fooled by the optimized context factories. Threads are the most debugging-friendly contextes.</p>
<h2><a class="anchor" id="options_virt_stacksize"></a>
Adapting the used stack size</h2>
<p>Each virtualized used process is executed using a specific system stack. The size of this stack has a huge impact on the simulation scalability, but its default value is rather large. This is because the error messages that you get when the stack size is too small are rather disturbing: this leads to stack overflow (overwriting other stacks), leading to segfaults with corrupted stack traces.</p>
<p>If you want to push the scalability limits of your code, you really want to reduce the <b>contexts/stack_size</b> item. Its default value is 128 (in Kib), while our Chord simulation works with stacks as small as 16 Kib, for example. For the thread factory, the default value is the one of the system, if it is too large/small, it has to be set with this parameter.</p>
<h2><a class="anchor" id="options_virt_parallel"></a>
Running user code in parallel</h2>
<p>Parallel execution of the user code is only considered stable in SimGrid v3.7 and higher. It is described in <a href="http://hal.inria.fr/inria-00602216/">INRIA RR-7653</a>.</p>
<p>If you are using the <code>ucontext</code> or <code>raw</code> context factories, you can request to execute the user code in parallel. Several threads are launched, each of them handling as much user contexts at each run. To actiave this, set the <b>contexts/nthreads</b> item to the amount of cores that you have in your computer (or lower than 1 to have the amount of cores auto-detected).</p>
<p>Even if you asked several worker threads using the previous option, you can request to start the parallel execution (and pay the associated synchronization costs) only if the potential parallelism is large enough. For that, set the <b>contexts/parallel_threshold</b> item to the minimal amount of user contexts needed to start the parallel execution. In any given simulation round, if that amount is not reached, the contexts will be run sequentially directly by the main thread (thus saving the synchronization costs). Note that this option is mainly useful when the grain of the user code is very fine, because our synchronization is now very efficient.</p>
<p>When parallel execution is activated, you can choose the synchronization schema used with the <b>contexts/synchro</b> item, which value is either:</p>
<ul>
<li><b>futex:</b> ultra optimized synchronisation schema, based on futexes (fast user-mode mutexes), and thus only available on Linux systems. This is the default mode when available.</li>
<li><b>posix:</b> slow but portable synchronisation using only POSIX primitives.</li>
<li><b>busy_wait:</b> not really a synchronisation: the worker threads constantly request new contexts to execute. It should be the most efficient synchronisation schema, but it loads all the cores of your machine for no good reason. You probably prefer the other less eager schemas.</li>
</ul>
<h1><a class="anchor" id="options_tracing"></a>
Configuring the tracing subsystem</h1>
<p>The <a class="el" href="tracing.html">tracing subsystem</a> can be configured in several different ways depending on the nature of the simulator (MSG, SimDag, SMPI) and the kind of traces that need to be obtained. See the <a class="el" href="tracing.html#tracing_tracing_options">Tracing Configuration Options subsection</a> to get a detailed description of each configuration option.</p>
<p>We detail here a simple way to get the traces working for you, even if you never used the tracing API.</p>
<ul>
<li>Any SimGrid-based simulator (MSG, SimDag, SMPI, ...) and raw traces: <pre class="fragment">--cfg=tracing:yes --cfg=tracing/uncategorized:yes --cfg=triva/uncategorized:uncat.plist
</pre> The first parameter activates the tracing subsystem, the second tells it to trace host and link utilization (without any categorization) and the third creates a graph configuration file to configure Triva when analysing the resulting trace file.</li>
</ul>
<ul>
<li>MSG or SimDag-based simulator and categorized traces (you need to declare categories and classify your tasks according to them) <pre class="fragment">--cfg=tracing:yes --cfg=tracing/categorized:yes --cfg=triva/categorized:cat.plist
</pre> The first parameter activates the tracing subsystem, the second tells it to trace host and link categorized utilization and the third creates a graph configuration file to configure Triva when analysing the resulting trace file.</li>
</ul>
<ul>
<li>SMPI simulator and traces for a space/time view: <pre class="fragment">smpirun -trace ...
</pre> The <em>-trace</em> parameter for the smpirun script runs the simulation with –cfg=tracing:yes and –cfg=tracing/smpi:yes. Check the smpirun's <em>-help</em> parameter for additional tracing options.</li>
</ul>
<p>Sometimes you might want to put additional information on the trace to correctly identify them later, or to provide data that can be used to reproduce an experiment. You have two ways to do that:</p>
<ul>
<li>Add a string on top of the trace file as comment: <pre class="fragment">--cfg=tracing/comment:my_simulation_identifier
</pre></li>
</ul>
<ul>
<li>Add the contents of a textual file on top of the trace file as comment: <pre class="fragment">--cfg=tracing/comment_file:my_file_with_additional_information.txt
</pre></li>
</ul>
<p>Please, use these two parameters (for comments) to make reproducible simulations. For additional details about this and all tracing options, check See the <a class="el" href="tracing.html#tracing_tracing_options">Tracing configuration Options</a>.</p>
<h1><a class="anchor" id="options_smpi"></a>
Configuring SMPI</h1>
<p>The SMPI interface provides several specific configuration items. These are uneasy to see since the code is usually launched through the <code>smiprun</code> script directly.</p>
<h2><a class="anchor" id="options_smpi_bench"></a>
Automatic benchmarking of SMPI code</h2>
<p>In SMPI, the sequential code is automatically benchmarked, and these computations are automatically reported to the simulator. That is to say that if you have a large computation between a <code>MPI_Recv()</code> and a <code>MPI_Send()</code>, SMPI will automatically benchmark the duration of this code, and create an execution task within the simulator to take this into account. For that, the actual duration is measured on the host machine and then scaled to the power of the corresponding simulated machine. The variable <b>smpi/running_power</b> allows to specify the computational power of the host machine (in flop/s) to use when scaling the execution times. It defaults to 20000, but you really want to update it to get accurate simulation results.</p>
<p>When the code is constituted of numerous consecutive MPI calls, the previous mechanism feeds the simulation kernel with numerous tiny computations. The <b>smpi/cpu_threshold</b> item becomes handy when this impacts badly the simulation performance. It specify a threshold (in second) under which the execution chunks are not reported to the simulation kernel (default value: 1e-6). Please note that in some circonstances, this optimization can hinder the simulation accuracy.</p>
<h2><a class="anchor" id="options_smpi_timing"></a>
Reporting simulation time</h2>
<p>Most of the time, you run MPI code through SMPI to compute the time it would take to run it on a platform that you don't have. But since the code is run through the <code>smpirun</code> script, you don't have any control on the launcher code, making difficult to report the simulated time when the simulation ends. If you set the <b>smpi/display_timing</b> item to 1, <code>smpirun</code> will display this information when the simulation ends. </p>
<pre class="fragment">Simulation time: 1e3 seconds.
</pre><h2><a class="anchor" id="options_model_smpi_detached"></a>
Simulating MPI detached send</h2>
<p>(this configuration item is experimental and may change or disapear)</p>
<p>This threshold specifies the size in bytes under which the send will return immediately. This is different from the threshold detailed in <a class="el" href="options.html#options_model_network_asyncsend">Simulating asyncronous send</a> because the message is not effectively sent when the send is posted. SMPI still waits for the correspondant receive to be posted to perform the communication operation. This threshold can be set by changing the <b>smpi/send_is_detached</b> item. The default value is 65536.</p>
<h2><a class="anchor" id="options_model_smpi_collectives"></a>
Simulating MPI collective algorithms</h2>
<p>SMPI implements more than 100 different algorithms for MPI collective communication, to accurately simulate the behavior of most of the existing MPI libraries. The <b>smpi/coll_selector</b> item can be used to use the decision logic of either OpenMPI or MPICH libraries (values: ompi or mpich, by default SMPI uses naive version of collective operations). Each collective operation can be manually selected with a <b>smpi/collective_name</b>:algo_name. Available algorithms are listed in <a class="el" href="group__SMPI__API.html#SMPI_collective_algorithms">Simulating collective operations</a> .</p>
<h1><a class="anchor" id="options_generic"></a>
Configuring other aspects of SimGrid</h1>
<h2><a class="anchor" id="options_generic_path"></a>
XML file inclusion path</h2>
<p>It is possible to specify a list of directories to search into for the <include> tag in XML files by using the <b>path</b> configuration item. To add several directory to the path, set the configuration item several times, as in </p>
<pre class="fragment">--cfg=path:toto --cfg=path:tutu
</pre><h2><a class="anchor" id="options_generic_exit"></a>
Behavior on Ctrl-C</h2>
<p>By default, when Ctrl-C is pressed, the status of all existing simulated processes is displayed. This is very useful to debug your code, but it can reveal troublesome in some cases (such as when the amount of processes becomes really big). This behavior is disabled when <b>verbose-exit</b> is set to 0 (it is to 1 by default).</p>
<h1><a class="anchor" id="options_log"></a>
Logging Configuration</h1>
<p>It can be done by using XBT. Go to <a class="el" href="group__XBT__log.html">Logging support</a> for more details.</p>
<h1><a class="anchor" id="options_index"></a>
Index of all existing configuration items</h1>
<ul>
<li><code>contexts/factory</code>: <a class="el" href="options.html#options_virt_factory">Selecting the virtualization factory</a></li>
<li><code>contexts/nthreads</code>: <a class="el" href="options.html#options_virt_parallel">Running user code in parallel</a></li>
<li><code>contexts/parallel_threshold</code>: <a class="el" href="options.html#options_virt_parallel">Running user code in parallel</a></li>
<li><code>contexts/stack_size</code>: <a class="el" href="options.html#options_virt_stacksize">Adapting the used stack size</a></li>
<li><code>contexts/synchro</code>: <a class="el" href="options.html#options_virt_parallel">Running user code in parallel</a></li>
</ul>
<ul>
<li><code>cpu/maxmin_selective_update</code>: <a class="el" href="options.html#options_model_optim">Optimization level of the platform models</a></li>
<li><code>cpu/model</code>: <a class="el" href="options.html#options_model_select">Selecting the platform models</a></li>
<li><code>cpu/optim</code>: <a class="el" href="options.html#options_model_optim">Optimization level of the platform models</a></li>
</ul>
<ul>
<li><code>gtnets/jitter</code>: <a class="el" href="options.html#options_pls">Configuring packet-level pseudo-models</a></li>
<li><code>gtnets/jitter_seed</code>: <a class="el" href="options.html#options_pls">Configuring packet-level pseudo-models</a></li>
</ul>
<ul>
<li><code>maxmin/precision</code>: <a class="el" href="options.html#options_model_precision">Numerical precision of the platform models</a></li>
</ul>
<ul>
<li><code>model-check</code>: <a class="el" href="options.html#options_modelchecking">Configuring the Model-Checking</a></li>
<li><code>model-check/property</code>: <a class="el" href="options.html#options_modelchecking_liveness">Specifying a liveness property</a></li>
<li><code>model-check/checkpoint</code>: <a class="el" href="options.html#options_modelchecking_steps">Going for stateful verification</a></li>
<li><code>model-check/reduce</code>: <a class="el" href="options.html#options_modelchecking_reduction">Specifying the kind of reduction</a></li>
</ul>
<ul>
<li><code>network/bandwidth_factor</code>: <a class="el" href="options.html#options_model_network_coefs">Corrective simulation factors</a></li>
<li><code>network/coordinates</code>: <a class="el" href="options.html#options_model_network_coord">Coordinated-based network models</a></li>
<li><code>network/crosstraffic</code>: <a class="el" href="options.html#options_model_network_crosstraffic">Simulating cross-traffic</a></li>
<li><code>network/latency_factor</code>: <a class="el" href="options.html#options_model_network_coefs">Corrective simulation factors</a></li>
<li><code>network/maxmin_selective_update</code>: <a class="el" href="options.html#options_model_optim">Optimization level of the platform models</a></li>
<li><code>network/model</code>: <a class="el" href="options.html#options_model_select">Selecting the platform models</a></li>
<li><code>network/optim</code>: <a class="el" href="options.html#options_model_optim">Optimization level of the platform models</a></li>
<li><code>network/sender_gap</code>: <a class="el" href="options.html#options_model_network_sendergap">Simulating sender gap</a></li>
<li><code>network/TCP_gamma</code>: <a class="el" href="options.html#options_model_network_gamma">Maximal TCP window size</a></li>
<li><code>network/weight_S</code>: <a class="el" href="options.html#options_model_network_coefs">Corrective simulation factors</a></li>
</ul>
<ul>
<li><code>ns3/TcpModel</code>: <a class="el" href="options.html#options_pls">Configuring packet-level pseudo-models</a></li>
</ul>
<ul>
<li><code>surf/nthreads</code>: <a class="el" href="options.html#options_model_nthreads">Parallel threads for model updates</a></li>
</ul>
<ul>
<li><code>smpi/running_power</code>: <a class="el" href="options.html#options_smpi_bench">Automatic benchmarking of SMPI code</a></li>
<li><code>smpi/display_timing</code>: <a class="el" href="options.html#options_smpi_timing">Reporting simulation time</a></li>
<li><code>smpi/cpu_threshold</code>: <a class="el" href="options.html#options_smpi_bench">Automatic benchmarking of SMPI code</a></li>
<li><code>smpi/async_small_thres</code>: <a class="el" href="options.html#options_model_network_asyncsend">Simulating asyncronous send</a></li>
<li><code>smpi/send_is_detached</code>: <a class="el" href="options.html#options_model_smpi_detached">Simulating MPI detached send</a></li>
<li><code>smpi/coll_selector</code>: <a class="el" href="options.html#options_model_smpi_collectives">Simulating MPI collective algorithms</a></li>
</ul>
<ul>
<li><code>path:</code> <a class="el" href="options.html#options_generic_path">XML file inclusion path</a></li>
<li><code>verbose-exit</code>: <a class="el" href="options.html#options_generic_exit">Behavior on Ctrl-C</a></li>
</ul>
<ul>
<li><code>workstation/model</code>: <a class="el" href="options.html#options_model_select">Selecting the platform models</a> </li>
</ul>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated on Sun Nov 17 2013 21:34:46 for SimGrid by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.2 </li>
</ul>
</div>
</body>
</html>
|