Boost C++ Libraries: Ticket #431: boost jam problem with parallel builds https://svn.boost.org/trac10/ticket/431 <pre class="wiki">OK, this bug makes my life miserable for a long, long time. :) In short, if I have an action which updates more then one target then I have problem with parallel build. Attached is a simple testcase. Just run 'jam -j2' and you can notice that target 'g2.generated' is been used before it is updated (created). The testcase has just 2 rules - 'Gen' models generating 2 files which are used by 'Use'. The testcase doesn't actually create any files, but that doesn't matter. Jam works with targets, not files. The last line in the Jamfile is a workaround. If you uncomment it, the test works fine. I spent some time trying to find the reason and to fix the bug, but succeed only in the first part. I can discuss it in more details with someone interested in fixing it. I just didn't get enough time to fix the bug by myself. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/431 Trac 1.4.3 René Rivera Sun, 23 Oct 2005 16:03:30 GMT <link>https://svn.boost.org/trac10/ticket/431#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/431#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=33595 As intended. The dependency graph of your example looks something like: u1.user -&gt; g1.generated u2.user -&gt; g2.generated The fact that g1.generated and g2.generate are produced by 1 action is irrelevant. You need to change the code so the dependency graph looks like: u1.user -&gt; g1.generated u1.user -&gt; g2.generated u2.user -&gt; g1.generated u2.user -&gt; g2.generated Which you can do by changing the Use rule invocations to: Use u1.user : g1.generated g2.generated ; Use u2.user : g1.generated g2.generated ; HTH. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>alx_s</dc:creator> <pubDate>Sun, 23 Oct 2005 18:50:37 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/431#comment:2 https://svn.boost.org/trac10/ticket/431#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=445009 As intended what? I didn't get you. You are right about dependency graph. It does look like: u1.user -&gt; g1.generated u2.user -&gt; g2.generated And you are right that the fact that g1.generated and g2.generate are produced by 1 action _should_ be irrelevant. But it's not. That is the problem. If they are produced by one action, then I have a problem with parallel builds. If they are produced by separate actions - all is fine. Just look at the line you wrote: u2.user -&gt; g2.generated That means that g2.generated should be updated before u2.user. Right? But this is not the case if parallel build is used. Changing dependency graph as you suggested helps, but it doesn't fix the problem. It is just a workaround. Regards, Alexey Sarytchev </pre> Ticket René Rivera Sun, 23 Oct 2005 19:43:31 GMT <link>https://svn.boost.org/trac10/ticket/431#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/431#comment:3</guid> <description> <pre class="wiki">Logged In: YES user_id=33595 Hm, sorry I see what you mean now. I though you where talking about a new problem. But it's just one of the existing bugs/limitations of the original Perforce/Jam. See the "BUGS, LIMITATIONS" section of http://public.perforce.com/public/jam/src/Jam.html (http://64.233.187.104/search?q=cache:fDuhra5lsswJ:public.perforce.com/public/jam/src/Jam.html+BUGS+LIMITATIONS&amp;hl=en). Yea, I know it's not much of a consolation :-( I can't promise a fix any time soon, as I don't see any generic easy solution, but I'll work on it. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>alx_s</dc:creator> <pubDate>Sun, 23 Oct 2005 21:13:58 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/431#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/431#comment:4</guid> <description> <pre class="wiki">Logged In: YES user_id=445009 Yes, I know it a known bug in the original Jam. :) It just looks like nobody is working on it there. So I decided to submit it for boost jam as it looks like it is more actively developed. And did that with a simple testcase which shows the problem. It didn't looked too hard to fix for me when I figured out what was the cause, but just required a better knowledge of the some sort of state machine used by Jam to update targets. So I thought maybe someone with that knowledge could finally fix it. Regards, Alexey Sarytchev </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>René Rivera</dc:creator> <pubDate>Fri, 11 May 2007 06:34:59 GMT</pubDate> <title>component changed https://svn.boost.org/trac10/ticket/431#comment:5 https://svn.boost.org/trac10/ticket/431#comment:5 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">bjam</span> </li> </ul> Ticket René Rivera Mon, 21 May 2007 15:24:58 GMT version, description changed; severity set https://svn.boost.org/trac10/ticket/431#comment:6 https://svn.boost.org/trac10/ticket/431#comment:6 <ul> <li><strong>version</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">Boost.Jam 3.1.14</span> </li> <li><strong>description</strong> modified (<a href="/trac10/ticket/431?action=diff&amp;version=6">diff</a>) </li> <li><strong>severity</strong> → <span class="trac-field-new">Problem</span> </li> </ul> Ticket René Rivera Sun, 16 Sep 2007 22:41:48 GMT attachment set https://svn.boost.org/trac10/ticket/431 https://svn.boost.org/trac10/ticket/431 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">Jamfile</span> </li> </ul> <p> Original testcase from SF tracker. </p> Ticket René Rivera Mon, 17 Sep 2007 01:29:55 GMT milestone set https://svn.boost.org/trac10/ticket/431#comment:7 https://svn.boost.org/trac10/ticket/431#comment:7 <ul> <li><strong>milestone</strong> → <span class="trac-field-new">Boost.Jam 3.1.15</span> </li> </ul> Ticket René Rivera Mon, 17 Sep 2007 08:33:42 GMT status, resolution changed https://svn.boost.org/trac10/ticket/431#comment:8 https://svn.boost.org/trac10/ticket/431#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> <span class="trac-field-old">Accepted</span> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket