• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ FT_PRINTERR函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: recv_msg

static int recv_msg(void)
{
	int ret;

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

	ret = ft_wait_for_comp(rxcq, 1);

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


示例17: main

int main(int argc, char **argv)
{
	int op, ret;
	int failed = 0;

	hints = fi_allocinfo();
	if (!hints)
		return EXIT_FAILURE;

	while ((op = getopt(argc, argv, FAB_OPTS "h")) != -1) {
		switch (op) {
		default:
			ft_parseinfo(op, optarg, hints, &opts);
			break;
		case '?':
		case 'h':
			usage();
			return EXIT_FAILURE;
		}
	}

	hints->mode = ~0;
	hints->domain_attr->mode = ~0;
	hints->domain_attr->mr_mode = ~(FI_MR_BASIC | FI_MR_SCALABLE);

	ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi);
	if (ret) {
		FT_PRINTERR("fi_getinfo", ret);
		goto out;
	}

	if (!fi->domain_attr->cntr_cnt)
		goto out;

	ret = ft_open_fabric_res();
	if (ret)
		goto out;

	printf("Testing CNTRS on fabric %s\n", fi->fabric_attr->name);

	failed = run_tests(test_array, err_buf);
	if (failed > 0)
		printf("Summary: %d tests failed\n", failed);
	else
		printf("Summary: all tests passed\n");

out:
	ft_free_res();
	return ret ? ft_exit_code(ret) : (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS;
}
开发者ID:ofiwg,项目名称:libfabric,代码行数:50,代码来源:cntr_test.c


示例18: ft_cq_readerr

int ft_cq_readerr(struct fid_cq *cq)
{
	struct fi_cq_err_entry cq_err;
	int ret;

	ret = fi_cq_readerr(cq, &cq_err, 0);
	if (ret < 0) {
		FT_PRINTERR("fi_cq_readerr", ret);
	} else {
		FT_CQ_ERR(cq, cq_err, NULL, 0);
		ret = -cq_err.err;
	}
	return ret;
}
开发者ID:arsmith10,项目名称:fabtests,代码行数:14,代码来源:shared.c


示例19: post_recvs

static int post_recvs(struct cma_node *node)
{
	int i, ret = 0;

	for (i = 0; i < hints->tx_attr->size && !ret; i++ ) {
		ret = fi_recv(node->ep, node->mem, hints->ep_attr->max_msg_size,
				node->mrdesc, 0, node);
		if (ret) {
			FT_PRINTERR("fi_recv", ret);
			break;
		}
	}
	return ret;
}
开发者ID:vspetrov,项目名称:fabtests,代码行数:14,代码来源:cmatose.c


示例20: send_msg

static int send_msg(int size)
{
	int ret;

	ret = fi_send(ep_array[0], buf, (size_t) size, fi_mr_desc(mr),
			addr_array[0], &tx_ctx);
	if (ret) {
		FT_PRINTERR("fi_send", ret);
		return ret;
	}

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FT_READ_USHORT函数代码示例发布时间:2022-05-30
下一篇:
C++ FT_Outline_Translate函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap