(6) MPI-IO: fileview MPI_File_set_view MPI_File_get_view

本文详细探讨了MPI-IO中的fileview概念,重点讲解了如何使用MPI_File_set_view和MPI_File_get_view函数进行文件视图的设置和获取。通过实例分析,阐述了fileview在并行I/O中的重要作用,以及如何结合null、filter和struct等元素实现灵活的数据访问模式。
摘要由CSDN通过智能技术生成



#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include"mpi.h"

/**
 * int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, char * datarep, MPI_Info info);
 * 		etype = basic unit of data access (can be any basic or derived datatype)
 * 		filetype = specifies which portion of the file is visible to the process, filetype can filter the irrelative type
 * 					the filetype is the real datatype viewed for processes
 * 		daterep =  native, internal, or external32
 *    	e.g., MPI_File_set_view(thefile, myrank * BUFSIZE * sizeof(int), MPI_INT, MPI_INT, "native", MPI_INFO_NULL);
 *=================================================
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值