当前位置: 首页>>代码示例>>C++>>正文


C++ FT_PRINTERR函数代码示例

本文整理汇总了C++中FT_PRINTERR函数的典型用法代码示例。如果您正苦于以下问题:C++ FT_PRINTERR函数的具体用法?C++ FT_PRINTERR怎么用?C++ FT_PRINTERR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了FT_PRINTERR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ft_start_server

int ft_start_server(void)
{
	int ret;

	ret = ft_getinfo(hints, &fi_pep);
	if (ret)
		return ret;

	ret = fi_fabric(fi_pep->fabric_attr, &fabric, NULL);
	if (ret) {
		FT_PRINTERR("fi_fabric", ret);
		return ret;
	}

	ret = fi_eq_open(fabric, &eq_attr, &eq, NULL);
	if (ret) {
		FT_PRINTERR("fi_eq_open", ret);
		return ret;
	}

	ret = fi_passive_ep(fabric, fi_pep, &pep, NULL);
	if (ret) {
		FT_PRINTERR("fi_passive_ep", ret);
		return ret;
	}

	ret = fi_pep_bind(pep, &eq->fid, 0);
	if (ret) {
		FT_PRINTERR("fi_pep_bind", ret);
		return ret;
	}

	ret = fi_listen(pep);
	if (ret) {
		FT_PRINTERR("fi_listen", ret);
		return ret;
	}

	return 0;
}
开发者ID:a-abraham,项目名称:fabtests-cray,代码行数:40,代码来源:shared.c

示例2: run_test

static int run_test(void)
{
	int ret = 0;

	ret = init_fabric();
	if (ret)
		return ret;

	if (opts.dst_addr) {	
		/* Execute RMA write operation from Client */
		fprintf(stdout, "RMA write to server\n");
		sprintf(buf, "%s", welcome_text);
		ret = write_data(sizeof(char *) * strlen(buf));
		if (ret)
			return ret;
	
		ret = fi_cntr_wait(scntr, 1, -1);
		if (ret < 0) {
			FT_PRINTERR("fi_cntr_wait", ret);
			return ret;
		}

		fprintf(stdout, "Received a completion event for RMA write\n");
	} else {	
		/* Server waits for message from Client */
		ret = fi_cntr_wait(rcntr, 1, -1);
		if (ret < 0) {
			FT_PRINTERR("fi_cntr_wait", ret);
			return ret;
		}

		fprintf(stdout, "Received data from Client: %s\n", (char *)buf);
	}

	/* TODO: need support for finalize operation to sync test */
	free_ep_res();
	fi_close(&dom->fid);
	fi_close(&fab->fid);
	return 0;
}
开发者ID:charlesarcher,项目名称:fabtests,代码行数:40,代码来源:rdm_rma_simple.c

示例3: ft_finalize

int ft_finalize(void)
{
	struct iovec iov;
	int ret;
	struct fi_context ctx;
	void *desc = fi_mr_desc(mr);

	strcpy(tx_buf + ft_tx_prefix_size(), "fin");
	iov.iov_base = tx_buf;
	iov.iov_len = 4 + ft_tx_prefix_size();

	if (hints->caps & FI_TAGGED) {
		struct fi_msg_tagged tmsg;

		memset(&tmsg, 0, sizeof tmsg);
		tmsg.msg_iov = &iov;
		tmsg.desc = &desc;
		tmsg.iov_count = 1;
		tmsg.addr = remote_fi_addr;
		tmsg.tag = tx_seq;
		tmsg.ignore = 0;
		tmsg.context = &ctx;

		ret = fi_tsendmsg(ep, &tmsg, FI_INJECT | FI_TRANSMIT_COMPLETE);
	} else {
		struct fi_msg msg;

		memset(&msg, 0, sizeof msg);
		msg.msg_iov = &iov;
		msg.desc = &desc;
		msg.iov_count = 1;
		msg.addr = remote_fi_addr;
		msg.context = &ctx;

		ret = fi_sendmsg(ep, &msg, FI_INJECT | FI_TRANSMIT_COMPLETE);
	}
	if (ret) {
		FT_PRINTERR("transmit", ret);
		return ret;
	}


	ret = ft_get_tx_comp(++tx_seq);
	if (ret)
		return ret;

	ret = ft_get_rx_comp(rx_seq);
	if (ret)
		return ret;

	return 0;
}
开发者ID:a-abraham,项目名称:fabtests-cray,代码行数:52,代码来源:shared.c

