ctest: building test in parellel

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ctest: building test in parellel

Damian Dixon
Hi,

Is there anyway to build tests in parallel when using ctest?

I am generating makefiles on Linux.

Part of the reason I am asking this is that if I pre-build the test for some unknown reason ctest rebuilds the source files.

I am currently using cmake 3.8.0.

Thanks
Damian 

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ctest: building test in parellel

Craig Scott-3
Does the -j option to ctest not do what you want?

On Tue, Jun 27, 2017 at 9:32 PM, Damian Dixon <[hidden email]> wrote:
Hi,

Is there anyway to build tests in parallel when using ctest?

I am generating makefiles on Linux.

Part of the reason I am asking this is that if I pre-build the test for some unknown reason ctest rebuilds the source files.

I am currently using cmake 3.8.0.

Thanks
Damian 

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake



--
Craig Scott
Melbourne, Australia

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ctest: building test in parellel

Damian Dixon
Sadly -j does not appear to help.

I have also tried setting the gmake MAKEFLAGS environment as well.

On 27 June 2017 at 12:34, Craig Scott <[hidden email]> wrote:
Does the -j option to ctest not do what you want?

On Tue, Jun 27, 2017 at 9:32 PM, Damian Dixon <[hidden email]> wrote:
Hi,

Is there anyway to build tests in parallel when using ctest?

I am generating makefiles on Linux.

Part of the reason I am asking this is that if I pre-build the test for some unknown reason ctest rebuilds the source files.

I am currently using cmake 3.8.0.

Thanks
Damian 

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake



--
Craig Scott
Melbourne, Australia


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ctest: building test in parellel

Eric Noulard
In reply to this post by Damian Dixon


2017-06-27 13:32 GMT+02:00 Damian Dixon <[hidden email]>:
Hi,

Is there anyway to build tests in parallel when using ctest?

I'm not sure to understand.
Do you want to **build** test in parallel or **run** test in parallel?
 

I am generating makefiles on Linux.

Then

$ make -j 8 

should build in parallel.
  

Part of the reason I am asking this is that if I pre-build the test for some unknown reason ctest rebuilds the source files.

Then you have to verify your test dependencies. ctest should only run the tests not build then unless you call ctest
with --build-xxx option.

How are you calling ctest?

ctest --parallel 8 
or
ctest -j 8

should run tests in parallel.

This works for me (either parallel build or parallel test run) but I'm using ninja.


Could you give us more detail on how you run cmake, make and ctest ?


--
Eric

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ctest: building test in parellel

Damian Dixon
I'm not sure to understand.
​> ​
Do you want to **build** test in parallel or **run** test in parallel?

​I want to build a test in parallel.

​> How are you calling ctest?
ctest -V -R '^DDOTUT_x11$'

I'm only running one test executable at a time.

​> cmake
cmake -DCMAKE_TOOLCHAIN_FILE=../../Build/buildconfigs/any-linux-gcc-x86_64.cmake ../../Build

The build system we have contains 30 odd external libraries and about 40 of our own.
> make
make -j8

This builds everything but the tests.

We've been leaving the build of the tests to ctest upto now.

However ctest now appears to be building more than just the tests. Its not rebuilding everything just some of the libraries.

make on its own seems to respect the dependencies and only rebuild what is required unless I've run ctest.



On 27 June 2017 at 13:03, Eric Noulard <[hidden email]> wrote:


2017-06-27 13:32 GMT+02:00 Damian Dixon <[hidden email]>:
Hi,

Is there anyway to build tests in parallel when using ctest?

I'm not sure to understand.
Do you want to **build** test in parallel or **run** test in parallel?
 

I am generating makefiles on Linux.

Then

$ make -j 8 

should build in parallel.
  

Part of the reason I am asking this is that if I pre-build the test for some unknown reason ctest rebuilds the source files.

Then you have to verify your test dependencies. ctest should only run the tests not build then unless you call ctest
with --build-xxx option.

How are you calling ctest?

ctest --parallel 8 
or
ctest -j 8

should run tests in parallel.

This works for me (either parallel build or parallel test run) but I'm using ninja.


Could you give us more detail on how you run cmake, make and ctest ?


--
Eric


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...