---
title: KesVectorSetComm
description: KesReturnCode KesVectorSetComm(KesVector X, KesCommDirection direction, MPI_Comm comm);
url: "https://www.hikunpeng.com/document/detail/zh/hpchistory/hpckit/develop240RC1/kunpengaccel_kml_16_0737.html"
---

# 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）。 |
