arch/t3e/machine.c File Reference

T3E machine layer. More...

Go to the source code of this file.

Data Structures

struct  McDistListS
struct  McMsgHdrS
struct  McQueueS
struct  McMultiMsg
enum  boolean { false = 0, true = 1, false = 0, true = 1 }
enum  { list_empty = -1 }
int _Cmi_mype
int _Cmi_numpes
int _Cmi_myrank
static McQueuein_transit_queue
static McQueuein_transit_tmp_queue
static McQueuetmp_queue
static McQueuereceived_queue
static McQueuereceived_token_queue
static McQueuebroadcast_queue
static McQueuebroadcast_tmp_queue
static McDistList head
static long * my_lock
static long head_lock [MAX_PES]
static long bcast_lock [MAX_PES]
int inside_comm = 0
static double clocktick
static long inittime_wallclock
static long inittime_virtual
static volatile int memflag
typedef McDistListS McDistList
typedef McMsgHdrS McMsgHdr
typedef McQueueS McQueue
 CpvDeclare (void *, CmiLocalQueue)
static void McInit ()
static void McInitList ()
static void McEnqueueRemote (void *msg, int msg_sz, int dst_pe)
static void McRetrieveRemote (void)
static void McCleanUpInTransit (void)
static McQueueMcQueueCreate (void)
static void McQueueAddToBack (McQueue *queue, void *element)
static void * McQueueRemoveFromFront (McQueue *queue)
static void * McQueueRemoveFromBack (McQueue *queue)
int McChecksum (char *msg, int size)
void CmiSyncSendFn (int dest_pe, int size, char *msg)
CmiCommHandle CmiAsyncSendFn (int dest_pe, int size, char *msg)
void CmiFreeSendFn (int dest_pe, int size, char *msg)
void CmiSyncBroadcastFn (int size, char *msg)
CmiCommHandle CmiAsyncBroadcastFn (int size, char *msg)
void CmiFreeBroadcastFn (int size, char *msg)
void CmiSyncBroadcastAllFn (int size, char *msg)
CmiCommHandle CmiAsyncBroadcastAllFn (int size, char *msg)
void CmiFreeBroadcastAllFn (int size, char *msg)
void CmiSyncListSendFn (int npes, int *pes, int size, char *msg)
CmiCommHandle CmiAsyncListSendFn (int npes, int *pes, int size, char *msg)
void CmiFreeListSendFn (int npes, int *pes, int size, char *msg)
 CpvDeclare (int, McMulticastWaitHandler)
void CmiSyncMulticastFn (CmiGroup grp, int size, char *msg)
void McMulticastWaitFn (McMultiMsg *msg)
void CmiMulticastInit (void)
CmiCommHandle CmiAsyncMulticastFn (CmiGroup grp, int size, char *msg)
void CmiFreeMulticastFn (CmiGroup grp, int size, char *msg)
void CmiAbort (const char *message)
 Serial version of common Charm++ routines:.
void * CmiGetNonLocal ()
void ConverseInit (int argc, char **argv, CmiStartFn fn, int usched, int initret)
void ConverseExit ()
void CmiNotifyIdle (void)
static void ** McQueueAllocBlock (unsigned int len)
static void McQueueSpillBlock (void **srcblk, void **destblk, unsigned int first, unsigned int len)
void CmiTimerInit ()
double CmiWallTimer ()
double CmiCpuTimer ()
double CmiTimer ()
void CmiMemLock ()
void CmiMemUnlock ()


Detailed Description

T3E machine layer.

This is a complete port, but could be made considerably more efficient by handling asynchronous messages correctly, ie. without doing an extra copy and synchronous send

Definition in file machine.c.


Typedef Documentation

typedef struct McDistListS McDistList

typedef struct McMsgHdrS McMsgHdr

typedef struct McQueueS McQueue


Enumeration Type Documentation

enum boolean

Enumerator:
false 
true 
false 
true 

Definition at line 32 of file machine.c.

anonymous enum

Enumerator:
list_empty 

Definition at line 33 of file machine.c.


Function Documentation

CpvDeclare ( void *  ,
CmiLocalQueue   
)

static void McInit (  )  [static]

Definition at line 492 of file machine.c.

References _Cmi_mype, _Cmi_myrank, _Cmi_numpes, CdsFifo_Create(), and McInitList().

static void McInitList (  )  [static]

