I’m running the command mpirun -np 8 ./model sample data file=foo.data.R, but this is just running the same model model.stan on different cores (i.e. different chains).
Is there something I’ve missed? I want to parallelize one model, not have the same thing run on different cores.
If this isn’t enough info, let me know and I’ll go ahead and copy my make/local etc and compiler options, but I’ve followed this document pretty closely: MPI Parallelism.
… yeah, we have in 2.18.0 a bug in the makefiles. Can you please download from cmdstan develop the make/models file and replace the one in the released version. Then just re-compile your model.
That part explains how to use map_rect, and the wiki explains how to set up MPI such that map_rect calls are parallelized. I think that’s all we have right now, though Sebastian will know more. Want to make a case study? :D
Tn this thread @Ole_Petter_Hansen has coded up some nice examples which do take a number of efficiency considerations into account. So if you want to get this up and running, have a read of that thread (programs are in there).