Enable OpenMP for ParallelSampler
Brought to you by:
martyn_plummer
One-line patch to enable OpenMP in ParallelSampler::update() for-loop.
You need to enable OpenMP (-fopenmp for GCC C/F77/C++) for this to work.
Don't know the internals of JAGS, maybe this is too naive and JAGS samplers could not be threaded.
But at least it fully loads all CPUs in my case.
In theory there should be virtually no trade-offs in parallelizing chains, in contrast to matrix operations.
Anonymous
OpenMP enablement for ParallelSampler
Thanks. I designed this with eventually threading in mind (hence the one-line patch) but I'm not entirely convinced that the jrmath library is thread safe, and there are speed issues to consider. Linking JAGS to a multithreaded BLAS/LAPACK library is generally disastrous in terms of speed. Needs more testing.