The last test in test-threads.R produces:
Cnc1 <- Cnc$new()
## expect_silent(out <- Cnc1$go(100, 100, 10))
## Error: C stack usage 14983114845556 is too close to the limit
## Error: no more error handlers available (recursive errors?); invoking 'abort' restart
## *** longjmp causes uninitialized stack frame ***: terminated
However, if I manually hard-code the number of threads like this: tbb::global_control gc(tbb::global_control::max_allowed_parallelism,4); instead of using getNumThreads(4.0), it is fine. And from earlier versions of the codebase that didn't control the number of threads, nested parallel_for is also fine.
So once we address issue #151, I will experiment with trying to figure out why use of getNumThreads is a problem.
The last test in test-threads.R produces:
However, if I manually hard-code the number of threads like this:
tbb::global_control gc(tbb::global_control::max_allowed_parallelism,4);instead of usinggetNumThreads(4.0), it is fine. And from earlier versions of the codebase that didn't control the number of threads, nested parallel_for is also fine.So once we address issue #151, I will experiment with trying to figure out why use of
getNumThreadsis a problem.