X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/221538a27f21e52c182ae7fcc08c78c1175395b9..090fb57486c1c8d17cbea84bbf023c940f0dbf73:/src/msg/msg_gos.c diff --git a/src/msg/msg_gos.c b/src/msg/msg_gos.c index a883deb447..e26738e156 100644 --- a/src/msg/msg_gos.c +++ b/src/msg/msg_gos.c @@ -75,7 +75,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task) XBT_DEBUG("Parallel execution action created: %p", simdata->compute); } else { simdata->compute = simcall_host_execute(task->name, - p_simdata->m_host->smx_host, + p_simdata->m_host, simdata->computation_amount, simdata->priority); @@ -164,7 +164,7 @@ msg_error_t MSG_process_sleep(double nb_sec) * sometime waiting on all these mailboxes using @ref MSG_comm_waitany. You can find * an example of use of this function in the @ref MSG_examples section. * - Provide a proper patch to implement this functionality back in MSG. That wouldn't be - * very difficult actually. Check the function #MSG_mailbox_get_task_ext. During its call to + * very difficult actually. Check the function @ref MSG_mailbox_get_task_ext. During its call to * simcall_comm_recv(), the 5th argument, match_fun, is NULL. Create a function that filters * messages according to the host (that you will pass as sixth argument to simcall_comm_recv() * and that your filtering function will receive as first parameter, and then, the filter could @@ -271,6 +271,25 @@ msg_comm_t MSG_task_isend(msg_task_t task, const char *alias) return MSG_task_isend_with_matching(task,alias,NULL,NULL); } +/** \ingroup msg_task_usage + * \brief Sends a task on a mailbox with a maximum rate + * + * This is a non blocking function: use MSG_comm_wait() or MSG_comm_test() + * to end the communication. The maxrate parameter allows the application + * to limit the bandwidth utilization of network links when sending the task. + * + * \param task a #msg_task_t to send on another location. + * \param alias name of the mailbox to sent the task to + * \param maxrate the maximum communication rate for sending this task . + * \return the msg_comm_t communication created + */ +msg_comm_t MSG_task_isend_bounded(msg_task_t task, const char *alias, double maxrate) +{ + task->simdata->rate = maxrate; + return MSG_task_isend_with_matching(task,alias,NULL,NULL); +} + + /** \ingroup msg_task_usage * \brief Sends a task on a mailbox, with support for matching requests * @@ -433,6 +452,7 @@ int MSG_comm_test(msg_comm_t comm) { xbt_ex_t e; int finished = 0; + TRY { finished = simcall_comm_test(comm->s_comm);