arch/net/machine-ammasso.c File Reference

Go to the source code of this file.

Functions

static void ammasso_check_err (cc_status_t returnCode, const char *routine, int line)
static int ammasso_check_post_err (cc_status_t returnCode, const char *routine, int line, int *nWR, int nodeTo, int retry)
void CmiMachineInit (char **argv)
void CmiAmmassoNodeAddressesStoreHandler (int pe, struct sockaddr_in *addr, int port)
void AmmassoDoIdle ()
void CmiNotifyIdle (void)
static CmiIdleStateCmiNotifyGetState (void)
static void CmiNotifyBeginIdle (CmiIdleState *s)
static void CmiNotifyStillIdle (CmiIdleState *s)
void sendAck (OtherNode node)
AmmassoTokengetQPSendToken (OtherNode node)
int sendDataOnQP (char *data, int len, OtherNode node, char flags)
void DeliverViaNetwork (OutgoingMsg msg, OtherNode otherNode, int rank, unsigned int broot, int copy)
static void CommunicationServer (int withDelayMs, int where)
void CmiMachineExit ()
void AsynchronousEventHandler (cc_rnic_handle_t rnic, cc_event_record_t *eventRecord, void *cb)
void CheckRecvBufForMessage (OtherNode node)
void CmiAmmassoOpenQueuePairs ()
void processAmmassoControlMessage (char *msg, int len, Tailer *tail, OtherNode from)
int ProcessMessage (char *msg, int len, Tailer *tail, OtherNode from)
OtherNode getNodeFromQPId (cc_qp_id_t qp_id)
OtherNode getNodeFromQPHandle (cc_qp_handle_t qp)
void establishQPConnection (OtherNode node, int reuseQPFlag)
void reestablishQPConnection (OtherNode node)
void closeQPConnection (OtherNode node, int destroyQPFlag)
void BufferAlloc (int n)
void TokenAlloc (int n)
void RequestTokens (OtherNode node, int n)
void GrantTokens (OtherNode node, int n)
void RequestReleaseTokens (OtherNode node, int n)
void ReleaseTokens (OtherNode node, int n)
void AllocatorCheck ()
void CmiCommunicationInit (char **argv)
int CheckSocketsReady (int withDelayMs)
static void ServiceCharmrun_nolock ()
static void CommunicationServer_nolock (int withDelayMs)
char * cc_status_to_string (cc_status_t errorCode)
char * cc_conn_error_to_string (cc_connect_status_t errorCode)
void displayQueueQuery (cc_qp_handle_t qp, cc_qp_query_attrs_t *attrs)
char * cc_qp_state_to_string (cc_qp_state_t qpState)
char * cc_event_id_to_string (cc_event_id_t id)
char * cc_connect_status_to_string (cc_connect_status_t status)


Function Documentation

static void ammasso_check_err ( cc_status_t  returnCode,
const char *  routine,
int  line 
) [static]

Definition at line 47 of file machine-ammasso.c.

References cc_status_to_string(), CmiAbort(), contextBlock, and __context_block::rnic.

static int ammasso_check_post_err ( cc_status_t  returnCode,
const char *  routine,
int  line,
int nWR,
int  nodeTo,
int  retry 
) [static]

Definition at line 66 of file machine-ammasso.c.

References cc_status_to_string(), CmiAbort(), contextBlock, nodes, __context_block::rnic, and OtherNodeStruct::send_cq.

void CmiAmmassoNodeAddressesStoreHandler ( int  pe,
struct sockaddr_in *  addr,
int  port 
)

Definition at line 454 of file machine-ammasso.c.

Referenced by node_addresses_store().

void AmmassoDoIdle (  ) 

Definition at line 469 of file machine-ammasso.c.

References CheckRecvBufForMessage(), contextBlock, __context_block::myNode, nodes, __context_block::numNodes, __context_block::rnic, and OtherNodeStruct::send_cq.

Referenced by CmiMachineExit(), CmiNotifyBeginIdle(), CmiNotifyIdle(), and CmiNotifyStillIdle().

static CmiIdleState * CmiNotifyGetState ( void   )  [static]

Definition at line 499 of file machine-ammasso.c.

static void CmiNotifyBeginIdle ( CmiIdleState s  )  [static]

Definition at line 503 of file machine-ammasso.c.

References AmmassoDoIdle().

Referenced by CommunicationServer(), and KillOnAllSigs().

static void CmiNotifyStillIdle ( CmiIdleState s  )  [static]

Definition at line 507 of file machine-ammasso.c.

References AmmassoDoIdle().

void sendAck ( OtherNode  node  ) 

Definition at line 513 of file machine-ammasso.c.

