---
title: UnlinkLlmClusters
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/hixlug/llmcrv2_42_11.html
sourcePath: /source/zh/canncommercial/900/API/hixlug/llmcrv2_42_11.html
indexId: d6f9d068e16f10617989e0ee6c8a3391a6425ddd8dd01c4e68759a6d39f2018759
---
# UnlinkLlmClusters

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | x |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


说明：针对 Atlas A2 训练系列产品 / Atlas A2 推理系列产品 ，仅支持Atlas 800I A2 推理服务器、A200I A2 Box 异构组件。


#### 函数功能

在LlmDataDist之间执行断链。


#### 函数原型

```
Status UnlinkLlmClusters(const std::vector<ClusterInfo> &clusters, std::vector<Status> &rets, int32_t timeout_in_millis = 1000, bool force_flag = false)
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| clusters | 输入 | 需要断链的cluster信息。类型为ClusterInfo。 |
| rets | 输出 | 每个cluster断链结果。 |
| timeout\_in\_millis | 输入 | 断链超时时间，单位ms。 |
| force\_flag | 输入 | 是否为强制断链。默认为否。 强制断链仅强制拆除本端链接，所以两端都要调用。 非强制断链在Client端发起，不存在故障时两端链路都会拆除。但在存在链路故障时还需要在Server端发起调用强制断链，耗时长。 |


#### 调用示例

单击Gitee(https://gitee.com/ascend/samples/tags)，根据“标签名”下载配套版本的sample包，从“cplusplus/level1_single_api/11_llm_data_dist”目录中获取样例。


#### 返回值

- SUCCESS：只有所有clusters断链成功，接口才会返回成功。
- 其他：执行断链失败，需要查看rets每个cluster的断链结果。


#### 异常处理

LLM_UNLINK_FAILED：断链失败。


#### 约束说明

调用该接口前，需要先调用Initialize接口完成初始化。