示例4: write_data_with_cq_data

static int write_data_with_cq_data(size_t size)
{
	int ret;

	ret = fi_writedata(ep, buf, size, fi_mr_desc(mr), cq_data,
			remote_fi_addr, remote.addr, remote.key,
			&fi_ctx_writedata);
	if (ret) {
		FT_PRINTERR("fi_writedata", ret);
		return ret;
	}
	return 0;
}
开发者ID:jhrobichaux,项目名称:fabtests-cray,代码行数:13,代码来源:rdm_rma.c

示例5: ft_bind_comp

int ft_bind_comp(struct fid_ep *ep, uint64_t flags)
{
	int ret;

	if (flags & FI_SEND) {
		ret = fi_ep_bind(ep, &txcq->fid, flags & ~FI_RECV);
		if (ret) {
			FT_PRINTERR("fi_ep_bind", ret);
			return ret;
		}
	}

	if (flags & FI_RECV) {
		ret = fi_ep_bind(ep, &rxcq->fid, flags & ~FI_SEND);
		if (ret) {
			FT_PRINTERR("fi_ep_bind", ret);
			return ret;
		}
	}

	return 0;
}
开发者ID:a-abraham,项目名称:fabtests-cray,代码行数:22,代码来源:ft_comp.c

示例6: recv_msg

static int recv_msg(void)
{
	int ret;

	ret = fi_recv(srx_ctx, buf, rx_size, fi_mr_desc(mr), 0, &rx_ctx);
	if (ret) {
		FT_PRINTERR("fi_recv", ret);
		return ret;
	}

	ret = ft_get_rx_comp(++rx_seq);
	return ret;
}
开发者ID:RajKamal2013,项目名称:fabtests,代码行数:13,代码来源:rdm_shared_ctx.c

示例7: write_data

static int write_data(size_t size)
{
	int ret;
	
	/* Using specified base address and MR key for RMA write */
	ret = fi_write(ep, buf, size, fi_mr_desc(mr), remote_fi_addr, 0, 
			user_defined_key, &fi_ctx_write);
	if (ret){
		FT_PRINTERR("fi_write", ret);
		return ret;
	}
	return 0;
}
开发者ID:charlesarcher,项目名称:fabtests,代码行数:13,代码来源:rdm_rma_simple.c

示例8: alloc_cm_res

static int alloc_cm_res(void)
{
	struct fi_eq_attr cm_attr;
	int ret;

	memset(&cm_attr, 0, sizeof cm_attr);
	cm_attr.wait_obj = FI_WAIT_FD;
	ret = fi_eq_open(fab, &cm_attr, &cmeq, NULL);
	if (ret)
		FT_PRINTERR("fi_eq_open", ret);

	return ret;
}
开发者ID:charlesarcher,项目名称:fabtests,代码行数:13,代码来源:msg_rma.c

示例9: pp_post_send

static int pp_post_send(struct pingpong_context *ctx)
{
	int rc = 0;

	rc = fi_send(ctx->ep, ctx->buf, ctx->size, fi_mr_desc(ctx->mr),
		     0, (void *)(uintptr_t)PINGPONG_SEND_WCID);
	if (rc) {
		FT_PRINTERR("fi_send", rc);
		return 1;
	}

	return 0;
}
开发者ID:evgeny-leksikov,项目名称:fabtests,代码行数:13,代码来源:rc_pingpong.c

示例10: read_data

static int read_data(size_t size)
{
	int ret;

	ret = fi_read(ep, buf, size, fi_mr_desc(mr), 
		      0, remote.addr, remote.key, ep);
	if (ret) {
		FT_PRINTERR("fi_read", ret);
		return ret;
	}

	return 0;
}
开发者ID:charlesarcher,项目名称:fabtests,代码行数:13,代码来源:msg_rma.c

