Parallelize sampling with MPI
Some of the cosmosis samplers can be parallelized to run using MPI. This can hugely speed up the time taken to complete, depending on your system and problem. In other cases the parallelism acts more as a check that convergence has taken place.
multinest samplers use intrinsically parallel algorithms: so they are greatly speeded by MPI.
metropolis samplers can have several chains run in parallel, This does not speed up convergence, but it does let you diagnose it more easily.
The other samplers are serial.
Running a sampler in parallel
To run a sampler in parallel you must have mpi4py installed; this means you must also have an MPI environment including mpicc and mpif90 (the automatic installation includes all these).
For all the samplers, you can run in parallel on, e.g. four samplers, like this:
mpirun -n 4 cosmosis --mpi params.ini
Maximum process numbers
emcee, the most MPI processes you can use without having some idle is nwalkers/2+1.
grid samplers you can use any number up to the total number of points to be sampled, i.e. nsample_dimension^n_dimension.
snake, the number varies throughout the run, so you may sometimes have idle cores. The most cores used at once is n_dimension * 2, but it will typically be about half that.
snake samplers use a master-slave set up for sampling. This means you can typically use one more process than you have cores effectively. For multinest you should not use more processes than cores.