The ROme OpTimistic Simulator  2.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
wnd.h File Reference

Message delivery support. More...

#include <mpi.h>
#include <datatypes/list.h>
#include <mm/mm.h>
#include <ROOT-Sim.h>
#include <arch/atomic.h>
+ Include dependency graph for wnd.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _outgoing_msg
 The structure representing a node in the outgoing_queue list. More...
 
struct  _outgoing_queue
 An outgoing queue, to keep track of pending MPI-based message delivery. More...
 

Typedefs

typedef struct _outgoing_msg outgoing_msg
 The structure representing a node in the outgoing_queue list.
 
typedef struct _outgoing_queue outgoing_queue
 An outgoing queue, to keep track of pending MPI-based message delivery.
 

Functions

void outgoing_window_init (void)
 Outgoing queue initialization. More...
 
void outgoing_window_finalize (void)
 Finalize the message delivery subsystem. More...
 
void store_outgoing_msg (outgoing_msg *out_msg, unsigned int dest_kid)
 Store an outgoing message. More...
 
int prune_outgoing_queues (void)
 Prune all outgoing queues. More...
 
outgoing_msgallocate_outgoing_msg (void)
 Allocate a buffer for an outgoing message node. More...
 

Detailed Description

Message delivery support.

Message delivery support

This file is part of ROOT-Sim (ROme OpTimistic Simulator).

ROOT-Sim is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; only version 3 of the License applies.

ROOT-Sim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with ROOT-Sim; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Author
Tommaso Tocci

Definition in file wnd.h.

Function Documentation

outgoing_msg* allocate_outgoing_msg ( void  )

Allocate a buffer for an outgoing message node.

This function allocates a buffer to keep track of one message which is being remotely sent through MPI

Returns
a pointer to a buffer keeping an outgoing_msg to be populated before linking to an outgoing queue

Definition at line 130 of file wnd.c.

+ Here is the caller graph for this function:

void outgoing_window_finalize ( void  )

Finalize the message delivery subsystem.

At simulation shutdown, this function is invoked to release all the datastructures which have been used to keep track of remote message delivery.

Definition at line 107 of file wnd.c.

+ Here is the call graph for this function:

void outgoing_window_init ( void  )

Outgoing queue initialization.

This function is called at simulation startup, and initializes the outgoing queue subsystem, to keep track of the delivery of messages to remote simulation kernel instances.

Definition at line 86 of file wnd.c.

+ Here is the caller graph for this function:

int prune_outgoing_queues ( void  )

Prune all outgoing queues.

This function scans through all the local outgoing queues, looking for messages which have been correctly delivered to the destination.

Such message nodes are removed from the queue.

Actual queue pruning is performed in prune_outgoing_queue()

Definition at line 225 of file wnd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void store_outgoing_msg ( outgoing_msg out_msg,
unsigned int  dest_kid 
)

Store an outgoing message.

Given an outgoing_msg node and a destination kernel id, this function properly links the node in out_msg to the proper outgoing queue associated with the destination kernel.

Note
This function is thread safe
Parameters
out_msgA pointer to an outgoing_msg node
dest_kidThe global ID of the simulation kernel instance for which this node represents an outgoing message

Definition at line 167 of file wnd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: