<p>I'm working on a system with four logical CPS (two dual-core CPUs if it matters).  I'm using make to parallelize twelve trivially parallelizable tasks and doing it from cron.</p>

<p>The invocation looks like:</p>

<pre><code>make -k -j 4 -l 3.99 -C [dir] [12 targets]
</code></pre>

<p>The trouble I'm running into is that sometimes one job will finish but the next one won't startup even though it shouldn't be stopped by the load average limiter.  Each target takes about four hours to complete and I'm wondering if this might be part of the problem.</p>

<p>Edit: Sometimes a target does fail but I use the -k option to have the rest of the make still run.  I haven't noticed any correlation with jobs failing and the next job not starting.</p>

[{'answer_id': 35447, 'author': 'KannoN', 'author_id': 2897, 'author_profile': 'https://Stackoverflow.com/users/2897', 'pm_score': 0, 'selected': False, 'text': '<p>Does make think one of the targets is failing?  If so, it will stop the make after the running jobs finish.   You can use -k to tell it to continue even if an error occurs.</p>\n'}, {'answer_id': 35526, 'author': 'BCS', 'author_id': 1343, 'author_profile': 'https://Stackoverflow.com/users/1343', 'pm_score': 1, 'selected': False, 'text': '<p>I\'d drop the \'-l\'</p>\n\n<p>If all you plan to run the the system is this build I <em>think</em> the -j 4 does what you want.</p>\n\n<p>Based on my memory, if you have anything else running (crond?), that can push the load average over 4.</p>\n\n<p><a href="http://sunsite.ualberta.ca/Documentation/Gnu/make-3.79/html_chapter/make_5.html#SEC47" rel="nofollow noreferrer">GNU make ref</a></p>\n'}, {'answer_id': 36211, 'author': 'David Locke', 'author_id': 1447, 'author_profile': 'https://Stackoverflow.com/users/1447', 'pm_score': 0, 'selected': False, 'text': '<p>@<a href="https://stackoverflow.com/users/1343/bcs">BCS</a></p>\n\n<p>I\'m 99.9% sure that the -l isn\'t causeing the problem because I can watch the load average on the machine and it drops down to about three and sometimes as low as one (!) without starting the next job.</p>\n'}]
['https://Stackoverflow.com/questions/35407', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1447/']