CTest and CPU core utilization

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

CTest and CPU core utilization

Sean McBride
Hi all,

Let's say I have:
 - an 8 core machine
 - hundreds of (slow) unit tests
 - most unit test are single threaded

Is there a way to make ctest run tests in palallel?  My CPUs are vastly
under utilized.

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 [hidden email]
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________
Powered by www.kitware.com

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

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

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

Re: CTest and CPU core utilization

Bill Hoffman
Sean McBride wrote:

> Hi all,
>
> Let's say I have:
>  - an 8 core machine
>  - hundreds of (slow) unit tests
>  - most unit test are single threaded
>
> Is there a way to make ctest run tests in palallel?  My CPUs are vastly
> under utilized.
>
> Thanks,
>
There is a beta ctest -j N functionality in CVS.   It does not submit to
dashboards correctly yet, but should be able to run tests from the
command line.  If the tests depend on each other, you have to add some
extra test properties to let ctest know about that.

-Bill

_______________________________________________
Powered by www.kitware.com

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

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

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

Re: CTest and CPU core utilization

Sean McBride
On 7/10/09 1:44 PM, Bill Hoffman said:

>> Let's say I have:
>>  - an 8 core machine
>>  - hundreds of (slow) unit tests
>>  - most unit test are single threaded
>>
>> Is there a way to make ctest run tests in palallel?  My CPUs are vastly
>> under utilized.
>>
>> Thanks,
>>
>There is a beta ctest -j N functionality in CVS.

Great!  Does 'N' instruct it to run 'N' tests in parallel?

>If the tests depend on each other, you have to add some
>extra test properties to let ctest know about that.

Do you know if CMake itself, VTK, and ITK have these extra properties?

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 [hidden email]
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________
Powered by www.kitware.com

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

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

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

Re: CTest and CPU core utilization

Bill Hoffman
Sean McBride wrote:

>>>
>> There is a beta ctest -j N functionality in CVS.
>
> Great!  Does 'N' instruct it to run 'N' tests in parallel?
>
Yes.
>> If the tests depend on each other, you have to add some
>> extra test properties to let ctest know about that.
>
> Do you know if CMake itself, VTK, and ITK have these extra properties?
>
CMake does, VTK and ITK do not yet...


-Bill
_______________________________________________
Powered by www.kitware.com

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

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

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

Re: CTest and CPU core utilization

Sean McBride
On 7/10/09 2:07 PM, Bill Hoffman said:

>>> There is a beta ctest -j N functionality in CVS.
>>
>> Great!  Does 'N' instruct it to run 'N' tests in parallel?
>>
>Yes.

Any plans to go even further?  It's hard to choose 'N'.  Some test may
create many threads and some may create none.  Perhaps a way for tests
to report to ctest how many cores they need.  Then ctest would have more
info to decide how many/which tests to run at the same time.

>>> If the tests depend on each other, you have to add some
>>> extra test properties to let ctest know about that.
>>
>> Do you know if CMake itself, VTK, and ITK have these extra properties?
>>
>CMake does, VTK and ITK do not yet...

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 [hidden email]
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________
Powered by www.kitware.com

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

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

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

Re: CTest and CPU core utilization

Bill Hoffman
Sean McBride wrote:

> On 7/10/09 2:07 PM, Bill Hoffman said:
>
>>>> There is a beta ctest -j N functionality in CVS.
>>> Great!  Does 'N' instruct it to run 'N' tests in parallel?
>>>
>> Yes.
>
> Any plans to go even further?  It's hard to choose 'N'.  Some test may
> create many threads and some may create none.  Perhaps a way for tests
> to report to ctest how many cores they need.  Then ctest would have more
> info to decide how many/which tests to run at the same time.
Yes, the idea would be to set a test property on the test that gave the
test an N as well that could be taken into consideration when running
the test.

-Bill
_______________________________________________
Powered by www.kitware.com

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

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

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

Re: CTest and CPU core utilization

Sean McBride
On 7/10/09 2:49 PM, Bill Hoffman said:

>> Any plans to go even further?  It's hard to choose 'N'.  Some test may
>> create many threads and some may create none.  Perhaps a way for tests
>> to report to ctest how many cores they need.  Then ctest would have more
>> info to decide how many/which tests to run at the same time.
>Yes, the idea would be to set a test property on the test that gave the
>test an N as well that could be taken into consideration when running
>the test.

Awesome, I'm looking forward to the next release then!

--
____________________________________________________________
Sean McBride, B. Eng                 [hidden email]
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Loading...