Within-chain parallelisation

Hello! :)

I’m trying to use within-chain parallelisation to try and speed up my model but unfortunately don’t think I’m doing something right here. So,

AFAIK I have 16 CPUs to use and have 4 chains. I used threads = threading(2), in the brm function, to use 8 CPUs and that seemed to work (when I say ‘seemed to work’, I mean I saw 8 CPUs at ~ 100% usage). But when I tried using threads = threading(3) or threads = threading(4), it still only seems to use 8 CPUs (CPU 1 to 6 and CPU 11 and 12),

Screen Shot 2021-11-16 at 8.04.51 am

I’d like to use at least 12 CPUs (i.e., 3 threads per chain) and would appreciate any help. Details of the virtual computer I am using on the server is below,

  • Operating System: CentOS Linux (Release 7 (Core) 64-bit; Kernel Linux 3.10.0-1160.36.2.el7.x86_64 x86_64) and Hardware (Memory: 31.3 GiB; Processor: AMD EPYC 7501 32-Core Processor × 16)
  • brms Version: 2.16.2

Thank you for reading, cheers,

Rohan

Further to this, this now gives an error of "Error: All variables in all chains must have the same length." (screenshot below)

Screen Shot 2021-11-20 at 9.11.59 am