Class
NumCosmoMathMPIJobMCMC
Description [src]
final class NumCosmoMath.MPIJobMCMC : NumCosmoMath.MPIJob
{
/* No available fields */
}
MPI job object for running MCMC steps.
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.
Functions
ncm_mpi_job_mcmc_clear
Decrease the reference count of mjmcmc by one, and sets the pointer *mjmcmc to
NULL.
Instance methods
Methods inherited from NcmMPIJob (23)
ncm_mpi_job_create_input
Creates a new input object.
ncm_mpi_job_create_return
Creates a new return object.
ncm_mpi_job_destroy_input
Destroy the input object created with ncm_mpi_job_create_input().
ncm_mpi_job_destroy_input_buffer
Destroy buf created with ncm_mpi_job_get_input_buffer()
or ncm_mpi_job_pack_input().
ncm_mpi_job_destroy_return
Destroy the return object created with ncm_mpi_job_create_return().
ncm_mpi_job_destroy_return_buffer
Destroy buf created with ncm_mpi_job_get_return_buffer()
or ncm_mpi_job_pack_return().
ncm_mpi_job_free
Decrease the reference count of mpi_job by one.
ncm_mpi_job_free_all_slaves
Frees all available slaves used by mpi_job.
ncm_mpi_job_get_input_buffer
Creates a buffer from input compatible with ncm_mpi_job_input_datatype().
ncm_mpi_job_get_return_buffer
Creates a buffer from ret compatible with ncm_mpi_job_return_datatype().
ncm_mpi_job_init_all_slaves
Initialize all available slaves with mpi_job.
ncm_mpi_job_input_datatype
Computes the size and datatype of the input buffer.
ncm_mpi_job_pack_input
Packs (when necessary) the input into the input buffer.
ncm_mpi_job_pack_return
Packs (when necessary) the return into the return buffer buf.
ncm_mpi_job_ref
Increase the reference of mpi_job by one.
ncm_mpi_job_return_datatype
Computes the size and datatype of the return buffer.
ncm_mpi_job_run
Runs job mpi_job using input and returns in ret.
ncm_mpi_job_run_array
Send work to all slaves in a round-robin fashion. Both arrays input_array and ret_array
must have the same length and should be filled with the appropriated pointers.
ncm_mpi_job_run_array_async
Send work to all slaves using an additional thread to control the slaves work.
The main execution thread runs jobs in parallel while it waits for the slaves to finish.
Both arrays input_array and ret_array must have the same length and should be
filled with the appropriated pointers.
ncm_mpi_job_unpack_input
Unpacks (when necessary) the buffer buf into the input pointer input.
ncm_mpi_job_unpack_return
Unpacks (when necessary) the buffer buf into the return pointer return.
ncm_mpi_job_work_clear
Method called during the working phase of mpi_job and in the
end before object destruction. This method can be called multiple
times during the work phase.
ncm_mpi_job_work_init
Method called after mpi_job is initialized at the slave
and before start working.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.