Top | ![]() |
![]() |
![]() |
![]() |
Functions
NcmMPIJob * | ncm_mpi_job_ref () |
void | ncm_mpi_job_free () |
void | ncm_mpi_job_clear () |
void | ncm_mpi_job_work_init () |
void | ncm_mpi_job_work_clear () |
NcmMPIDatatype | ncm_mpi_job_input_datatype () |
NcmMPIDatatype | ncm_mpi_job_return_datatype () |
gpointer | ncm_mpi_job_create_input () |
gpointer | ncm_mpi_job_create_return () |
void | ncm_mpi_job_destroy_input () |
void | ncm_mpi_job_destroy_return () |
gpointer | ncm_mpi_job_get_input_buffer () |
gpointer | ncm_mpi_job_get_return_buffer () |
void | ncm_mpi_job_destroy_input_buffer () |
void | ncm_mpi_job_destroy_return_buffer () |
gpointer | ncm_mpi_job_pack_input () |
gpointer | ncm_mpi_job_pack_return () |
void | ncm_mpi_job_unpack_input () |
void | ncm_mpi_job_unpack_return () |
void | ncm_mpi_job_run () |
void | ncm_mpi_job_init_all_slaves () |
void | ncm_mpi_job_run_array () |
void | ncm_mpi_job_run_array_async () |
void | ncm_mpi_job_free_all_slaves () |
#define | NCM_MPI_JOB_DEBUG_PRINT() |
Types and Values
typedef | NcmMPIDatatype |
#define | NCM_MPI_CTRL_MASTER_ID |
enum | NcmMPIJobCtrlMsg |
enum | NcmMPIJobCtrlTag |
Object Hierarchy
GEnum ├── NcmMPIJobCtrlMsg ╰── NcmMPIJobCtrlTag GObject ╰── NcmMPIJob ├── NcmMPIJobFEval ├── NcmMPIJobFit ├── NcmMPIJobMCMC ╰── NcmMPIJobTest
Functions
ncm_mpi_job_ref ()
NcmMPIJob *
ncm_mpi_job_ref (NcmMPIJob *mpi_job
);
Increase the reference of mpi_job
by one.
ncm_mpi_job_free ()
void
ncm_mpi_job_free (NcmMPIJob *mpi_job
);
Decrease the reference count of mpi_job
by one.
ncm_mpi_job_clear ()
void
ncm_mpi_job_clear (NcmMPIJob **mpi_job
);
Decrease the reference count of mpi_job
by one, and sets the pointer *mpi_job
to
NULL.
ncm_mpi_job_work_init ()
void
ncm_mpi_job_work_init (NcmMPIJob *mpi_job
);
Method called after mpi_job
is initialized at the slave
and before start working.
[virtual work_init]
ncm_mpi_job_work_clear ()
void
ncm_mpi_job_work_clear (NcmMPIJob *mpi_job
);
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.
[virtual work_clear]
ncm_mpi_job_input_datatype ()
NcmMPIDatatype ncm_mpi_job_input_datatype (NcmMPIJob *mpi_job
,gint *len
,gint *size
);
Computes the size and datatype of the input buffer.
[virtual input_datatype]
ncm_mpi_job_return_datatype ()
NcmMPIDatatype ncm_mpi_job_return_datatype (NcmMPIJob *mpi_job
,gint *len
,gint *size
);
Computes the size and datatype of the return buffer.
[virtual return_datatype]
ncm_mpi_job_create_input ()
gpointer
ncm_mpi_job_create_input (NcmMPIJob *mpi_job
);
Creates a new input object.
[virtual create_input]
ncm_mpi_job_create_return ()
gpointer
ncm_mpi_job_create_return (NcmMPIJob *mpi_job
);
Creates a new return object.
[virtual create_return]
ncm_mpi_job_destroy_input ()
void ncm_mpi_job_destroy_input (NcmMPIJob *mpi_job
,gpointer input
);
Destroy the input
object created with ncm_mpi_job_create_input()
.
[virtual destroy_input]
ncm_mpi_job_destroy_return ()
void ncm_mpi_job_destroy_return (NcmMPIJob *mpi_job
,gpointer ret
);
Destroy the return
object created with ncm_mpi_job_create_return()
.
[virtual destroy_return]
ncm_mpi_job_get_input_buffer ()
gpointer ncm_mpi_job_get_input_buffer (NcmMPIJob *mpi_job
,gpointer input
);
Creates a buffer from input
compatible with ncm_mpi_job_input_datatype()
.
[virtual get_input_buffer]
ncm_mpi_job_get_return_buffer ()
gpointer ncm_mpi_job_get_return_buffer (NcmMPIJob *mpi_job
,gpointer ret
);
Creates a buffer from ret
compatible with ncm_mpi_job_return_datatype()
.
[virtual get_return_buffer]
ncm_mpi_job_destroy_input_buffer ()
void ncm_mpi_job_destroy_input_buffer (NcmMPIJob *mpi_job
,gpointer input
,gpointer buf
);
Destroy buf
created with ncm_mpi_job_get_input_buffer()
or ncm_mpi_job_pack_input()
.
[virtual destroy_input_buffer]
ncm_mpi_job_destroy_return_buffer ()
void ncm_mpi_job_destroy_return_buffer (NcmMPIJob *mpi_job
,gpointer ret
,gpointer buf
);
Destroy buf
created with ncm_mpi_job_get_return_buffer()
or ncm_mpi_job_pack_return()
.
[virtual destroy_return_buffer]
ncm_mpi_job_pack_input ()
gpointer ncm_mpi_job_pack_input (NcmMPIJob *mpi_job
,gpointer input
);
Packs (when necessary) the input into the input buffer.
[virtual pack_input]
ncm_mpi_job_pack_return ()
gpointer ncm_mpi_job_pack_return (NcmMPIJob *mpi_job
,gpointer ret
);
Packs (when necessary) the return into the return buffer buf
.
[virtual pack_return]
ncm_mpi_job_unpack_input ()
void ncm_mpi_job_unpack_input (NcmMPIJob *mpi_job
,gpointer buf
,gpointer input
);
Unpacks (when necessary) the buffer buf
into the input pointer input
.
[virtual unpack_input]
ncm_mpi_job_unpack_return ()
void ncm_mpi_job_unpack_return (NcmMPIJob *mpi_job
,gpointer buf
,gpointer ret
);
Unpacks (when necessary) the buffer buf
into the return pointer return
.
[virtual unpack_return]
ncm_mpi_job_run ()
void ncm_mpi_job_run (NcmMPIJob *mpi_job
,gpointer input
,gpointer ret
);
Runs job mpi_job
using input
and returns in ret
.
[virtual run]
ncm_mpi_job_init_all_slaves ()
void ncm_mpi_job_init_all_slaves (NcmMPIJob *mpi_job
,NcmSerialize *ser
);
Initialize all available slaves with mpi_job
.
ncm_mpi_job_run_array ()
void ncm_mpi_job_run_array (NcmMPIJob *mpi_job
,GPtrArray *input_array
,GPtrArray *ret_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 ()
void ncm_mpi_job_run_array_async (NcmMPIJob *mpi_job
,GPtrArray *input_array
,GPtrArray *ret_array
);
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_free_all_slaves ()
void
ncm_mpi_job_free_all_slaves (NcmMPIJob *mpi_job
);
Frees all available slaves used by mpi_job
.
Property Details
The “placeholder”
property
“placeholder” guint
placeholder.
Owner: NcmMPIJob
Flags: Read / Write / Construct
Default value: 0