Go to the source code of this file.
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 struct McDistListS McDistList |
| CpvDeclare | ( | void * | , | |
| CmiLocalQueue | ||||
| ) |
| static void McInit | ( | ) | [static] |
Definition at line 523 of file machine.c.
References _Cmi_mype, _Cmi_myrank, _Cmi_numpes, CdsFifo_Create(), and McInitList().
Referenced by ConverseInit().
| static void McInitList | ( | ) | [static] |
Definition at line 536 of file machine.c.
References _Cmi_mype, _Cmi_numpes, 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.
Referenced by McInit().
Definition at line 570 of file machine.c.
References _Cmi_mype, clear_lock(), head, head_lock, in_transit_queue, McCleanUpInTransit(), McQueueAddToBack(), McDistListS::msg_sz, McDistListS::nxt_addr, McDistListS::nxt_node, printf(), and set_lock().
Referenced by CmiFreeSendFn(), CmiSyncBroadcastFn(), CmiSyncListSendFn(), and CmiSyncSendFn().
| static void McRetrieveRemote | ( | void | ) | [static] |
Definition at line 635 of file machine.c.
References _Cmi_mype, McMsgHdrS::bcast, bcast_lock, clear_lock(), CmiAlloc(), CmiError(), CmiFree(), head, list_empty, McQueueAddToBack(), McQueueRemoveFromBack(), McDistListS::msg_sz, my_lock, McDistListS::nxt_addr, McDistListS::nxt_node, McMsgHdrS::ptr, McMsgHdrS::received_f, received_queue, received_token_queue, set_lock(), and tmp_queue.
Referenced by CmiFreeSendFn(), CmiGetNonLocal(), and CmiSyncSendFn().
| static void McCleanUpInTransit | ( | void | ) | [static] |
Definition at line 757 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.
Referenced by CmiNotifyIdle(), and McEnqueueRemote().
| static McQueue * McQueueCreate | ( | void | ) | [static] |
Definition at line 842 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 860 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 891 of file machine.c.
References McQueue::blk, McQueue::blk_len, McQueue::first, and McQueue::len.
| static void * McQueueRemoveFromBack | ( | McQueue * | queue | ) | [static] |
Definition at line 880 of file machine.c.
References McQueue::blk, McQueue::blk_len, McQueue::first, and McQueue::len.
Referenced by McRetrieveRemote().
Definition at line 178 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 203 of file machine.c.
References _Cmi_mype, CdsFifo_Enqueue(), CQdCreate(), McEnqueueRemote(), McRetrieveRemote(), and size.
| void CmiSyncBroadcastFn | ( | int | size, | |
| char * | msg | |||
| ) |
Definition at line 218 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 | |||
| ) |
| void CmiFreeBroadcastFn | ( | int | size, | |
| char * | msg | |||
| ) |
| void CmiSyncBroadcastAllFn | ( | int | size, | |
| char * | msg | |||
| ) |
Definition at line 276 of file machine.c.
References _Cmi_mype, CmiSyncBroadcastFn(), CmiSyncSendFn(), and size.
| CmiCommHandle CmiAsyncBroadcastAllFn | ( | int | size, | |
| char * | msg | |||
| ) |
| void CmiFreeBroadcastAllFn | ( | int | size, | |
| char * | msg | |||
| ) |
| CpvDeclare | ( | int | , | |
| McMulticastWaitHandler | ||||
| ) |
| void McMulticastWaitFn | ( | McMultiMsg * | msg | ) |
Definition at line 408 of file machine.c.
References CmiFreeMulticastFn(), McMultiMsg::grp, McMultiMsg::size, and McMultiMsg::user_msg.
Referenced by CmiMulticastInit().
| void CmiMulticastInit | ( | void | ) |
| 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 438 of file machine.c.
References CmiError().
| void* CmiGetNonLocal | ( | void | ) |
Definition at line 453 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 461 of file machine.c.
References ConverseCommonInit(), ConverseExit(), CsdScheduler(), CthInit(), and McInit().
| void ConverseExit | ( | void | ) |
Definition at line 475 of file machine.c.
References CmiMyPe(), CmiPrintf(), and ConverseCommonExit().
| void set_lock | ( | long * | lock, | |
| int | pe | |||
| ) |
| void clear_lock | ( | long * | lock, | |
| int | pe | |||
| ) |
| static void** McQueueAllocBlock | ( | unsigned int | len | ) | [static] |
Definition at line 822 of file machine.c.
References abort(), CmiError(), and malloc().
Referenced by McQueueAddToBack(), and McQueueCreate().
| CpvStaticDeclare | ( | double | , | |
| inittime_wallclock | ||||
| ) |
| CpvStaticDeclare | ( | double | , | |
| inittime_virtual | ||||
| ) |
McQueue* in_transit_queue [static] |
Definition at line 123 of file machine.c.
Referenced by McCleanUpInTransit(), McEnqueueRemote(), and McInitList().
McQueue* in_transit_tmp_queue [static] |
McQueue* received_queue [static] |
Definition at line 132 of file machine.c.
Referenced by CmiGetNonLocal(), McInitList(), and McRetrieveRemote().
McQueue* received_token_queue [static] |
McQueue* broadcast_queue [static] |
Definition at line 142 of file machine.c.
Referenced by CmiSyncBroadcastFn(), CmiSyncListSendFn(), McCleanUpInTransit(), and McInitList().
McQueue* broadcast_tmp_queue [static] |
McDistList head [static] |
Definition at line 148 of file machine.c.
Referenced by ImageData::AddImage(), ImageData::ConstructImage(), CqsDeqDequeue(), CqsDeqEnqueueLifo(), CqsEnumerateDeq(), CqsEnumeratePrioq(), splitter::createMesh(), EnqueueOutgoingDgram(), McEnqueueRemote(), McInitList(), McRetrieveRemote(), MMDOrder(), ReceiveDatagram(), TransmitAckDatagram(), TransmitImplicitDgram(), and TransmitImplicitDgram1().
long* my_lock [static] |
long head_lock[MAX_PES] [static] |
long bcast_lock[MAX_PES] [static] |
| int inside_comm = 0 |
long inittime_wallclock [static] |
long inittime_virtual [static] |
Definition at line 990 of file machine.c.
Referenced by CmiMemLock(), CmiMemUnlock(), and KillOnAllSigs().
1.5.1