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

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Wed Jul 25 08:05:51 EDT 2007


Selon Mathieu Malaterre <mathieu.malaterre at gmail.com>:

> 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 ?

But that's also the case when using the -I option, or any option which allow to
restrict the set of tests.

The ITK tests for example don't seem to have a dependency on other tests.
And the itkTestDriver program can now be used to easily run a test program and
test the output images in a single ADD_TEST() command, so there is no
dependencies on other tests like with ImageCompare.

That's surely not possible for all the projects, but being able to run the tests
in parallel as an option (-j ?) would definitively be a nice feature.

>
> -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
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>




More information about the CMake mailing list