Top |
NcmMPIJobMCMC * | ncm_mpi_job_mcmc_new () |
NcmMPIJobMCMC * | ncm_mpi_job_mcmc_ref () |
void | ncm_mpi_job_mcmc_free () |
void | ncm_mpi_job_mcmc_clear () |
NcmFit * | fit | Read / Write / Construct Only |
NcmObjArray * | function-array | Read / Write / Construct Only |
This object is a subclass of NcmMPIJob, designed to implement an MPI job for evaluating the posterior at the proposal points during an MCMC run. It is utilized by NcmFitESMCMC to parallelize the evaluation of the posterior function. The job involves computing the posterior function and, if applicable, additional functions (e.g., derived quantities) at a specified point within the parameter space. Notably, the slave also receives the current point and the current value for the acceptance probability. Consequently, it decides whether to accept or reject the proposal point and only computes the additional functions if the proposal point is accepted.
The MPI job is implemented as a function that takes a vector consisting of the set parameters, the current value of the posterior function, the acceptance probability, and the jump probability as input. The function returns a vector with the first element being 1.0 if the proposal point is accepted and 0.0 otherwise. The next value is the value of the posterior function at the proposal point. The remaining values are the values of the additional functions at the proposal point.
NcmMPIJobMCMC * ncm_mpi_job_mcmc_new (NcmFit *fit
,NcmObjArray *func_oa
);
Creates a new NcmMPIJobMCMC object.
NcmMPIJobMCMC *
ncm_mpi_job_mcmc_ref (NcmMPIJobMCMC *mjmcmc
);
Increase the reference of mjmcmc
by one.
void
ncm_mpi_job_mcmc_free (NcmMPIJobMCMC *mjmcmc
);
Decrease the reference count of mjmcmc
by one.
void
ncm_mpi_job_mcmc_clear (NcmMPIJobMCMC **mjmcmc
);
Decrease the reference count of mjmcmc
by one, and sets the pointer *mjmcmc
to
NULL.
“fit”
property“fit” NcmFit *
Fit object.
Owner: NcmMPIJobMCMC
Flags: Read / Write / Construct Only
“function-array”
property“function-array” NcmObjArray *
Functions array.
Owner: NcmMPIJobMCMC
Flags: Read / Write / Construct Only