[Simgrid-user] one more question

Arnaud Legrand Arnaud.Legrand at imag.fr
Sat Jun 25 17:29:46 CEST 2005


Today Zhang Yuanyuan wrote:

>       Could you tell me if in Simgrid it's possible to run several tasks on a host simultaneously?
>       Thanks for your precious time!

Of course, but you need to have as many process as task you want to process
simultaneously. Each process can do a MSG_task_execute at the same time,
even if they're running on the same host. Exemple:

int run_task(int argc, char **argv) 
     MSG_task_execute((m_task_t) MSG_process_get_data(MSG_process_self()));

int foo(int argc, char **argv)

  for(i=0; i<n ; i++) {
    MSG_process_create("asynchronous computation",
                        run_task, task_to_process_in_parallel[i], MSG_host_self());

Hope this helps.



More information about the Simgrid-user mailing list