Definition at line 503 of file machine.c.

References _Cmi_mype, _Cmi_numpes, barrier, bcast_lock, broadcast_queue, broadcast_tmp_queue, CmiPrintf(), head, head_lock, in_transit_queue, in_transit_tmp_queue, list_empty, McQueueCreate(), McDistListS::msg_sz, my_lock, McDistListS::nxt_addr, McDistListS::nxt_node, received_queue, received_token_queue, and tmp_queue.

static void McEnqueueRemote ( void *  msg,
int  msg_sz,
int  dst_pe 
) [static]

Definition at line 535 of file machine.c.

References _Cmi_mype, head, head_lock, in_transit_queue, McCleanUpInTransit(), McQueueAddToBack(), McDistListS::msg_sz, McDistListS::nxt_addr, McDistListS::nxt_node, and printf().

static void McRetrieveRemote ( void   )  [static]

Definition at line 599 of file machine.c.

References McMsgHdrS::bcast, bcast_lock, McMsgHdrS::bcast_msg_size, CmiAlloc(), CmiError(), CmiFree(), McMsgHdrS::count, head, list_empty, McMsgHdrS::list_node, McQueueAddToBack(), McQueueRemoveFromBack(), McDistListS::msg_sz, McMsgHdrS::msg_type, my_lock, McDistListS::nxt_addr, McDistListS::nxt_node, McMsgHdrS::ptr, McMsgHdrS::received_f, received_queue, received_token_queue, and tmp_queue.

static void McCleanUpInTransit ( void   )  [static]

Definition at line 719 of file machine.c.

References _Cmi_mype, McMsgHdrS::bcast, broadcast_queue, broadcast_tmp_queue, CmiFree(), CmiPrintf(), McMsgHdrS::count, in_transit_queue, in_transit_tmp_queue, McQueue::len, McQueueAddToBack(), McQueueRemoveFromFront(), and McMsgHdrS::received_f.

static McQueue * McQueueCreate ( void   )  [static]

Definition at line 804 of file machine.c.

References abort(), McQueue::blk, McQueue::blk_len, CmiError(), McQueue::first, McQueue::len, malloc(), and McQueueAllocBlock().

static void McQueueAddToBack ( McQueue queue,
void *  element 
) [static]

Definition at line 822 of file machine.c.

References _Cmi_mype, McQueue::blk, McQueue::blk_len, CmiPrintf(), McQueue::first, free(), inside_comm, McQueue::len, McQueueAllocBlock(), and McQueueSpillBlock().

static void * McQueueRemoveFromFront ( McQueue queue  )  [static]

Definition at line 853 of file machine.c.

References McQueue::blk, McQueue::blk_len, McQueue::first, and McQueue::len.

static void * McQueueRemoveFromBack ( McQueue queue  )  [static]

Definition at line 842 of file machine.c.

References McQueue::blk, McQueue::blk_len, McQueue::first, and McQueue::len.

int McChecksum ( char *  msg,
int  size 
)

Definition at line 153 of file machine.c.

References size.

void CmiSyncSendFn ( int  dest_pe,
int  size,
char *  msg 
)

Definition at line 174 of file machine.c.

References _Cmi_mype, CdsFifo_Enqueue(), CmiAlloc(), CQdCreate(), McEnqueueRemote(), McRetrieveRemote(), McMsgHdrS::msg_type, and size.

CmiCommHandle CmiAsyncSendFn ( int  dest_pe,
int  size,
char *  msg 
)

Definition at line 193 of file machine.c.

References CmiSyncSendFn(), and size.

void CmiFreeSendFn ( int  dest_pe,
int  size,
char *  msg 
)

Definition at line 199 of file machine.c.

References _Cmi_mype, CdsFifo_Enqueue(), CQdCreate(), McEnqueueRemote(), McRetrieveRemote(), and size.

void CmiSyncBroadcastFn ( int  size,
char *  msg 
)

Definition at line 214 of file machine.c.

References _Cmi_mype, _Cmi_numpes, McMsgHdrS::bcast, McMsgHdrS::bcast_msg_size, broadcast_queue, CmiAlloc(), McMsgHdrS::count, CQdCreate(), McEnqueueRemote(), McQueueAddToBack(), McMsgHdrS::msg_type, McMsgHdrS::ptr, and size.

