SimGrid  3.13
Versatile Simulation of Distributed Systems
app-pmm.c File Reference
#include "simgrid/msg.h"
#include "xbt/matrix.h"
#include "xbt/xbt_os_time.h"

Classes

struct  s_node_job
 
struct  s_result
 

Macros

#define GRID_SIZE   3 /* Modify to adjust the grid's size */
 
#define NODE_MATRIX_SIZE   300 /* Amount of work done by each node*/
 
#define GRID_NUM_NODES   GRID_SIZE * GRID_SIZE
 
#define MATRIX_SIZE   NODE_MATRIX_SIZE * GRID_SIZE
 
#define MAILBOX_NAME_SIZE   10
 
#define NEIGHBOURS_COUNT   GRID_SIZE - 1
 

Typedefs

typedef struct s_node_job s_node_job_t
 
typedef struct s_node_jobnode_job_t
 
typedef struct s_result s_result_t
 
typedef struct s_resultresult_t
 

Functions

 XBT_LOG_NEW_DEFAULT_CATEGORY (msg_pmm,"Messages specific for this msg example")
 
int node (int argc, char **argv)
 
static void create_jobs (xbt_matrix_t A, xbt_matrix_t B, node_job_t *jobs)
 
static void broadcast_jobs (node_job_t *jobs)
 
static node_job_t wait_job (int selfid)
 
static void broadcast_matrix (xbt_matrix_t M, int num_nodes, int *nodes)
 
static void get_sub_matrix (xbt_matrix_t *sM, int selfid)
 
static void receive_results (result_t *results)
 
static void task_cleanup (void *arg)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

#define GRID_SIZE   3 /* Modify to adjust the grid's size */
#define NODE_MATRIX_SIZE   300 /* Amount of work done by each node*/
#define GRID_NUM_NODES   GRID_SIZE * GRID_SIZE
#define MATRIX_SIZE   NODE_MATRIX_SIZE * GRID_SIZE
#define MAILBOX_NAME_SIZE   10
#define NEIGHBOURS_COUNT   GRID_SIZE - 1

Typedef Documentation

typedef struct s_node_job s_node_job_t
typedef struct s_node_job * node_job_t
typedef struct s_result s_result_t
typedef struct s_result * result_t

Function Documentation

XBT_LOG_NEW_DEFAULT_CATEGORY ( msg_pmm  ,
"Messages specific for this msg example"   
)
int node ( int  argc,
char **  argv 
)
static void create_jobs ( xbt_matrix_t  A,
xbt_matrix_t  B,
node_job_t jobs 
)
static
static void broadcast_jobs ( node_job_t jobs)
static
static node_job_t wait_job ( int  selfid)
static
static void broadcast_matrix ( xbt_matrix_t  M,
int  num_nodes,
int *  nodes 
)
static
static void get_sub_matrix ( xbt_matrix_t sM,
int  selfid 
)
static
static void receive_results ( result_t results)
static
static void task_cleanup ( void arg)
static
int main ( int  argc,
char *  argv[] 
)