References __ammasso_tailer::ack, OtherNodeStruct::ack_sq_wr, contextBlock, __ammasso_tailer::flags, getQPSendToken(), __ammasso_tailer::length, __ammasso_token::localBuf, OtherNodeStruct::max_used_tokens, OtherNodeStruct::messagesNotYetAcknowledged, OtherNodeStruct::myNode, OtherNodeStruct::qp, OtherNodeStruct::remoteAck, __ammasso_token::remoteBuf, __context_block::rnic, sleep(), __ammasso_buffer::tail, and __ammasso_token::wr.

Referenced by CheckRecvBufForMessage(), CmiMachineExit(), and sendDataOnQP().

AmmassoToken * getQPSendToken ( OtherNode  node  ) 

Definition at line 561 of file machine-ammasso.c.

References CheckRecvBufForMessage(), OtherNodeStruct::connectionState, contextBlock, OtherNodeStruct::directAck, OtherNodeStruct::localAck, OtherNodeStruct::myNode, QP_CONN_STATE_CONNECTED, __context_block::rnic, and OtherNodeStruct::send_cq.

Referenced by processAmmassoControlMessage(), sendAck(), and sendDataOnQP().

int sendDataOnQP ( char *  data,
int  len,
OtherNode  node,
char  flags 
)

Definition at line 682 of file machine-ammasso.c.

References __ammasso_tailer::ack, __ammasso_buffer::buf, contextBlock, __ammasso_tailer::flags, getQPSendToken(), __ammasso_tailer::length, __ammasso_token::localBuf, OtherNodeStruct::max_used_tokens, OtherNodeStruct::messagesNotYetAcknowledged, OtherNodeStruct::myNode, OtherNodeStruct::qp, OtherNodeStruct::remoteAck, __ammasso_token::remoteBuf, __context_block::rnic, OtherNodeStruct::send_cq, OtherNodeStruct::send_next, sendAck(), __ammasso_buffer::tail, and __ammasso_token::wr.

Referenced by CmiAmmassoOpenQueuePairs(), CmiMachineExit(), DeliverViaNetwork(), GrantTokens(), RequestReleaseTokens(), and RequestTokens().

void DeliverViaNetwork ( OutgoingMsg  msg,
OtherNode  otherNode,
int  rank,
unsigned int  broot,
int  copy 
)

Definition at line 851 of file machine-ammasso.c.

References OutgoingMsgStruct::data, OtherNodeStruct::myNode, OtherNodeStruct::send_next, sendDataOnQP(), OutgoingMsgStruct::size, and OutgoingMsgStruct::src.

Referenced by CmiMachineExit(), and KillOnAllSigs().

static void CommunicationServer ( int  withDelayMs,
int  where 
) [static]

Definition at line 1500 of file machine-ammasso.c.

References CmiCommLock(), CmiCommUnlock(), CmiHandleImmediate(), CommunicationServer(), CommunicationServer_nolock(), machine_initiated_shutdown, and ServiceCharmrun_nolock().

void AsynchronousEventHandler ( cc_rnic_handle_t  rnic,
cc_event_record_t *  eventRecord,
void *  cb 
)

Definition at line 1648 of file machine-ammasso.c.

References OtherNodeStruct::ack_sq_wr, __ammasso_private_data::ack_to, cc_connect_status_to_string(), cc_event_id_to_string(), CmiLock(), CmiPrintf(), CmiUnlock(), OtherNodeStruct::connectionState, contextBlock, OtherNodeStruct::cr, displayQueueQuery(), getNodeFromQPId(), OtherNodeStruct::myNode, __context_block::myNode, __ammasso_private_data::node, nodes, __context_block::numNodes, __context_block::outstandingConnectionCount, OtherNodeStruct::qp, OtherNodeStruct::qp_attrs, QP_CONN_STATE_CONNECTED, QP_CONN_STATE_CONNECTION_CLOSED, QP_CONN_STATE_CONNECTION_LOST, QP_CONN_STATE_PRE_CONNECT, reestablishQPConnection(), __ammasso_token::remoteBuf, __context_block::rnic, OtherNodeStruct::sendBufLock, __ammasso_private_data::stag, __ammasso_private_data::to, and __ammasso_token::wr.

Referenced by CmiMachineExit(), and CmiMachineInit().

void CheckRecvBufForMessage ( OtherNode  node  ) 

Definition at line 1963 of file machine-ammasso.c.

References __ammasso_buffer::buf, OtherNodeStruct::messagesNotYetAcknowledged, ProcessMessage(), OtherNodeStruct::remoteAck, sendAck(), and __ammasso_buffer::tail.

Referenced by AmmassoDoIdle(), CmiAmmassoOpenQueuePairs(), CommunicationServer_nolock(), and getQPSendToken().

void CmiAmmassoOpenQueuePairs (  ) 

Definition at line 2149 of file machine-ammasso.c.

