Re: [CMake] parallel builds for ctest
On 2/15/08, Alan W. Irwin [EMAIL PROTECTED] wrote: David, I may be leaping to conclusions here, but it appears from what you have said that it is a reasonable hypothesis that the ctest commmand works through the cmake generator backend. True When that is make (the default for Unix systems), then it further appears you can use a parallel version of make. That would be a wonderful feature to have for ctest. You can and it is. :-) Also, when you use Visual Studio 2005 or 2008, builds happen in parallel automatically according to your options, just as they do when you initiate them through the UI. No need for a custom MAKECOMMAND. However, assuming the above suppositions are all true, I don't particularly like the somewhat clumsy hardwired mechanism above which won't work very well for machines with more than two processors or for systems where you want to do your tests in parallel, but you might not want to do your build in parallel (since parallel builds are difficult to get right with cmake for projects with complicated dependencies). You cannot do the tests in parallel via ctest. It runs all the tests it's going to run sequentially. And although parallel builds may be difficult to get right, you are much more likely to get them right if you run nightly dashboards using this technique and observing the results every day. When there's a dependency issue, it usually shows up as a sporadic dashboard failure unrelated to the changes made for the day One way to do this smoothly is allow ctest to pass any arguments to the backend that the user desires. Also, didn't make test work for early versions of cmake-2.4.x? I find it is a no-op now. (I was thinking that make -j N test might be a slick way to get parallel tests.) Parallel tests are only going to be possible if you can guarantee that all tests are independent of all other tests, or if you specify explicit dependencies between tests somehow. (Which would introduce the same sort of complexity you complain about above for build steps...) make test should still work. What happens when you do ctest -N in the binary directory? make test should be equivalent to running ctest from the binary directory... If it seems to be a no-op, perhaps you do not have an ENABLE_TESTING() call in your CMakeLists.txt? HTH, David ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] parallel builds for ctest
David Cole wrote: Parallel tests are only going to be possible if you can guarantee that all tests are independent of all other tests, or if you specify explicit dependencies between tests somehow. (Which would introduce the same sort of complexity you complain about above for build steps...) That said, parallel ctest is on the todo list for this year. Most likely it will be ctest -j N. We can not depend on the make system to do the parallel stuff, and ctest -j would be useful for all generators. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] parallel builds for ctest
On 2008-02-16 12:38-0500 Bill Hoffman wrote: [...]parallel ctest is on the todo list for this year. Most likely it will be ctest -j N. We can not depend on the make system to do the parallel stuff, and ctest -j would be useful for all generators. That's excellent news! The execution of the PLplot tests actually take about the same time to run as (non-parallel) building of PLplot itself. Now we are doing our builds in parallel, convenient parallel testing will be most welcome as well, and I look forward to trying out that new ctest functionality once you are ready. 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 __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] parallel builds for ctest
Alan W. Irwin wrote: On 2008-02-16 12:38-0500 Bill Hoffman wrote: [...]parallel ctest is on the todo list for this year. Most likely it will be ctest -j N. We can not depend on the make system to do the parallel stuff, and ctest -j would be useful for all generators. That's excellent news! The execution of the PLplot tests actually take about the same time to run as (non-parallel) building of PLplot itself. Now we are doing our builds in parallel, convenient parallel testing will be most welcome as well, and I look forward to trying out that new ctest functionality once you are ready. As a work around until we get it done, you can do something like this: ctest -I1,10 ctest -I11,20 And run each of those in a different shell. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] parallel builds for ctest
Is it possible to get ctest to do parallel builds on systems that support it? I'm using a configuration file that looks something like this: # Where the source code lives SET (CTEST_SOURCE_DIRECTORY ${CTEST_SCRIPT_DIRECTORY}/..) SET (CTEST_BINARY_DIRECTORY ${CTEST_SOURCE_DIRECTORY}/build-ctest-sse) # Make sure we always reconfigure cmake stuff from scratch and don't # rely on previously built libraries SET (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) SET (CTEST_CMAKE_COMMAND cmake) SET (CTEST_CVS_COMMAND svn) # A smoke test only builds the code and doesn't run any tests, so we # exclude all tests here #SET (CTEST_COMMAND ctest -D Nightly) SET (CTEST_COMMAND ctest -D Experimental) SET(CTEST_INITIAL_CACHE BUILDNAME:STRING=SSE BUILD_TESTING:BOOL=ON ) James ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] parallel builds for ctest
One of the VTK dashboards does it by giving a custom MAKECOMMAND to the initial cache:MAKECOMMAND:STRING=/usr/bin/make -i -j 2 See here for the full script: http://www.vtk.org/Testing/Sites/hythloth.kitware/Linux-gcc41/20080215-0300-Nightly/Notes.html HTH, David On 2/15/08, James Bigler [EMAIL PROTECTED] wrote: Is it possible to get ctest to do parallel builds on systems that support it? I'm using a configuration file that looks something like this: # Where the source code lives SET (CTEST_SOURCE_DIRECTORY ${CTEST_SCRIPT_DIRECTORY}/..) SET (CTEST_BINARY_DIRECTORY ${CTEST_SOURCE_DIRECTORY}/build-ctest-sse) # Make sure we always reconfigure cmake stuff from scratch and don't # rely on previously built libraries SET (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) SET (CTEST_CMAKE_COMMAND cmake) SET (CTEST_CVS_COMMAND svn) # A smoke test only builds the code and doesn't run any tests, so we # exclude all tests here #SET (CTEST_COMMAND ctest -D Nightly) SET (CTEST_COMMAND ctest -D Experimental) SET(CTEST_INITIAL_CACHE BUILDNAME:STRING=SSE BUILD_TESTING:BOOL=ON ) James ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] parallel builds for ctest
On 2008-02-15 18:44-0500 David Cole wrote: One of the VTK dashboards does it by giving a custom MAKECOMMAND to the initial cache:MAKECOMMAND:STRING=/usr/bin/make -i -j 2 See here for the full script: http://www.vtk.org/Testing/Sites/hythloth.kitware/Linux-gcc41/20080215-0300-Nightly/Notes.html David, I may be leaping to conclusions here, but it appears from what you have said that it is a reasonable hypothesis that the ctest commmand works through the cmake generator backend. When that is make (the default for Unix systems), then it further appears you can use a parallel version of make. That would be a wonderful feature to have for ctest. However, assuming the above suppositions are all true, I don't particularly like the somewhat clumsy hardwired mechanism above which won't work very well for machines with more than two processors or for systems where you want to do your tests in parallel, but you might not want to do your build in parallel (since parallel builds are difficult to get right with cmake for projects with complicated dependencies). One way to do this smoothly is allow ctest to pass any arguments to the backend that the user desires. Also, didn't make test work for early versions of cmake-2.4.x? I find it is a no-op now. (I was thinking that make -j N test might be a slick way to get parallel tests.) 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 __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake