<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>I have a strange, and very frustrating, problem. I have a pretty large piece of software that I build nightly as part of regression testing of my own software. All of the software uses CMake and I use a ctest script, via “ctest –S [script file]”, for my
nightly regression testing . As I stated, this is a pretty large collection of software but during development it’s not a huge issue because the build is quite parallelizable via GNU make’s “-j N” option. On my nightly test platform, a 64-core machine, I can
build the whole thing in about an hour.  A nice manageable amount of time for a nightly regression test. Unfortunately when I run the build process via ctest something is causing the parallel make to fail and I’m lucky if the build takes under 15 hours. Barely
practical for a nightly test.</div>
<div> </div>
<div>I’m not sure how to find out what’s going on. After the ctest build I can go into the build directory, do a “make clean” and then a “make –j 12”, for example, and the build flies. Of course I can build the software entirely outside of ctest and it too
flies. Only when the build happens as part of ctest does it seem to revert to, essentially, a “make –j 1” and slow to a crawl.</div>
<div> </div>
<div>I can look at the process tree, via “ps –ef”, during the ctest build and I see the root invocation of gmake and it’s fine. For example, it typically looks something like:</div>
<div> </div>
<div><font face="Courier New">  PID  PPID  C STIME TTY          TIME CMD</font></div>
<div><font face="Courier New"> 6141  6283 96 11:41 pts/0    00:24:40 ctest -VV -S ctest_nightly.cmake -DPROCESSORCOUNT=12</font></div>
<div><font face="Courier New"> 8032  6141  0 11:42 pts/0    00:00:00 /usr/bin/gmake -i <b>-j 12</b></font></div>
<div><font face="Courier New"> 8035  8032  0 11:42 pts/0    00:00:00 /usr/bin/gmake -f CMakeFiles/Makefile2 all</font></div>
<div><font face="Courier New">  851  8035  0 11:52 pts/0    00:00:00 /usr/bin/gmake -f packages/ml/src/CMakeFiles/ml.dir/build.make</font></div>
<div><font face="Courier New">27797  8035  0 11:46 pts/0    00:00:00 /usr/bin/gmake -f packages/moocho/src/CMakeFiles/moocho.dir/build.make</font></div>
<div><font face="Courier New"> </font></div>
<div>You can see that the parent make, PID 8032 which is started via ctest (PID 6141), has the appropriate flag, “-j 12”, but at this point in the build it’s compiling one file at a time. Another odd thing is that I think the build starts out fine, invoking
multiple file compilations simultaneously, but after a couple of minutes it reverts to essentially the “make –j 1” behavior. It’s like the GNU make jobserver is failing, but I’m not getting any error messages from GNU make to that affect.</div>
<div> </div>
<div>If anyone has any suggestions on how I can figure this out I’d appreciate it.</div>
<div> </div>
<div>Apologies for the lengthy explanation. I’ve been pulling my hair out trying to figure out how to solve this issue.</div>
<div> </div>
<div>Thanks in advance,</div>
<div>Gary</div>
<div> </div>
<div> </div>
</span></font>
</body>
</html>