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!