本文整理汇总了C++中MPIR_FUNC_VERBOSE_ENTER函数的典型用法代码示例。如果您正苦于以下问题:C++ MPIR_FUNC_VERBOSE_ENTER函数的具体用法?C++ MPIR_FUNC_VERBOSE_ENTER怎么用?C++ MPIR_FUNC_VERBOSE_ENTER使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MPIR_FUNC_VERBOSE_ENTER函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MPIDI_CH3_Req_handler_rma_op_complete
int MPIDI_CH3_Req_handler_rma_op_complete(MPIR_Request * sreq)
{
int mpi_errno = MPI_SUCCESS;
MPIR_Request *ureq = NULL;
MPIR_Win *win_ptr = NULL;
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_REQ_HANDLER_RMA_OP_COMPLETE);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_REQ_HANDLER_RMA_OP_COMPLETE);
if (sreq->dev.rma_target_ptr != NULL) {
(sreq->dev.rma_target_ptr)->num_pkts_wait_for_local_completion--;
}
/* get window, decrement active request cnt on window */
MPIR_Win_get_ptr(sreq->dev.source_win_handle, win_ptr);
MPIR_Assert(win_ptr != NULL);
MPIDI_CH3I_RMA_Active_req_cnt--;
MPIR_Assert(MPIDI_CH3I_RMA_Active_req_cnt >= 0);
if (sreq->dev.request_handle != MPI_REQUEST_NULL) {
/* get user request */
MPIR_Request_get_ptr(sreq->dev.request_handle, ureq);
mpi_errno = MPID_Request_complete(ureq);
if (mpi_errno != MPI_SUCCESS) {
MPIR_ERR_POP(mpi_errno);
}
}
fn_exit:
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3_REQ_HANDLER_RMA_OP_COMPLETE);
return mpi_errno;
fn_fail:
goto fn_exit;
}
示例2: MPIDU_shm_barrier
/* FIXME: this is not a scalable algorithm because everyone is polling on the same cacheline */
int MPIDU_shm_barrier(MPIDU_shm_barrier_t * barrier, int num_local)
{
int mpi_errno = MPI_SUCCESS;
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDU_SHM_BARRIER);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDU_SHM_BARRIER);
if (num_local == 1)
goto fn_exit;
MPIR_ERR_CHKINTERNAL(!barrier_init, mpi_errno, "barrier not initialized");
if (OPA_fetch_and_incr_int(&barrier->val) == num_local - 1) {
OPA_store_int(&barrier->val, 0);
OPA_store_int(&barrier->wait, 1 - sense);
OPA_write_barrier();
} else {
/* wait */
while (OPA_load_int(&barrier->wait) == sense)
MPL_sched_yield(); /* skip */
}
sense = 1 - sense;
fn_fail:
fn_exit:
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDU_SHM_BARRIER);
return mpi_errno;
}
示例3: MPIR_FUNC_VERBOSE_STATE_DECL
static MPIR_Request *create_request(MPL_IOV * iov, int iov_count, int iov_offset, size_t nb)
{
MPIR_Request *sreq;
int i;
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CREATE_REQUEST);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CREATE_REQUEST);
sreq = MPIR_Request_create(MPIR_REQUEST_KIND__SEND);
/* --BEGIN ERROR HANDLING-- */
if (sreq == NULL)
return NULL;
/* --END ERROR HANDLING-- */
MPIR_Object_set_ref(sreq, 2);
for (i = 0; i < iov_count; i++) {
sreq->dev.iov[i] = iov[i];
}
if (iov_offset == 0) {
MPIR_Assert(iov[0].MPL_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t));
sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF;
sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) & sreq->dev.pending_pkt;
}
sreq->dev.iov[iov_offset].MPL_IOV_BUF =
(MPL_IOV_BUF_CAST) ((char *) sreq->dev.iov[iov_offset].MPL_IOV_BUF + nb);
sreq->dev.iov[iov_offset].MPL_IOV_LEN -= nb;
sreq->dev.iov_count = iov_count;
sreq->dev.OnDataAvail = 0;
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CREATE_REQUEST);
return sreq;
}
示例4: create_request
static MPIR_Request * create_request(void * hdr, intptr_t hdr_sz,
size_t nb)
{
MPIR_Request * sreq;
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CREATE_REQUEST);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CREATE_REQUEST);
sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
/* --BEGIN ERROR HANDLING-- */
if (sreq == NULL)
return NULL;
/* --END ERROR HANDLING-- */
MPIR_Object_set_ref(sreq, 2);
sreq->kind = MPIR_REQUEST_KIND__SEND;
MPIR_Assert(hdr_sz == sizeof(MPIDI_CH3_Pkt_t));
sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr;
sreq->dev.iov[0].MPL_IOV_BUF =
(MPL_IOV_BUF_CAST)((char *) &sreq->dev.pending_pkt + nb);
sreq->dev.iov[0].MPL_IOV_LEN = hdr_sz - nb;
sreq->dev.iov_count = 1;
sreq->dev.OnDataAvail = 0;
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CREATE_REQUEST);
return sreq;
}
示例5: handle_probe
static int handle_probe(const ptl_event_t *e)
{
int mpi_errno = MPI_SUCCESS;
MPIR_Request *const req = e->user_ptr;
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_HANDLE_PROBE);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_HANDLE_PROBE);
if (e->ni_fail_type == PTL_NI_NO_MATCH) {
REQ_PTL(req)->found = FALSE;
goto finish_probe;
}
REQ_PTL(req)->found = TRUE;
req->status.MPI_SOURCE = NPTL_MATCH_GET_RANK(e->match_bits);
req->status.MPI_TAG = NPTL_MATCH_GET_TAG(e->match_bits);
MPIR_STATUS_SET_COUNT(req->status, NPTL_HEADER_GET_LENGTH(e->hdr_data));
finish_probe:
mpi_errno = MPID_Request_complete(req);
if (mpi_errno != MPI_SUCCESS) {
MPIR_ERR_POP(mpi_errno);
}
fn_exit:
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_HANDLE_PROBE);
return mpi_errno;
fn_fail:
goto fn_exit;
}
示例6: handler_recv_complete
static int handler_recv_complete(const ptl_event_t *e)
{
int mpi_errno = MPI_SUCCESS;
MPIR_Request *const rreq = e->user_ptr;
int ret;
int i;
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_HANDLER_RECV_COMPLETE);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_HANDLER_RECV_COMPLETE);
MPIR_Assert(e->type == PTL_EVENT_REPLY || e->type == PTL_EVENT_PUT || e->type == PTL_EVENT_PUT_OVERFLOW);
if (REQ_PTL(rreq)->md != PTL_INVALID_HANDLE) {
ret = PtlMDRelease(REQ_PTL(rreq)->md);
MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmdrelease", "**ptlmdrelease %s", MPID_nem_ptl_strerror(ret));
}
for (i = 0; i < MPID_NEM_PTL_NUM_CHUNK_BUFFERS; ++i)
if (REQ_PTL(rreq)->chunk_buffer[i])
MPL_free(REQ_PTL(rreq)->chunk_buffer[i]);
mpi_errno = MPID_Request_complete(rreq);
if (mpi_errno) {
MPIR_ERR_POP(mpi_errno);
}
fn_exit:
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_HANDLER_RECV_COMPLETE);
return mpi_errno;
fn_fail:
goto fn_exit;
}
示例7: MPID_Rget_accumulate
int MPID_Rget_accumulate(const void *origin_addr, int origin_count,
MPI_Datatype origin_datatype, void *result_addr, int result_count,
MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
int target_count, MPI_Datatype target_datatype, MPI_Op op,
MPIR_Win * win_ptr, MPIR_Request ** request)
{
int mpi_errno = MPI_SUCCESS;
int dt_contig ATTRIBUTE((unused));
MPIR_Datatype*dtp;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
intptr_t data_sz, trg_data_sz;
MPIR_Request *ureq;
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_RGET_ACCUMULATE);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_RGET_ACCUMULATE);
/* request-based RMA operations are only valid within a passive epoch */
MPIR_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_PER_TARGET &&
win_ptr->states.access_state != MPIDI_RMA_LOCK_ALL_CALLED &&
win_ptr->states.access_state != MPIDI_RMA_LOCK_ALL_ISSUED &&
win_ptr->states.access_state != MPIDI_RMA_LOCK_ALL_GRANTED,
mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
/* Create user request, initially cc=1, ref=1 */
ureq = MPIR_Request_create(MPIR_REQUEST_KIND__RMA);
MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
/* This request is referenced by user and ch3 by default. */
MPIR_Object_set_ref(ureq, 2);
/* Note that GACC is only a no-op if no data goes in both directions */
MPIDI_Datatype_get_info(origin_count, origin_datatype, dt_contig, data_sz, dtp, dt_true_lb);
MPIDI_Datatype_get_info(origin_count, origin_datatype, dt_contig, trg_data_sz, dtp, dt_true_lb);
/* Enqueue or perform the RMA operation */
if (target_rank != MPI_PROC_NULL && (data_sz != 0 || trg_data_sz != 0)) {
mpi_errno = MPIDI_CH3I_Get_accumulate(origin_addr, origin_count,
origin_datatype, result_addr,
result_count, result_datatype,
target_rank, target_disp,
target_count, target_datatype, op, win_ptr, ureq);
if (mpi_errno != MPI_SUCCESS) {
MPIR_ERR_POP(mpi_errno);
}
}
else {
mpi_errno = MPID_Request_complete(ureq);
if (mpi_errno != MPI_SUCCESS) {
MPIR_ERR_POP(mpi_errno);
}
}
*request = ureq;
fn_exit:
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_RGET_ACCUMULATE);
return mpi_errno;
fn_fail:
goto fn_exit;
}
示例8: MPID_nem_mxm_vc_terminate
int MPID_nem_mxm_vc_terminate(MPIDI_VC_t * vc)
{
int mpi_errno = MPI_SUCCESS;
MPID_nem_mxm_vc_area *vc_area = VC_BASE(vc);
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MXM_VC_TERMINATE);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MXM_VC_TERMINATE);
if (vc->state != MPIDI_VC_STATE_CLOSED) {
/* VC is terminated as a result of a fault. Complete
* outstanding sends with an error and terminate connection
* immediately. */
MPIR_ERR_SET1(mpi_errno, MPI_ERR_OTHER, "**comm_fail", "**comm_fail %d", vc->pg_rank);
}
else {
while (vc_area->pending_sends > 0)
MPID_nem_mxm_poll(FALSE);
}
mpi_errno = MPIDI_CH3U_Handle_connection(vc, MPIDI_VC_EVENT_TERMINATED);
if (mpi_errno)
MPIR_ERR_POP(mpi_errno);
fn_exit:
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MXM_VC_TERMINATE);
return mpi_errno;
fn_fail:
goto fn_exit;
}
示例9: MPID_Close_port
/*@
MPID_Close_port - Close port
Input Parameters:
. port_name - Name of MPI port to close
Notes:
.N Errors
.N MPI_SUCCESS
.N MPI_ERR_OTHER
@*/
int MPID_Close_port(const char *port_name)
{
int mpi_errno=MPI_SUCCESS;
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_CLOSE_PORT);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_CLOSE_PORT);
/* Check to see if we need to setup channel-specific functions
for handling the port operations */
if (setupPortFunctions) {
MPIDI_CH3_PortFnsInit( &portFns );
setupPortFunctions = 0;
}
/* The default for this function is 0 (no function).
A channel may define its own function and set it in the
init check above; such a function may be named MPIDI_CH3_Close_port */
if (portFns.ClosePort) {
mpi_errno = portFns.ClosePort( port_name );
if (mpi_errno != MPI_SUCCESS) {
MPIR_ERR_POP(mpi_errno);
}
}
else {
MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**notimpl" );
}
fn_fail:
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_CLOSE_PORT);
return mpi_errno;
}
示例10: vc_terminate
int vc_terminate(MPIDI_VC_t *vc)
{
int mpi_errno = MPI_SUCCESS;
int req_errno = MPI_SUCCESS;
MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_VC_TERMINATE);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_VC_TERMINATE);
if (vc->state != MPIDI_VC_STATE_CLOSED) {
/* VC is terminated as a result of a fault. Complete
outstanding sends with an error and terminate
connection immediately. */
MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank);
mpi_errno = MPID_nem_ptl_vc_terminated(vc);
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
} else if (vc_ptl->num_queued_sends == 0) {
mpi_errno = MPID_nem_ptl_vc_terminated(vc);
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
} else {
/* the send_queued function will call vc_terminated if vc->state is
CLOSED and the last queued send has been sent*/
}
fn_exit:
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_VC_TERMINATE);
return mpi_errno;
fn_fail:
goto fn_exit;
}
示例11: MPID_Open_port
/*@
MPID_Open_port - Open an MPI Port
Input Arguments:
. MPI_Info info - info
Output Arguments:
. char *port_name - port name
Notes:
.N Errors
.N MPI_SUCCESS
.N MPI_ERR_OTHER
@*/
int MPID_Open_port(MPIR_Info *info_ptr, char *port_name)
{
int mpi_errno=MPI_SUCCESS;
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_OPEN_PORT);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_OPEN_PORT);
/* Check to see if we need to setup channel-specific functions
for handling the port operations */
if (setupPortFunctions) {
MPIDI_CH3_PortFnsInit( &portFns );
setupPortFunctions = 0;
}
/* The default for this function is MPIDI_Open_port.
A channel may define its own function and set it in the
init check above; such a function may be named MPIDI_CH3_Open_port.
In addition, not all channels can implement this operation, so
those channels will set the function pointer to NULL */
if (portFns.OpenPort) {
mpi_errno = portFns.OpenPort( info_ptr, port_name );
if (mpi_errno != MPI_SUCCESS) {
MPIR_ERR_POP(mpi_errno);
}
}
else {
MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**notimpl" );
}
fn_fail:
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_OPEN_PORT);
return mpi_errno;
}
示例12: MPIDI_CH3U_Handle_send_req
int MPIDI_CH3U_Handle_send_req(MPIDI_VC_t * vc, MPIR_Request * sreq, int *complete)
{
int mpi_errno = MPI_SUCCESS;
int (*reqFn) (MPIDI_VC_t *, MPIR_Request *, int *);
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3U_HANDLE_SEND_REQ);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3U_HANDLE_SEND_REQ);
/* Use the associated function rather than switching on the old ca field */
/* Routines can call the attached function directly */
reqFn = sreq->dev.OnDataAvail;
if (!reqFn) {
MPIR_Assert(MPIDI_Request_get_type(sreq) != MPIDI_REQUEST_TYPE_GET_RESP);
mpi_errno = MPID_Request_complete(sreq);
*complete = 1;
}
else {
mpi_errno = reqFn(vc, sreq, complete);
}
if (mpi_errno != MPI_SUCCESS) {
MPIR_ERR_POP(mpi_errno);
}
fn_exit:
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3U_HANDLE_SEND_REQ);
return mpi_errno;
fn_fail:
goto fn_exit;
}
示例13: MPID_Comm_connect
int MPID_Comm_connect(const char *port_name, MPIR_Info * info, int root, MPIR_Comm * comm,
MPIR_Comm ** newcomm_ptr)
{
int mpi_errno = MPI_SUCCESS;
int timeout = MPIR_CVAR_CH4_COMM_CONNECT_TIMEOUT;
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_CONNECT);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_CONNECT);
if (info != NULL) {
int info_flag = 0;
char info_value[MPI_MAX_INFO_VAL + 1];
MPIR_Info_get_impl(info, "timeout", MPI_MAX_INFO_VAL, info_value, &info_flag);
if (info_flag) {
timeout = atoi(info_value);
}
}
mpi_errno = MPIDI_NM_mpi_comm_connect(port_name, info, root, timeout, comm, newcomm_ptr);
if (mpi_errno != MPI_SUCCESS) {
MPIR_ERR_POP(mpi_errno);
}
fn_exit:
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_CONNECT);
return mpi_errno;
fn_fail:
goto fn_exit;
}
示例14: MPIDI_CH3U_Post_data_receive_unexpected
int MPIDI_CH3U_Post_data_receive_unexpected(MPIR_Request * rreq)
{
int mpi_errno = MPI_SUCCESS;
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3U_POST_DATA_RECEIVE_UNEXPECTED);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3U_POST_DATA_RECEIVE_UNEXPECTED);
/* FIXME: to improve performance, allocate temporary buffer from a
specialized buffer pool. */
/* FIXME: to avoid memory exhaustion, integrate buffer pool management
with flow control */
MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"unexpected request allocated");
rreq->dev.tmpbuf = MPL_malloc(rreq->dev.recv_data_sz, MPL_MEM_BUFFER);
if (!rreq->dev.tmpbuf) {
MPIR_ERR_SETANDJUMP1(mpi_errno,MPI_ERR_OTHER,"**nomem","**nomem %d",
rreq->dev.recv_data_sz);
}
rreq->dev.tmpbuf_sz = rreq->dev.recv_data_sz;
rreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)rreq->dev.tmpbuf;
rreq->dev.iov[0].MPL_IOV_LEN = rreq->dev.recv_data_sz;
rreq->dev.iov_count = 1;
rreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_UnpackUEBufComplete;
rreq->dev.recv_pending_count = 2;
fn_fail:
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3U_POST_DATA_RECEIVE_UNEXPECTED);
return mpi_errno;
}
示例15: MPIDI_CH3U_Handle_ordered_recv_pkt
int MPIDI_CH3U_Handle_ordered_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data,
intptr_t *buflen, MPIR_Request ** rreqp)
{
int mpi_errno = MPI_SUCCESS;
static MPIDI_CH3_PktHandler_Fcn *pktArray[MPIDI_CH3_PKT_END_CH3+1];
static int needsInit = 1;
MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3U_HANDLE_ORDERED_RECV_PKT);
MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3U_HANDLE_ORDERED_RECV_PKT);
MPL_DBG_STMT(MPIDI_CH3_DBG_OTHER,VERBOSE,MPIDI_DBG_Print_packet(pkt));
/* FIXME: We can turn this into something like
MPIR_Assert(pkt->type <= MAX_PACKET_TYPE);
mpi_errno = MPIDI_CH3_ProgressFunctions[pkt->type](vc,pkt,rreqp);
in the progress engine itself. Then this routine is not necessary.
*/
if (needsInit) {
MPIDI_CH3_PktHandler_Init( pktArray, MPIDI_CH3_PKT_END_CH3 );
needsInit = 0;
}
/* Packet type is an enum and hence >= 0 */
MPIR_Assert(pkt->type <= MPIDI_CH3_PKT_END_CH3);
mpi_errno = pktArray[pkt->type](vc, pkt, data, buflen, rreqp);
MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3U_HANDLE_ORDERED_RECV_PKT);
return mpi_errno;
}