SimGrid  3.13
Versatile Simulation of Distributed Systems
async-wait.c File Reference
#include "simgrid/msg.h"

Functions

 XBT_LOG_NEW_DEFAULT_CATEGORY (msg_async_wait,"Messages specific for this msg example")
 
static int sender (int argc, char *argv[])
 Sender process expects 6 arguments: More...
 
static int receiver (int argc, char *argv[])
 Receiver process expects 3 arguments: More...
 
int main (int argc, char *argv[])
 

Function Documentation

XBT_LOG_NEW_DEFAULT_CATEGORY ( msg_async_wait  ,
"Messages specific for this msg example"   
)
static int sender ( int  argc,
char *  argv[] 
)
static

Sender process expects 6 arguments:

  • number of tasks
  • computational cost
  • communication cost
  • number of receivers
  • start time
  • test time

This process first creates a task and send it asynchronously with MSG_task_isend. Then, if:

static int receiver ( int  argc,
char *  argv[] 
)
static

Receiver process expects 3 arguments:

  • unique id
  • start time
  • test time

This process first sleeps for "start time" seconds.

Then it posts asynchronous receives (MSG_task_irecv) and

If the received task is "finalize", the process ends

Otherwise, the task is processed

int main ( int  argc,
char *  argv[] 
)
  • Load the platform description
  • Deploy the sender and receiver processes
  • Run the simulation