CmiCommHandle CmiAsyncBroadcastFn ( int  size,
char *  msg 
)

Definition at line 260 of file machine.c.

References CmiSyncBroadcastFn(), and size.

void CmiFreeBroadcastFn ( int  size,
char *  msg 
)

Definition at line 266 of file machine.c.

References CmiFree(), CmiSyncBroadcastFn(), and size.

void CmiSyncBroadcastAllFn ( int  size,
char *  msg 
)

Definition at line 272 of file machine.c.

References _Cmi_mype, CmiSyncBroadcastFn(), CmiSyncSendFn(), and size.

CmiCommHandle CmiAsyncBroadcastAllFn ( int  size,
char *  msg 
)

Definition at line 279 of file machine.c.

References CmiSyncBroadcastAllFn(), and size.

void CmiFreeBroadcastAllFn ( int  size,
char *  msg 
)

Definition at line 285 of file machine.c.

References CmiFree(), CmiSyncBroadcastAllFn(), and size.

CpvDeclare ( int  ,
McMulticastWaitHandler   
)

void McMulticastWaitFn ( McMultiMsg msg  ) 

Definition at line 404 of file machine.c.

References CmiFreeMulticastFn(), McMultiMsg::grp, McMultiMsg::size, and McMultiMsg::user_msg.

void CmiMulticastInit ( void   ) 

Definition at line 409 of file machine.c.

References CmiRegisterHandler(), and McMulticastWaitFn().

void CmiAbort ( const char *  message  ) 

Serial version of common Charm++ routines:.

Currently only used for FEM_ALONE mode.

Orion Sky Lawlor, olawlor@acm.org, 2003/8/15

Definition at line 434 of file machine.c.

References CmiError().

void* CmiGetNonLocal ( void   ) 

Definition at line 449 of file machine.c.

References McQueueRemoveFromFront(), McRetrieveRemote(), and received_queue.

void ConverseInit ( int  argc,
char **  argv,
CmiStartFn  fn,
int  usched,
int  initret 
)

Definition at line 457 of file machine.c.

References ConverseCommonInit(), ConverseExit(), CsdScheduler(), CthInit(), and McInit().

void ConverseExit ( void   ) 

Definition at line 471 of file machine.c.

References CmiMyPe(), CmiPrintf(), and ConverseCommonExit().

static void** McQueueAllocBlock ( unsigned int  len  )  [static]

Definition at line 784 of file machine.c.

References abort(), CmiError(), and malloc().

static void McQueueSpillBlock ( void **  srcblk,
void **  destblk,
unsigned int  first,
unsigned int  len 
) [static]

Definition at line 797 of file machine.c.

void CmiMemLock ( void   ) 

Definition at line 908 of file machine.c.

References memflag.

void CmiMemUnlock ( void   ) 

Definition at line 909 of file machine.c.

References memflag.


Variable Documentation

int _Cmi_mype

Definition at line 40 of file machine.c.

int _Cmi_numpes

Definition at line 41 of file machine.c.

int _Cmi_myrank

Definition at line 42 of file machine.c.

McQueue* in_transit_queue [static]

Definition at line 119 of file machine.c.

McQueue* in_transit_tmp_queue [static]

Definition at line 120 of file machine.c.

McQueue* tmp_queue [static]

Definition at line 123 of file machine.c.

McQueue* received_queue [static]

Definition at line 128 of file machine.c.

McQueue* received_token_queue [static]

Definition at line 133 of file machine.c.

McQueue* broadcast_queue [static]

Definition at line 138 of file machine.c.

McQueue* broadcast_tmp_queue [static]

Definition at line 139 of file machine.c.

McDistList head [static]

Definition at line 144 of file machine.c.

long* my_lock [static]

Definition at line 147 of file machine.c.

long head_lock[MAX_PES] [static]

Definition at line 148 of file machine.c.

long bcast_lock[MAX_PES] [static]

Definition at line 149 of file machine.c.

int inside_comm = 0

Definition at line 820 of file machine.c.

double clocktick [static]

Definition at line 868 of file machine.c.

long inittime_wallclock [static]

Definition at line 869 of file machine.c.

long inittime_virtual [static]

Definition at line 870 of file machine.c.

volatile int memflag [static]

Definition at line 907 of file machine.c.


Generated on Sun Jun 29 13:29:32 2008 for Charm++ by  doxygen 1.5.1