Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 54cac1c2268db633d66eeff1b4faa585 > files > 103

frepple-doc-0.8.1-3.fc15.noarch.rpm

<!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"/>
  <title>Frepple / TestMultithreading</title>
  <link rel='stylesheet' href='../styles.css' type='text/css' />
  <!--PageHeaderFmt-->  
</head>
<body>
<div id="container">

<div id="menubar">
  
<div id="logo" align="center">
<br/><img src='../frepple.bmp' alt="frepple" /><br/>
<a href='http://www.frepple.com/'>
<strong>a Free<br/>Production Planning<br/>Library</strong>
</a></div>
<div id="menu">
<br/>
<h3><a href='../Main/HomePage.html'>Main</a></h3>
<h3><a href='../UI/Main.html'>User Manual</a></h3>
<h3><a href='../Tutorial/Main.html'>Tutorial</a></h3>
<h3><a href='Main.html'>Reference Manual</a></h3>
<h3><a href='../Main/FAQ.html'>FAQ</a></h3>
<h3><a href='../reference/index.html'>C++ API</a></h3>
<br/><div>
</div>  
</div>
</div>

<div id="content">
<br/>
<!--PageText-->
<div id='wikitext'>
<p><a class='wikilink' href='../Main/HomePage.html'>Main</a> &gt; <span class='wikitrail'><a class='wikilink' href='Main.html'>Reference Manual</a> > <a class='wikilink' href='Test.html'>Unit tests</a> > <a class='selflink' href='TestMultithreading.html'>TestMultithreading</a></span>
</p>
<p class='vspace'>In this test a number of threads are simultaneously operating in frePPLe. Each thread repeats some model changes with a specific delay between the changes.
The test reports the min, max and average time of each action, and the number of executions (successful or failed).<br />The test runs for a predefined duration of 20 seconds.
</p>
<p class='vspace'>The test is disabled by default!
</p>
<p class='vspace'>The conclusions in summary:
</p><ul><li>When creating frePPLe objects only 1 cpu is used.<br />  If multiple such threads are active only one can be actively working while the others are queueing. This is due to the Python threading architecture (the famous Global Interpreter Lock).<br />  Creating multiple creator threads only makes sense if the threads also have to wait from time to time for eg file or database retrieval.
</li><li>FrePPLe can use multiple cpus when non-Python operations are run.<br />  Eg during a save operation the Python interpreter is available to do other work. Multiple save operations can thus run in parallel on multiple cpus.
Eg the solve operation doesn't keep Python locked either and internally creates its own threads to run on multiple cpus.
</li><li>Not all actions in frePPLe are safe to be run in parallel.<br />  FrePPLe doesn't implement any object locking mechanism (for simplicity and performance reasons), and unsafe operations can crash the application. It is up to the user to avoid running incompatible operations simultaneously.<br />  Eg delete a demand while the solver is solving it: can crash frePPLe.<br />  Eg save the plan while the solver is recreating the plan: can crash frePPLe.
</li></ul>
</div>

<!--PageFooterFmt-->
<!--HTMLFooter-->
</div></div>
</body>
</html>