Enumeration
NumCosmoMathMPIJobCtrlTag
Description [src]
MPI tags for master-slave communication.
If NCM_MPI_CTRL_TAG_CMD is used, the message is a control message.
NCM_MPI_CTRL_SLAVE_INIT must be followed by #NCM_MPI_CTRL_TAG_JOB containing the serialized job.
NCM_MPI_CTRL_SLAVE_WORK must be followed by #NCM_MPI_CTRL_TAG_WORK_INPUT containing the serialized input.
NCM_MPI_CTRL_SLAVE_WORK is followed by #NCM_MPI_CTRL_TAG_WORK_RETURN containing the serialized return.
NCM_MPI_CTRL_SLAVE_FREE does not need to be followed by any message. The slave can be reinitialized with #NCM_MPI_CTRL_SLAVE_INIT.
NCM_MPI_CTRL_SLAVE_KILL should not be followed by any message. The slave will exit.
Slaves receive messages with tags below:
- Waits for a message with tag NCM_MPI_CTRL_TAG_CMD:
- If the control message is #NCM_MPI_CTRL_SLAVE_INIT, the slave receives #NCM_MPI_CTRL_TAG_JOB with the serialized job.
- If the control message is #NCM_MPI_CTRL_SLAVE_WORK, the slave receives #NCM_MPI_CTRL_TAG_WORK_INPUT with the serialized input.
- After #NCM_MPI_CTRL_SLAVE_WORK, the slave sends NCM_MPI_CTRL_TAG_WORK_RETURN with the serialized return.