>From a recent thread I started on the CMake mailing list it turns out a
limitation of CMake's 2-tier recursive use of make is that two targets which
(directly or indirectly) depend on the same file will have good parallel
build results only if there is a target dependency between the two targets
to force one target to be completed before the next one is attempted.  From
the "make" perspective such additional target dependencies make no sense for
parallel builds, and previously I didn't worry about such extra target
dependencies because I didn't test parallel builds that require them.

Recently, I have been working on the parallel build issue. I have put in
additional target dependencies that are required by the above rule (and also
used an additional file dependency to serialize two custom commands which
were using the same *.aux files in the documentation build).  With these
changes, I now have success for the -j 2 (two parallel jobs allowed) build
of PLplot, its ctest suite, and its documentation.  Here are the results.

[EMAIL PROTECTED]> cmake \
-DCMAKE_INSTALL_PREFIX=/home/software/plplot_cvs/installcmake \
-DENABLE_ada=ON -DBUILD_TEST=ON -DBUILD_DOC=ON ../plplot_cmake >& cmake.out
[EMAIL PROTECTED]> time make -j 2 >& make.out

real    1m16.413s
user    1m49.783s
sys     0m13.413s

Note the real time (which is impressively short for the case of essentially
all components of PLplot being built) is roughly half the sum of the
user+sys time because the build kept both processors on my system running
most of the time.

The latency is also impressively low.

[EMAIL PROTECTED]> time make -j 2 >& make.out2

real    0m0.882s
user    0m0.848s
sys     0m0.772s

Finally, there are no problems with ctest.

[EMAIL PROTECTED]> time ctest
Start processing tests
Test project /home/software/plplot_cvs/HEAD/build_dir
   1/ 12 Testing examples_c                       Passed
   2/ 12 Testing examples_cxx                     Passed
   3/ 12 Testing examples_f77                     Passed
   4/ 12 Testing examples_f95                     Passed
   5/ 12 Testing examples_java                    Passed
   6/ 12 Testing examples_octave                  Passed
   7/ 12 Testing examples_python                  Passed
   8/ 12 Testing examples_tcl                     Passed
   9/ 12 Testing examples_ada                     Passed
  10/ 12 Testing examples_png                     Passed
  11/ 12 Testing examples_svg                     Passed
  12/ 12 Testing examples_pscairo                 Passed

100% tests passed, 0 tests failed out of 12

real    1m1.471s
user    0m50.995s
sys     0m3.020s

These results all look great, but it turns out there are still parallel
build dependency issues for the case of

make -j N

for large N (or N non-existent which corresponds to infinite N).

So I will keep plugging away at this, but the good -j 2 results I have
achieved today indicate I am on the right track

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to