示例11: send_msg

static int send_msg(int size, uint64_t tag)
{
	int ret;

	ret = fi_tsend(ep, buf, (size_t) size, fi_mr_desc(mr), remote_fi_addr,
			tag, &fi_ctx_send);
	if (ret)
		FT_PRINTERR("fi_tsend", ret);

	ret = wait_for_tagged_completion(scq, 1);

	return ret;
}
开发者ID:charlesarcher,项目名称:fabtests,代码行数:13,代码来源:rdm_tagged_search.c

示例12: bind_ep_res

static int bind_ep_res(void)
{
	int i, ret;

	ret = fi_scalable_ep_bind(sep, &av->fid, 0);
	if (ret) {
		FT_PRINTERR("fi_scalable_ep_bind", ret);
		return ret;
	}

	for (i = 0; i < ctx_cnt; i++) {
		ret = fi_ep_bind(tx_ep[i], &txcq_array[i]->fid, FI_SEND);
		if (ret) {
			FT_PRINTERR("fi_ep_bind", ret);
			return ret;
		}

		ret = fi_enable(tx_ep[i]);
		if (ret) {
			FT_PRINTERR("fi_enable", ret);
			return ret;
		}
	}

	for (i = 0; i < ctx_cnt; i++) {
		ret = fi_ep_bind(rx_ep[i], &rxcq_array[i]->fid, FI_RECV);
		if (ret) {
			FT_PRINTERR("fi_ep_bind", ret);
			return ret;
		}

		ret = fi_enable(rx_ep[i]);
		if (ret) {
			FT_PRINTERR("fi_enable", ret);
			return ret;
		}

		ret = fi_recv(rx_ep[i], rx_buf, MAX(rx_size, FT_MAX_CTRL_MSG),
			      mr_desc, 0, NULL);
		if (ret) {
			FT_PRINTERR("fi_recv", ret);
			return ret;
		}
	}

	ret = fi_enable(sep);
	if (ret) {
		FT_PRINTERR("fi_enable", ret);
		return ret;
	}

	return 0;
}
开发者ID:ofiwg,项目名称:libfabric,代码行数:53,代码来源:scalable_ep.c

示例13: recv_xfer

static int recv_xfer(int size)
{
	struct fi_cq_data_entry comp;
	int ret;

	do {
		ret = fi_cq_read(rcq, &comp, 1);
		if (ret < 0 && ret != -FI_EAGAIN) {
			if (ret == -FI_EAVAIL) {
				cq_readerr(rcq, "rcq");
			} else {
				FT_PRINTERR("fi_cq_read", ret);
			}
			return ret;
		}
	} while (ret == -FI_EAGAIN);

	ret = fi_recv(ep, buf, buffer_size, fi_mr_desc(mr), 0, buf);
	if (ret)
		FT_PRINTERR("fi_recv", ret);

	return ret;
}
开发者ID:charlesarcher,项目名称:fabtests,代码行数:23,代码来源:msg_rma.c

示例14: execute_base_atomic_op

static int execute_base_atomic_op(enum fi_op op)
{
	int ret;
	
	ret = fi_atomic(ep, buf, 1, fi_mr_desc(mr), remote_fi_addr, remote.addr,
		       	remote.key, datatype, op, &fi_ctx_atomic);
	if (ret) {
		FT_PRINTERR("fi_atomic", ret);
	} else {						
		ret = wait_for_completion(scq, 1);
	}
	
	return ret;
}
开发者ID:ajaykulk,项目名称:fabtests,代码行数:14,代码来源:rdm_atomic.c

示例15: recv_msg

static int recv_msg(void)
{
	int ret;

	ret = fi_recv(ep, buf, buffer_size, fi_mr_desc(mr), 0, &fi_ctx_recv);
	if (ret) {
		FT_PRINTERR("fi_recv", ret);
		return ret;
	}

	ret = wait_for_completion(rcq, 1);

	return ret;
}
开发者ID:ajaykulk,项目名称:fabtests,代码行数:14,代码来源:rdm_pingpong.c


注:本文中的FT_PRINTERR函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。