---
title: 以聚合模式设置和访问info对象的新值
description: "- 设置info对象的新值。"
url: https://www.hikunpeng.com/document/detail/zh/hpchistory/hpckit/develop2400/userg_hyperio_0022.html
sourcePath: /source/zh/hpchistory/hpckit/develop2400/userg_hyperio_0022.html
indexId: c22e3d8a02d44d5263263a009fbada12418bbd5adff38c949e3fa504cd3685db64
---
# 以聚合模式设置和访问info对象的新值

#### 函数定义

- 设置info对象的新值。
  MPI_File_set_info(MPI_File fh, MPI_Info info)

  PMPI_File_set_info(MPI_File fh, MPI_Info info)


- 返回新的信息对象，包含与文件关联的当前info的值。
  MPI_File_get_info(MPI_File fh, MPI_Info *info_used)

  PMPI_File_get_info(MPI_File fh, MPI_Info *info_used)


#### 参数

| 参数名 | 描述 | 取值范围 | 输入/输出 |
| --- | --- | --- | --- |
| fh | 要删除文件的句柄 | 非空 | 输入 |
| info | info对象（句柄） | 非空 | 输入 |
| \*info | 目标地址，存放info对象（句柄） | 非空 | 输出 |


#### 返回值

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


#### 错误码

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


#### 注意

info内部值对中间件无用，仅返回设置的info对象。
