[Insight-users] Re: [CMake] ctest multithreaded

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Jul 25 05:28:17 EDT 2007


Hi Alex "hanfei",

  I believe there is nothing in the ADD_TEST to declare dependencies.
So chance is that you would run a test (depending on output from
another) *before* the dependant test is run.

  Is this correct ?

-Mathieu

On 7/24/07, Dr. Alex. GOUAILLARD <hanfei at caltech.edu> wrote:
> hi all,
>
> Annoyed by the time needed by the ITK test suite to run, I made a little
> test trying to use ctest in a multithreaded fashion (thanks to the -I
> option). Attached is a little test that is yet neither automatic or
> complete, but that already give nice results on windows. It could be
> directly extended to deal with the memcheck command, which would be
> great too (as it is even slower).
>
> compile it, copy it in your build directory, and it should work fine.
>
> It first fake running ctest on the first test, for you to read the total
> number of tests. It is then prompting you for that number, and launch 8
> threads (you can change that number in the code) each running
> MaxNumberOfTest / 8 tests. It prints the logs in files named
> ctest.log.<ThreadNumber>
>
> pros:
> -> On my 8 cores (2 4-cores) machine the gain is indeed a factor 8. 1012
> ITK tests in 5 mn (yum!)
>
> cons:
> -> cmake is trying to write on some temp files, and all but the first
> fail to do that.
> -> I did not address merging and writing the resulting xml files for
> dashboard submission. I need to figure how to redirect each individual
> ctest xml output first, then parsing and merging should not really be an
> issue.
>
> questions:
> -> how to use ITK framework to make it plateform independent?
> -> how to get the number of cores automatically?
> -> how to be compliant with the existing 1: writing temp files?
> -> how to be compliant with the existant 2: how to redirect the xml output?
>
> alex "hanfei"
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
>


-- 
Mathieu


More information about the Insight-users mailing list