---
title: 返回文件中数据类型的范围
description: "MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, MPI_Aint *extent)"
url: https://www.hikunpeng.com/document/detail/zh/hpchistory/hpckit/develop2400/userg_hyperio_0027.html
sourcePath: /source/zh/hpchistory/hpckit/develop2400/userg_hyperio_0027.html
indexId: 18aa02969b3688f46b469f3b0beda1d68dabf6e50d5d03ac097e5824e7a2fce964
---
# 返回文件中数据类型的范围

#### 函数定义

MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, MPI_Aint *extent)

PMPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, MPI_Aint *extent)


#### 参数

| 参数名 | 描述 | 取值范围 | 输入/输出 |
| --- | --- | --- | --- |
| fh | 文件（句柄） | 非空 | 输入 |
| datatype | 数据类型（句柄） | 非空 | 输入 |
| \*extent | 数据类型范围 | 非空 | 输出 |


#### 返回值

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


#### 错误码

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


#### 注意

仅支持基本数据类型与中间件提供接口产生数据类型的计算。
