This file is indexed.

/usr/share/doc/simgrid/html/howto.html is in simgrid-doc 3.14.159-2.

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
<!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: Use Cases and Howtos</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="navtreedata.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/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js/MathJax.js"></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
   &#160;<span id="projectnumber">3.14.159</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="javadoc"><span>Java 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.13 -->
<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('howto.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)">
</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">Use Cases and Howtos </div>  </div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#howto_multicore">How to model multicore machines</a><ul><li class="level2"><a href="#howto_multicore_pinning">Pinning tasks to cores</a></li>
</ul>
</li>
<li class="level1"><a href="#howto_bootenergy">Modeling machine bootup and shutdown periods</a></li>
</ul>
</div>
<div class="textblock"><p>There is no perfect model, but only models that are adapted to the specific study that you want to do.</p>
<p>SimGrid provide several advanced mechanisms that you can adapt to model the situation that you are interested into, and it is often uneasy to see where to start with.</p>
<p>This page collects several hints and tricks on modeling situations. Most probably, the exact situation that you want to model will not be described here (unless we already <a href="http://www.phdcomics.com/comics/archive.php?comicid=789">scooped you</a>), but we hope you will find some ideas and see how to use the modeling options that SimGrid provides.</p>
<p>Of course, you should also check the <a class="el" href="examples.html">SimGrid Examples</a> page, that shows more detailed usage examples. As for the rest of the documentation (and of SimGrid, actually), any contribution is welcome.</p>
<h1><a class="anchor" id="howto_multicore"></a>
How to model multicore machines</h1>
<p>Multicore machines are very complex, and there is many way to model them. The default models of SimGrid are coarse grain and capture some elements of this reality. Here is how to declare simple multicore hosts:</p>
<div class="fragment"><div class="line">&lt;<span class="keywordtype">host</span> <span class="keyword">id</span>=<span class="stringliteral">&quot;mymachine&quot;</span> <span class="keyword">speed</span>=<span class="stringliteral">&quot;8Gf&quot;</span> <span class="keyword">core</span>=<span class="stringliteral">&quot;4&quot;</span>/&gt;</div></div><!-- fragment --><p>It declares a 4-cores host called "mymachine", each core computing 8 GFlops per second. If you put one activity of 8 GFlop on this host, it will be computed in 1 second (by default, activities are single-threaded and cannot leverage the computing power of more than one core). If you put two of them together, they will still be computed in one second, and so on up to 4 tasks. If you put 5 tasks, they will share the total computing resource, and all tasks will be computed at 5/4 = 1.25 second. That's a very simple model, but that's all what you will get by default from SimGrid.</p>
<h2><a class="anchor" id="howto_multicore_pinning"></a>
Pinning tasks to cores</h2>
<p>This model does not account for any sort of resource reservation such as task pinning (where you manually select on which core each of the existing activity should execute). If you want to go that way, the best is probably to model you 4-core processor as 4 separte hosts, and assigning the activities to cores by migrating them to the declared hosts. In some sense, this is takes the whole Network-On-Chip idea really seriously.</p>
<p>Some extra complications may arise if you go that way. If you have more tasks than cores, you'll have to <a href="https://en.wikipedia.org/wiki/Scheduling_%28computing%29#Operating_system_process_scheduler_implementations">schedule your tasks</a> yourself on the cores (so don't do that if you can avoid). Since you cannot have more than one network model, you will end up with a TCP connexion between your cores. You probably want to work this around in your application by never starting any simulated communication between your cores. Instead, connect equally all cores to the external network.</p>
<p>Modeling a multicore CPU as a set of SimGrid hosts may seem strange and unconvincing, but some users achieved very realistic simulations of multi-core and GPU machines this way.</p>
<h1><a class="anchor" id="howto_bootenergy"></a>
Modeling machine bootup and shutdown periods</h1>
<p>When a physical host boots up, a lot of things happen. It takes time during which the machine is not usable but dissipates energy, and programs actually die and restart during a reboot. Since there is many ways to model it, SimGrid does not do any modeling choice for you but the most obvious ones.</p>
<p>Any actor (or process in MSG) running on an host that is shut down will be killed and all its activities (tasks in MSG) will be automatically canceled. If killed the actor was marked as auto-restartable (with <a class="el" href="classsimgrid_1_1s4u_1_1Actor.html#afa4881c7c569b93b377f5345913706f8" title="If set to true, the actor will automatically restart when its host reboots. ">simgrid::s4u::Actor::setAutoRestart()</a> or with <a class="el" href="group__m__process__management.html#gaa8489360976ff79e94e3db2254e5b7db" title="Sets the &quot;auto-restart&quot; flag of the process. ">MSG_process_auto_restart_set()</a>), it will start anew with the same parameters when the host boots back up.</p>
<p>By default, shutdowns and bootups are instantaneous. If you want to add an extra delay, you have to do that yourself, for example from an /controler/ actor that runs on another host. The best way to do so is to declare a fictionous pstate where the CPU delivers 0 flop per second (so every activity on that host will be frozen when the host is in this pstate). When you want to switch the host off, your controler switches the host to that specific pstate (with <a class="el" href="classsimgrid_1_1s4u_1_1Host.html#a431d8bac4eb1c6fc913286a2a4282834" title="Set the pstate at which the host should run. ">simgrid::s4u::Host::setPstate()</a>), waits for the amount of time that you decided necessary for your host to shut down, and turns the host off (with <a class="el" href="classsimgrid_1_1s4u_1_1Host.html#a6e0dbb56596cde6bc8deb360811b6058" title="Turns that host off. ">simgrid::s4u::Host::turnOff()</a>). To boot up, switch the host on, go into the specific pstate, wait a while and go to a more regular pstate.</p>
<p>To model the energy dissipation, you need to put the right energy consumption in your startup/shutdown specific pstate. Remember that the energy consumed is equal to the instantaneous consumption multiplied by the time in which the host keeps in that state. Do the maths, and set the right instantaneous consumption to your pstate, and you'll get the whole boot period to consume the amount of energy that you want. You may want to have one fictionous pstate for the bootup period and another one for the shutdown period.</p>
<p>Of course, this is only one possible way to model these things. YMMV ;) </p>
</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 by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>