---
title: KesVectorSetComm
description: KesReturnCode KesVectorSetComm(KesVector X, KesCommDirection direction, MPI_Comm comm);
url: "https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpckit/devg/kunpengaccel_kml_1050.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）。 |
