Skip to contents

this version of the MCMC function returns a Markov chain closure that assumes that it is bein run in an MPI context: R was launched using runmpi and the Rmpi package is installed. The chains shall communicate using the provided comm.

Usage

mcmc_mpi(
  update,
  comm,
  swapDelay = 0,
  swapFunc = pbdMPI_bcast_reduce_temperatures
)

Arguments

update

an update function

comm

an mpi comm which this function will use for send/receive operations

swapDelay

swaps will be attempted every 2*swapDelay+1 iterations

Value

an mcmc closure m(parMCMC,N,eps) that implicitly uses the supplied update function