Go to the source code of this file.
Functions | |
void | CpdEndConditionalDeliver_master (void) |
int | CcsReply (CcsImplHeader *rep, int repLen, const void *repData) |
Decide if the reply is ready to be forwarded to the waiting client, or if combination is required (for broadcast/multicast CCS requests. | |
static void | initHandlerRec (CcsHandlerRec *c, const char *name) |
static void | callHandlerRec (CcsHandlerRec *c, int reqLen, const void *reqData) |
CpvDeclare (CcsHandlerTable, ccsTab) | |
CpvStaticDeclare (CcsImplHeader *, ccsReq) | |
void | CcsRegisterHandler (const char *name, CmiHandler fn) |
Backward compatability routine: register a regular converse-style handler to receive CCS requests. | |
void | CcsRegisterHandlerFn (const char *name, CcsHandlerFn fn, void *ptr) |
Register a real Ccs handler function to receive these CCS requests. | |
CcsHandlerRec * | CcsGetHandler (const char *name) |
void | CcsSetMergeFn (const char *name, CmiReduceMergeFn newMerge) |
Set the merging function for this CCS handler to newMerge. | |
void * | CcsMerge_concat (int *size, void *local, void **remote, int n) |
SIMPLE_REDUCTION (logical_and, SIMPLE_REDUCTION(int, ret[i]=(ret[i]&&value[i])?1:0) | |
int | CcsIsRemoteRequest (void) |
void | CcsCallerId (skt_ip_t *pip, unsigned int *pport) |
CcsDelayedReply | CcsDelayReply (void) |
void | CcsSendReply (int replyLen, const void *replyData) |
void | CcsSendReplyNoError (int replyLen, const void *replyData) |
void | CcsSendDelayedReply (CcsDelayedReply d, int replyLen, const void *replyData) |
void | CcsNoReply (void) |
void | CcsNoDelayedReply (CcsDelayedReply d) |
void | CcsHandleRequest (CcsImplHeader *hdr, const char *reqData) |
void | CcsBufferMessage (char *msg) |
CpvDeclare (int, _bgCcsHandlerIdx) | |
CpvDeclare (int, _bgCcsAck) | |
int | BgNodeSize (void) |
void | addBgNodeInbuffer (char *, int) |
static void | bg_req_fw_handler (char *msg) |
void | req_fw_handler (char *msg) |
void | CcsReleaseMessages (void) |
char * | CcsImpl_ccs2converse (const CcsImplHeader *hdr, const void *data, int *ret_len) |
static void | rep_fw_handler (char *msg) |
void | CcsImpl_reply (CcsImplHeader *rep, int repLen, const void *repData) |
Send a Ccs reply back to the requestor, down the given socket. | |
void | CcsImpl_netRequest (CcsImplHeader *hdr, const void *reqData) |
This is the entrance point of a CCS request into the server. | |
void | CcsServerCheck (void) |
int | _isCcsHandlerIdx (int hIdx) |
void | CcsBuiltinsInit (char **argv) |
CpvDeclare (int, cmiArgDebugFlag) | |
CpvDeclare (char *, displayArgument) | |
CpvCExtern (int, cpdSuspendStartup) | |
CpvDeclare (int, cpdSuspendStartup) | |
void | CcsInit (char **argv) |
Variables | |
int | rep_fw_handler_idx |
static char ** | bufferedMessages = NULL |
static int | CcsNumBufferedMsgs = 0 |
int | _ccsHandlerIdx = 0 |
void CpdEndConditionalDeliver_master | ( | void | ) |
Definition at line 668 of file debug-charm.C.
References _conditionalDelivery, CcsSendReply(), Converse::CkMyPe(), Ck::IO::close(), CmiMachineProgressImpl(), conditionalPipe, ConditionalList::count, count, CpdConditional_SetupComm(), CpdDeliverMessageInt(), CpdDeliverSingleMessage(), ConditionalList::deliver, and ConditionalList::msgs.
Referenced by CcsHandleRequest().
int CcsReply | ( | CcsImplHeader * | rep, | |
int | repLen, | |||
const void * | repData | |||
) |
Decide if the reply is ready to be forwarded to the waiting client, or if combination is required (for broadcast/multicast CCS requests.
Definition at line 60 of file middle-ccs.C.
References _conditionalDelivery, CcsGetHandler(), CcsImpl_reply(), ChMessageInt(), ChMessageInt_new(), BGConverse::CkReduce(), CmiAbort(), CmiAlloc(), CmiListReduce(), conditionalPipe, CcsImplHeader::handler, int, CcsImplHeader::len, len, CcsHandlerRec::mergeFn, msg, CcsImplHeader::pe, r, CcsHandlerRec::redID, rep_fw_handler_idx, and Ck::IO::write().
Referenced by CcsNoDelayedReply(), CcsNoReply(), CcsSendDelayedReply(), and CcsSendReply().
static void initHandlerRec | ( | CcsHandlerRec * | c, | |
const char * | name | |||
) | [static] |
Definition at line 29 of file conv-ccs.C.
References CmiAbort(), CcsHandlerRec::fn, CcsHandlerRec::fnOld, CcsHandlerRec::mergeFn, CcsHandlerRec::name, CcsHandlerRec::nCalls, strdup(), and CcsHandlerRec::userPtr.
Referenced by CcsRegisterHandler(), and CcsRegisterHandlerFn().
static void callHandlerRec | ( | CcsHandlerRec * | c, | |
int | reqLen, | |||
const void * | reqData | |||
) | [static] |
Definition at line 40 of file conv-ccs.C.
References CmiAlloc(), CcsHandlerRec::fn, CcsHandlerRec::fnOld, CcsHandlerRec::nCalls, and CcsHandlerRec::userPtr.
Referenced by CcsHandleRequest().
CpvDeclare | ( | CcsHandlerTable | , | |
ccsTab | ||||
) |
CpvStaticDeclare | ( | CcsImplHeader * | , | |
ccsReq | ||||
) |
void CcsRegisterHandler | ( | const char * | ccs_handlername, | |
CmiHandler | fn | |||
) |
Backward compatability routine: register a regular converse-style handler to receive CCS requests.
The requests will arrive as a Converse message, with a (useless) converse header.
Definition at line 61 of file conv-ccs.C.
References CkHashtablePut(), CcsHandlerRec::fnOld, initHandlerRec(), and CcsHandlerRec::name.
void CcsRegisterHandlerFn | ( | const char * | ccs_handlername, | |
CcsHandlerFn | fn, | |||
void * | userPtr | |||
) |
Register a real Ccs handler function to receive these CCS requests.
The requests will arrive as a flat, readonly buffer.
Definition at line 67 of file conv-ccs.C.
References CkHashtablePut(), CcsHandlerRec::fn, initHandlerRec(), CcsHandlerRec::name, and CcsHandlerRec::userPtr.
Referenced by ckcallback_group::registerCcsCallback().
CcsHandlerRec* CcsGetHandler | ( | const char * | name | ) |
Definition at line 74 of file conv-ccs.C.
References CkHashtableGet().
Referenced by CcsReply().
void CcsSetMergeFn | ( | const char * | name, | |
CmiReduceMergeFn | newMerge | |||
) |
Set the merging function for this CCS handler to newMerge.
Definition at line 77 of file conv-ccs.C.
References CkHashtableGet(), CmiAbort(), CmiGetGlobalReduction(), CcsHandlerRec::mergeFn, and CcsHandlerRec::redID.
Referenced by CpdCharmInit(), and ntohl().
Definition at line 86 of file conv-ccs.C.
References ChMessageInt(), ChMessageInt_new(), CmiAlloc(), CmiFree(), len, and CcsImplHeader::len.
Referenced by ntohl().
SIMPLE_REDUCTION | ( | logical_and | , | |
SIMPLE_REDUCTION( | int, | |||
ret | [i] = (ret[i]&&value[i])?1:0 | |||
) |
Definition at line 130 of file conv-ccs.C.
int CcsIsRemoteRequest | ( | void | ) |
Definition at line 154 of file conv-ccs.C.
Referenced by CWebHandler().
Definition at line 159 of file conv-ccs.C.
References attr, and ChMessageInt().
Referenced by ccs_killport().
CcsDelayedReply CcsDelayReply | ( | void | ) |
Definition at line 168 of file conv-ccs.C.
References ChMessageInt(), CcsDelayedReply_struct::hdr, len, and malloc().
Referenced by ccsHandlerToCallback(), CWebHandler(), getImageHandler(), LV3D0_ClientManager_toClient::getViews(), handler(), LV3D0_qd(), LV3D0_stats(), NetFEM_getCurrent(), and ntohl().
void CcsSendReply | ( | int | replyLen, | |
const void * | replyData | |||
) |
Definition at line 180 of file conv-ccs.C.
References CcsReply(), ChMessageInt_new(), and CmiAbort().
Referenced by ccs_getinfo(), CcsHandleRequest(), CcsImpl_netRequest(), CcsSendReplyNoError(), CpdConditional_SetupComm(), CpdEndConditionalDeliver_master(), CpdList_ccs_list_items_fmt(), CpdList_ccs_list_items_txt(), CpdList_ccs_list_len(), CpdMachineArchitecture(), CpdRemoveAllBreakPoints(), CpdRemoveBreakPoint(), CpdSetBreakPoint(), getImageConfigHandler(), LV3D0_quit(), LV3D0_setup(), and ntohl().
void CcsSendReplyNoError | ( | int | replyLen, | |
const void * | replyData | |||
) |
Definition at line 189 of file conv-ccs.C.
References CcsSendReply().
void CcsSendDelayedReply | ( | CcsDelayedReply | d, | |
int | replyLen, | |||
const void * | replyData | |||
) |
Definition at line 194 of file conv-ccs.C.
References CcsReply(), ChMessageInt_new(), free(), h, CcsDelayedReply_struct::hdr, and CcsImplHeader::len.
Referenced by TraceUtilizationBOC::ccsRequestSumDetailCompressed(), TraceSummaryBOC::ccsRequestSummaryDouble(), TraceSummaryBOC::ccsRequestSummaryUnsignedChar(), Ck_printclient(), CWeb_Deliver(), emptyDoneFn(), PythonCCS::forwardInt(), PythonCCS::forwardString(), NetFEM_state::getCurrent(), liveViz0Deposit(), ntohl(), PythonObject::print(), printStats(), PythonObject::replyIntValue(), CkCallback::send(), and LV3D0_ClientManager_toClient::sendReply().
void CcsNoReply | ( | void | ) |
Definition at line 202 of file conv-ccs.C.
References CcsReply(), and ChMessageInt_new().
void CcsNoDelayedReply | ( | CcsDelayedReply | d | ) |
Definition at line 210 of file conv-ccs.C.
References CcsReply(), ChMessageInt_new(), free(), h, CcsDelayedReply_struct::hdr, and CcsImplHeader::len.
Referenced by PythonObject::print().
void CcsHandleRequest | ( | CcsImplHeader * | hdr, | |
const char * | reqData | |||
) |
Definition at line 229 of file conv-ccs.C.
References _conditionalDelivery, buf, callHandlerRec(), CcsSendReply(), ChMessageInt(), CkHashtableGet(), CmiPrintf(), conditionalPipe, CpdEndConditionalDeliver_master(), free(), CcsImplHeader::handler, CcsImplHeader::len, and malloc().
Referenced by req_fw_handler().
void CcsBufferMessage | ( | char * | msg | ) |
Definition at line 287 of file conv-ccs.C.
References CmiAbort(), CmiPrintf(), and malloc().
Referenced by bg_req_fw_handler(), and CcsImpl_ccs2converse().
CpvDeclare | ( | int | , | |
_bgCcsHandlerIdx | ||||
) |
CpvDeclare | ( | int | , | |
_bgCcsAck | ||||
) |
int BgNodeSize | ( | void | ) |
Referenced by bg_req_fw_handler(), and CcsReleaseMessages().
void addBgNodeInbuffer | ( | char * | , | |
int | ||||
) |
static void bg_req_fw_handler | ( | char * | msg | ) | [static] |
Definition at line 309 of file conv-ccs.C.
References addBgNodeInbuffer(), BgNodeSize(), CcsBufferMessage(), ChMessageInt(), int, and offset.
void req_fw_handler | ( | char * | msg | ) |
Definition at line 21 of file middle-ccs.C.
References CcsHandleRequest(), ChMessageInt(), CmiFree(), CmiMyPe(), Converse::CmiSyncBroadcast(), Converse::CmiSyncSend(), index, int, len, and offset.
void CcsReleaseMessages | ( | void | ) |
Definition at line 338 of file conv-ccs.C.
References BgNodeSize(), and free().
Referenced by CcsInit(), and CpdBgInit().
char* CcsImpl_ccs2converse | ( | const CcsImplHeader * | hdr, | |
const void * | data, | |||
int * | ret_len | |||
) |
Definition at line 359 of file conv-ccs.C.
References CcsBufferMessage(), ChMessageInt(), CmiAbort(), CmiAlloc(), int, len, CcsImplHeader::len, msg, and CcsImplHeader::pe.
Referenced by CcsImpl_netRequest().
static void rep_fw_handler | ( | char * | msg | ) | [static] |
Definition at line 386 of file conv-ccs.C.
References CcsImpl_reply(), ChMessageInt(), CmiFree(), CcsImplHeader::len, len, and r.
Referenced by CcsInit().
void CcsImpl_reply | ( | CcsImplHeader * | rep, | |
int | repLen, | |||
const void * | repData | |||
) |
Send a Ccs reply back to the requestor, down the given socket.
Since there is no conv-host, node 0 does all the CCS communication-- this means all requests come to node 0 and are forwarded out; all replies are forwarded back to node 0.
Note: on Net- versions, CcsImpl_reply is implemented in machine.C
Definition at line 437 of file conv-ccs.C.
References CcsServer_sendReply(), ChMessageInt_new(), CmiAlloc(), CmiMyPe(), Converse::CmiSyncSendAndFree(), len, CcsImplHeader::len, msg, and r.
Referenced by CcsReply(), and rep_fw_handler().
void CcsImpl_netRequest | ( | CcsImplHeader * | hdr, | |
const void * | reqData | |||
) |
This is the entrance point of a CCS request into the server.
It is executed only on proc 0, and it forwards the request to the appropriate PE.
Definition at line 470 of file conv-ccs.C.
References CcsImpl_ccs2converse(), CcsSendReply(), ChMessageInt(), CmiPrintf(), Converse::CmiSyncSendAndFree(), len, msg, and CcsImplHeader::pe.
Referenced by CcsServerCheck().
void CcsServerCheck | ( | void | ) |
Definition at line 514 of file conv-ccs.C.
References CcsImpl_netRequest(), CcsServer_fd(), CcsServer_recvRequest(), check_stdio_header(), data, free(), and skt_select1().
Referenced by CcsInit(), and ntohl().
Definition at line 533 of file conv-ccs.C.
Referenced by ntohl().
void CcsBuiltinsInit | ( | char ** | argv | ) |
Definition at line 658 of file ccs-builtins.C.
References ccs_getinfo(), ccs_killpe(), ccs_killport(), CcsRegisterHandler(), and CWebInit().
Referenced by CcsInit().
CpvDeclare | ( | int | , | |
cmiArgDebugFlag | ||||
) |
CpvDeclare | ( | char * | , | |
displayArgument | ||||
) |
CpvCExtern | ( | int | , | |
cpdSuspendStartup | ||||
) |
CpvDeclare | ( | int | , | |
cpdSuspendStartup | ||||
) |
void CcsInit | ( | char ** | argv | ) |
Definition at line 546 of file conv-ccs.C.
References CcdCallOnConditionKeep(), CcsBuiltinsInit(), CcsReleaseMessages(), CcsServer_new(), CcsServerCheck(), CkCreateHashtable_string(), CmiAssignOnce(), CmiGetArgFlagDesc(), CmiGetArgIntDesc(), CmiGetArgStringDesc(), CmiMyPe(), CmiMyRank(), CmiPrintf(), CmiRegisterHandler(), print_fw_handler(), print_fw_handler_idx, rep_fw_handler(), and req_fw_handler().
Referenced by ConverseCommonInit().
char** bufferedMessages = NULL [static] |
Definition at line 283 of file conv-ccs.C.
int CcsNumBufferedMsgs = 0 [static] |
Definition at line 284 of file conv-ccs.C.
int _ccsHandlerIdx = 0 |
Definition at line 298 of file conv-ccs.C.