References _Cmi_mynode, _Cmi_numnodes, OtherNodeStruct::ack_sq_wr, CheckRecvBufForMessage(), CmiAbort(), CmiAlloc(), CmiCreateLock(), __context_block::conditionRegistered, OtherNodeStruct::connectionState, contextBlock, OtherNodeStruct::directAck, establishQPConnection(), OtherNodeStruct::localAck, __ammasso_token::localBuf, OtherNodeStruct::max_used_tokens, OtherNodeStruct::messagesNotYetAcknowledged, __context_block::myNode, __ammasso_buffer::next, __context_block::nodeReadyCount, nodes, __context_block::numNodes, __context_block::outstandingConnectionCount, __context_block::pd_id, __context_block::pinnedMemory, QP_CONN_STATE_PRE_CONNECT, OtherNodeStruct::recv_expect_lock, OtherNodeStruct::remoteAck, __context_block::rnic, OtherNodeStruct::send_next_lock, OtherNodeStruct::sendBufLock, sendDataOnQP(), sleep(), and __ammasso_token::wr.

Referenced by KillOnAllSigs().

void processAmmassoControlMessage ( char *  msg,
int  len,
Tailer tail,
OtherNode  from 
)

Definition at line 1012 of file machine-ammasso.c.

References __ammasso_tailer::ack, BufferAlloc(), CmiAbort(), contextBlock, __ammasso_tailer::flags, getQPSendToken(), GrantTokens(), __ammasso_tailer::length, OtherNodeStruct::localAck, __ammasso_token::localBuf, OtherNodeStruct::max_used_tokens, OtherNodeStruct::myNode, n, __ammasso_buffer::next, __ammasso_token::next, __context_block::nodeReadyCount, OtherNodeStruct::qp, OtherNodeStruct::remoteAck, __ammasso_token::remoteBuf, __context_block::rnic, OtherNodeStruct::secondLastRecvBuf, __ammasso_token_description::stag, __ammasso_buffer::tail, __ammasso_token_description::to, and __ammasso_token::wr.

Referenced by CmiMachineExit(), and ProcessMessage().

int ProcessMessage ( char *  msg,
int  len,
Tailer tail,
OtherNode  from 
)

Definition at line 1139 of file machine-ammasso.c.

References __ammasso_tailer::ack, __ammasso_tailer::flags, OtherNodeStruct::localAck, OtherNodeStruct::messagesNotYetAcknowledged, processAmmassoControlMessage(), and size.

Referenced by CheckRecvBufForMessage(), and CmiMachineExit().

OtherNode getNodeFromQPId ( cc_qp_id_t  qp_id  ) 

Definition at line 1621 of file machine-ammasso.c.

References contextBlock, nodes, and __context_block::numNodes.

Referenced by AsynchronousEventHandler().

OtherNode getNodeFromQPHandle ( cc_qp_handle_t  qp  ) 

Definition at line 1634 of file machine-ammasso.c.

References contextBlock, nodes, and __context_block::numNodes.

Referenced by displayQueueQuery().

void establishQPConnection ( OtherNode  node,
int  reuseQPFlag 
)

Definition at line 2479 of file machine-ammasso.c.

References __ammasso_private_data::ack_to, OtherNodeStruct::addr, OtherNodeStruct::address, CmiCreateLock(), contextBlock, OtherNodeStruct::directAck, __context_block::eh_id, OtherNodeStruct::ep, __context_block::myNode, OtherNodeStruct::myNode, __ammasso_private_data::node, __context_block::pd_id, __context_block::pinnedMemory, OtherNodeStruct::port, OtherNodeStruct::qp, OtherNodeStruct::qp_attrs, OtherNodeStruct::qp_attrs_stag_index, OtherNodeStruct::qp_id, OtherNodeStruct::recv_cq, OtherNodeStruct::recv_cq_depth, OtherNodeStruct::recv_expect, OtherNodeStruct::recv_expect_lock, OtherNodeStruct::recv_UseIndex, __context_block::rnic, OtherNodeStruct::send_cq, OtherNodeStruct::send_cq_depth, OtherNodeStruct::send_next, OtherNodeStruct::send_next_lock, OtherNodeStruct::sendBufLock, __ammasso_private_data::stag, __ammasso_private_data::to, and value.

Referenced by CmiAmmassoOpenQueuePairs(), and reestablishQPConnection().

void reestablishQPConnection ( OtherNode  node  ) 

Definition at line 2636 of file machine-ammasso.c.

References cc_qp_state_to_string(), cc_status_to_string(), closeQPConnection(), contextBlock, OtherNodeStruct::ep, establishQPConnection(), OtherNodeStruct::myNode, OtherNodeStruct::qp, OtherNodeStruct::qp_attrs, OtherNodeStruct::recv_cq, __context_block::rnic, and OtherNodeStruct::send_cq.

