[Insight-users] ctest multithreaded
Dr. Alex. GOUAILLARD
hanfei at caltech.edu
Tue Jul 24 16:27:42 EDT 2007
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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Solution1.zip
Type: application/x-zip-compressed
Size: 2579 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20070724/e596963d/Solution1.bin
More information about the Insight-users
mailing list