My unit testing requires running a lot of BOOST_CHECK_CLOSE calls, which are taking a very long time (on one thread as far as I can tell). I would like to be able to do something along these lines:
#pragma omp parallel for num_threads(8)
for (int i=0; i<ARRAY_SIZE; i++) {
BOOST_CHECK_CLOSE(array1[i], array2[i], tolerance);
}
However, when I try this some very nasty memory corruption out of my control seems to happen. Segfaults most commonly, but sometimes this instead:
*** stack smashing detected ***
Has anyone got some experience of a good way to achieve my intended result which they could share? I'm sure everyone would appreciate having their tests running fast!
It cannot as mentionned here (item 3)
http://www.boost.org/doc/libs/1_57_0/libs/test/doc/html/open-issues.html
See the full discussion here:
Is there a way to run C++ Unit Tests tests in parallel?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With