Implementation-Core
[Developer Documentation]

Collaboration diagram for Implementation-Core:

Detailed Description

This section deals with the data-structures and the basic concepts which form the core of this implementation.

Data-Structures

Basically there are four data-structures. moc_message_envelope_struct holds meta-information about a message and moc_message_status_struct holds information about used buffer-space and provide means for a receiving proccess to send some information back to the sending process.

moc_process_struct stores information every node needs to know about the other nodes to successfully communicate with them.

The forth data-structure (actually there are two) moc_node_handle_ppu_struct respectively moc_node_handle_spu_struct holds information a node know about itself and the execution environment.

Concepts

Every node has (N-1) queues for incoming messages, where N is the overall number of node. Each queue is exclusively used by a specific remote node to write meta-data about the message to be send into it (queue-entries are of type moc_message_envelope_struct). Because there are several independend queues and no global time is available, an exact order of all incoming messages cannot be guaranteed. Corrent ordering can only be guaranteed for messages from the same source-node. The queues are implemented in form of a big array which is divided in (N-1) equally sized pieces.

Furthermore every node has an array of size (N-1)*m where m is the size of a message-queue (entries are of type moc_message_status_struct). This array is used for buffer-management and to report the status of a message back to the sender. Every message currently under progress has a message-id which is unique in respect to the sending-node. This message-id is equal to the index of the corresponding entry of the status-array.

In order to communicate with other nodes every node also keeps a list of all nodes in the execution environment (entries are of type moc_process_struct).

Pointers to the own arrays and some further information a node needs to know (e.g. own rank) is stored in the globally accessible variable node_handle.


Modules

 Address-Macros
 Predefined Macros for calculating Addresses of Message-Queue and Status-Array.
 Test-Macros
 Predefined Macros for testing the validity of parameters.

Data Structures

struct  moc_message_envelope_struct
 Message-envelope structure. More...
struct  moc_message_status_struct
 Message-status structure. More...
struct  moc_process_struct
 Process-information structure. More...
struct  moc_node_handle_ppu_struct
 Node-handle structure. More...
struct  moc_node_handle_spu_struct
 Node-handle structure. More...

PPU & SPU

typedef struct
moc_message_envelope_struct 
moc_message_envelope_t
 Message-envelope structure.
typedef struct
moc_message_status_struct 
moc_message_status_t
 Message-status structure.
typedef struct moc_process_struct moc_process_t
 Process-information structure.
#define MOC_QUEUE_SIZE   4
 Default size of the message-queues.
#define MOC_BUFFER_SIZE   2048
 Default size of the buffers used for buffered communication.
#define IMOC_MESSAGE_CHANNEL_DMA   0
 Constant for moc_message_envelope_t.flags.channel.
#define IMOC_MESSAGE_CHANNEL_ENV   1
 Constant for moc_message_envelope_t.flags.channel.
#define MOC_PPU_PROCESS   0
 Constant for moc_process_struct.type.
#define MOC_SPU_PROCESS   1
 Constant for moc_process_struct.type.

PPU only

typedef struct
moc_node_handle_ppu_struct 
moc_node_handle_ppu_t
 Node-handle structure.
moc_node_handle_ppu_t node_handle
 Information each node knowns about himself and the world.

SPU only

typedef struct
moc_node_handle_spu_struct 
moc_node_handle_spu_t
 Node-handle structure.
moc_node_handle_spu_t node_handle
 Information each node knowns about himself and the world.


Define Documentation

#define IMOC_MESSAGE_CHANNEL_DMA   0

Constant for moc_message_envelope_t.flags.channel.

Message is transported via a DMA-Call.

Definition at line 108 of file imoc_core.h.

Referenced by MOC_Bsend(), MOC_ISsend(), MOC_Recv(), and MOC_Ssend().

#define IMOC_MESSAGE_CHANNEL_ENV   1

Constant for moc_message_envelope_t.flags.channel.

Message is embedded in message-envelope.

Definition at line 116 of file imoc_core.h.

Referenced by MOC_Bsend(), MOC_ISsend(), MOC_Recv(), and MOC_Ssend().

#define MOC_BUFFER_SIZE   2048

Default size of the buffers used for buffered communication.

Definition at line 68 of file imoc_core.h.

#define MOC_PPU_PROCESS   0

Constant for moc_process_struct.type.

Definition at line 148 of file imoc_core.h.

Referenced by MOC_Init().

#define MOC_QUEUE_SIZE   4

Default size of the message-queues.

Definition at line 63 of file imoc_core.h.

#define MOC_SPU_PROCESS   1

Constant for moc_process_struct.type.

Definition at line 153 of file imoc_core.h.

Referenced by MOC_Init().


Typedef Documentation

Message-envelope structure.

Is used to store meta-data about the message in the message-queues of the receiving process.

Message-status structure.

Is used to store information about the message-status and the buffer used in the message-status-array.

Node-handle structure.

Note:
PPU only
Information each node knowns about himself and the world. typedef of moc_node_handle_ppu_struct

Node-handle structure.

Note:
SPU only
Information each node knowns about himself and the world. typedef of moc_node_handle_spu_struct

Process-information structure.

Stores information about a MOC-Process. This information is used for communication between the processes.


Variable Documentation

Information each node knowns about himself and the world.

Note:
SPU only

Definition at line 47 of file imoc_core_spu.h.


Generated on Thu Feb 12 13:51:03 2009 for MPI On Cell (Documentation) by  doxygen 1.5.6