---
title: 将视图相对偏移量转换为绝对字节位置
description: "MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, MPI_Offset *disp)"
url: https://www.hikunpeng.com/document/detail/zh/hpchistory/hpckit/develop2400/userg_hyperio_0028.html
sourcePath: /source/zh/hpchistory/hpckit/develop2400/userg_hyperio_0028.html
indexId: 670652efa18777f958b05d4aaffee227dda10c2d564e9272443a2567023167c264
---
# 将视图相对偏移量转换为绝对字节位置

#### 函数定义

MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, MPI_Offset *disp)

PMPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, MPI_Offset *disp)


#### 参数

| 参数名 | 描述 | 取值范围 | 输入/输出 |
| --- | --- | --- | --- |
| fh | 文件（句柄） | 非空 | 输入 |
| offset | 偏移量 | 非负整数 | 输入 |
| \*disp | 偏移量的绝对字节位置 | 非空 | 输出 |


#### 返回值

- 成功：返回MPI_SUCCESS。
- 失败：返回错误码。


#### 错误码

| 错误码 | 描述 |
| --- | --- |
| MPI\_ERR\_FILE | 无效文件句柄 |
