Search code examples
csimgrid

Parallel task in SimGrid


This info from simgrid documentation how to create parallel tasks:

msg_task_t MSG_parallel_task_create (const char *   name,
    int     host_nb,
    const msg_host_t *  host_list,
    double *    flops_amount,
    double *    bytes_amount,
    void *  data 
)

Which MSG_task_send function should be used for sending to multiple mailboxes after creating this parallel task?

On the host for executing I should use msg_error_t MSG_parallel_task_execute (msg_task_t task). Host lets us know when executing of his part of parallel task is done.

Is it possible to trace the execution of the whole parallel task?


Solution

  • Short answer: I'm not sure that parallel tasks are the abstraction you are looking for. Maybe you want to build you own abstraction with mailboxes and regular tasks. The long answer follows.

    There is no mailbox involved with these parallel tasks: They allow one process to start the all-to-all communication between a set of hosts, and some execution on the same set of hosts.

    The processes running on the selected hosts will not be involved: only their hosts are. There is no pre-existing way to synchronize between processes on a multiple task.

    One solution could be to ask the process that run the parallel task to send messages onto the right mailboxes once the parallel task is done. This sounds clumsy, but only you knows what you want to build and can imagine the right abstraction for your model.