Referenced by AsynchronousEventHandler().

void closeQPConnection ( OtherNode  node,
int  destroyQPFlag 
)

Definition at line 2715 of file machine-ammasso.c.

Referenced by CmiMachineExit(), and reestablishQPConnection().

void BufferAlloc ( int  n  ) 

Definition at line 159 of file machine-ammasso.c.

References CmiAbort(), CmiAlloc(), contextBlock, n, __context_block::pd_id, __context_block::pinnedMemory, and __context_block::rnic.

Referenced by GrantTokens(), and processAmmassoControlMessage().

void TokenAlloc ( int  n  ) 

Definition at line 207 of file machine-ammasso.c.

References CmiAbort(), CmiAlloc(), contextBlock, __ammasso_token::localBuf, n, __context_block::pd_id, __context_block::pinnedMemory, __context_block::rnic, and __ammasso_token::wr.

void RequestTokens ( OtherNode  node,
int  n 
)

Definition at line 286 of file machine-ammasso.c.

References n, and sendDataOnQP().

void GrantTokens ( OtherNode  node,
int  n 
)

Definition at line 292 of file machine-ammasso.c.

References BufferAlloc(), CmiAlloc(), CmiFree(), contextBlock, n, __ammasso_buffer::next, sendDataOnQP(), and __ammasso_token_description::to.

Referenced by processAmmassoControlMessage().

void RequestReleaseTokens ( OtherNode  node,
int  n 
)

Definition at line 326 of file machine-ammasso.c.

References n, and sendDataOnQP().

void ReleaseTokens ( OtherNode  node,
int  n 
)

Definition at line 332 of file machine-ammasso.c.

References __ammasso_tailer::ack, contextBlock, __ammasso_tailer::flags, __ammasso_tailer::length, __ammasso_token::localBuf, OtherNodeStruct::myNode, n, __ammasso_token::next, OtherNodeStruct::qp, __ammasso_token::remoteBuf, __context_block::rnic, __ammasso_buffer::tail, and __ammasso_token::wr.

Referenced by AllocatorCheck().

void AllocatorCheck (  ) 

Definition at line 143 of file machine-ammasso.c.

References CmiMyPe(), CmiPrintf(), contextBlock, OtherNodeStruct::max_used_tokens, __context_block::myNode, nodes, __context_block::numNodes, and ReleaseTokens().

void CmiCommunicationInit ( char **  argv  ) 

Definition at line 450 of file machine-ammasso.c.

Referenced by KillOnAllSigs().

int CheckSocketsReady ( int  withDelayMs  ) 

Definition at line 955 of file machine-ammasso.c.

References Cmi_charmrun_fd, ctrlskt_ready_read, dataskt_ready_read, and dataskt_ready_write.

Referenced by CheckSocketsReady(), CommunicationServer(), and ServiceCharmrun_nolock().

static void ServiceCharmrun_nolock (  )  [static]

Definition at line 995 of file machine-ammasso.c.

References CheckSocketsReady(), and ctrlskt_ready_read.

Referenced by CommunicationServer().

static void CommunicationServer_nolock ( int  withDelayMs  )  [static]

Definition at line 1473 of file machine-ammasso.c.

References CheckRecvBufForMessage(), contextBlock, __context_block::myNode, nodes, and __context_block::numNodes.

Referenced by CommunicationServer(), and getFreeTokens().

char* cc_status_to_string ( cc_status_t  errorCode  ) 

Definition at line 2745 of file machine-ammasso.c.

Referenced by ammasso_check_err(), ammasso_check_post_err(), cc_conn_error_to_string(), CmiMachineExit(), CmiMachineInit(), displayQueueQuery(), and reestablishQPConnection().

char* cc_conn_error_to_string ( cc_connect_status_t  errorCode  ) 

Definition at line 2841 of file machine-ammasso.c.

References cc_status_to_string().

void displayQueueQuery ( cc_qp_handle_t  qp,
cc_qp_query_attrs_t *  attrs 
)

Definition at line 2858 of file machine-ammasso.c.

References cc_qp_state_to_string(), cc_status_to_string(), contextBlock, getNodeFromQPHandle(), OtherNodeStruct::myNode, and __context_block::rnic.

Referenced by AsynchronousEventHandler().

char* cc_qp_state_to_string ( cc_qp_state_t  qpState  ) 

Definition at line 2891 of file machine-ammasso.c.

Referenced by displayQueueQuery(), and reestablishQPConnection().

char* cc_event_id_to_string ( cc_event_id_t  id  ) 

Definition at line 2904 of file machine-ammasso.c.

Referenced by AsynchronousEventHandler().

char* cc_connect_status_to_string ( cc_connect_status_t  status  ) 

Definition at line 2956 of file machine-ammasso.c.

Referenced by AsynchronousEventHandler().


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