---
title: KesVectorSetComm
description: "KesReturnCode KesVectorSetComm(KesVector X, KesCommDirection direction, MPI_Comm comm);"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/240RC1/accel/kunpengaccel_kml_16_0737.html
sourcePath: /source/zh/kunpengboostkithistory/240RC1/accel/kunpengaccel_kml_16_0737.html
indexId: d0646216d73425ce65dee1413ce7e97e2b0a6083f74fe53652a5ec2f8196e1d676
---
# KesVectorSetComm

#### 接口定义

KesReturnCode KesVectorSetComm(KesVector X, KesCommDirection direction, MPI_Comm comm);


#### 接口说明

设置向量的通讯子。


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| X | KesVector | 向量句柄，不能为空指针。 | 输入/输出 |
| direction | KesCommDirection | 通讯子类型，行分割的通讯子/列通讯子。 | 输入 |
| comm | MPI\_Comm | MPI通讯子。 | 输入 |


| KesCommDirection | 类型描述 |
| --- | --- |
| KES\_ROW | 行分割的通讯子。 |
| KES\_COL | 列通讯子（目前仅支持MPI\_COMM\_SELF）。 |
