PPL Logo

conv-ccs/conv-ccs.C File Reference

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.
CcsHandlerRecCcsGetHandler (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


Function Documentation

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.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

CcsHandlerRec* CcsGetHandler ( const char *  name  ) 

Definition at line 74 of file conv-ccs.C.

References CkHashtableGet().

Referenced by CcsReply().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void* CcsMerge_concat ( int size,
void *  local,
void **  remote,
int  n 
)

Definition at line 86 of file conv-ccs.C.

References ChMessageInt(), ChMessageInt_new(), CmiAlloc(), CmiFree(), len, and CcsImplHeader::len.

Referenced by ntohl().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

void CcsCallerId ( skt_ip_t pip,
unsigned int pport 
)

Definition at line 159 of file conv-ccs.C.

References attr, and ChMessageInt().

Referenced by ccs_killport().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CcsSendReply ( int  replyLen,
const void *  replyData 
)

void CcsSendReplyNoError ( int  replyLen,
const void *  replyData 
)

Definition at line 189 of file conv-ccs.C.

References CcsSendReply().

Here is the call graph for this function:

void CcsSendDelayedReply ( CcsDelayedReply  d,
int  replyLen,
const void *  replyData 
)

void CcsNoReply ( void   ) 

Definition at line 202 of file conv-ccs.C.

References CcsReply(), and ChMessageInt_new().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

CpvDeclare ( int  ,
_bgCcsHandlerIdx   
)

CpvDeclare ( int  ,
_bgCcsAck   
)

int BgNodeSize ( void   ) 

Referenced by bg_req_fw_handler(), and CcsReleaseMessages().

Here is the caller graph for this function:

void addBgNodeInbuffer ( char *  ,
int   
)

Referenced by bg_req_fw_handler().

Here is the caller graph for this function:

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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

void CcsReleaseMessages ( void   ) 

Definition at line 338 of file conv-ccs.C.

References BgNodeSize(), and free().

Referenced by CcsInit(), and CpdBgInit().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int _isCcsHandlerIdx ( int  hIdx  ) 

Definition at line 533 of file conv-ccs.C.

Referenced by ntohl().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

CpvDeclare ( int  ,
cmiArgDebugFlag   
)

CpvDeclare ( char *  ,
displayArgument   
)

CpvCExtern ( int  ,
cpdSuspendStartup   
)

CpvDeclare ( int  ,
cpdSuspendStartup   
)

void CcsInit ( char **  argv  ) 


Variable Documentation

Definition at line 166 of file conv-ccs.C.

Referenced by CcsReply().

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.

Definition at line 298 of file conv-ccs.C.


Generated on Mon Sep 21 08:00:07 2020 for Charm++ by  doxygen 1.5.5