mindspore8卡分布式训练davinci_model : load task fail, return ret

2023-10-12 12:40

本文主要是介绍mindspore8卡分布式训练davinci_model : load task fail, return ret,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

8卡分布式训练失败,出现HCCL错误。

【操作步骤&问题现象】

1、模型为3D卷积模型,分布式相关设置。

2、出现HCCL报错,Distribute Task Failed。注意:数据处理需要40分钟。

1. 报错信息

ERROR] GE(1530736,ffff4809f1e0,python):2021-10-10-19:36:29.319.926 [mindspore/ccsrc/runtime/device/ascend/ge_runtime/task/hccl_task.cc:100] Distribute] davinci_model : load task fail, return ret: 1343225860[ERROR] DEVICE(1530736,ffff4809f1e0,python):2021-10-10-19:36:29.320.484 [mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc:469] LoadTask] Distribute Task Failed, error: mindspore/ccsrc/runtime/device/ascend/ge_runtime/task/hccl_task.cc:100 Distribute] davinci_model : load task fail, return ret: 1343225860# In file /root/archiconda3/envs/zjc/lib/python3.7/site-packages/mindspore/ops/_grad/grad_nn_ops.py(83)dx = input_grad(w, dout, get_shape(x))^[ERROR] MD(1530736,ffff38fff1e0,python):2021-10-10-19:36:34.542.081 [mindspore/ccsrc/minddata/dataset/util/task_manager.cc:217] InterruptMaster] Task is terminated with err msg(more detail in info level log):Exception thrown from PyFunc. The actual amount of data read from generator 444 is different from generator.len 8400, you should adjust generator.len to make them match.Line of code : 198File         : /home/jenkins/agent-working-dir/workspace/Compile_Ascend_ARM_CentOS/mindspore/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/generator_op.cc[WARNING] MD(1530736,ffffa0a34740,python):2021-10-10-19:36:37.914.259 [mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc:73] ~DeviceQueueOp] preprocess_batch: 140; batch_queue: 0, 0, 0, 0, 0, 0, 0, 0, 0, 64; push_start_time: 2021-10-10-19:32:07.652.799, 2021-10-10-19:32:07.695.438, 2021-10-10-19:32:07.732.808, 2021-10-10-19:32:07.779.769, 2021-10-10-19:32:07.817.956, 2021-10-10-19:32:07.866.328, 2021-10-10-19:32:07.905.937, 2021-10-10-19:32:07.931.153, 2021-10-10-19:32:07.936.371, 2021-10-10-19:32:07.945.894; push_end_time: 2021-10-10-19:32:07.653.279, 2021-10-10-19:32:07.695.918, 2021-10-10-19:32:07.733.354, 2021-10-10-19:32:07.780.238, 2021-10-10-19:32:07.818.448, 2021-10-10-19:32:07.866.782, 2021-10-10-19:32:07.906.422, 2021-10-10-19:32:07.931.613, 2021-10-10-19:32:07.936.843, 2021-10-10-19:36:36.347.214.Traceback (most recent call last):File "train.py", line 139, in <module>model.train(config.epoch_size, train_dataset, callbacks=callbacks_list)  # , dataset_sink_mode=FalseFile "/root/archiconda3/envs/zjc/lib/python3.7/site-packages/mindspore/train/model.py", line 649, in trainsink_size=sink_size)File "/root/archiconda3/envs/zjc/lib/python3.7/site-packages/mindspore/train/model.py", line 439, in _trainself._train_dataset_sink_process(epoch, train_dataset, list_callback, cb_params, sink_size)File "/root/archiconda3/envs/zjc/lib/python3.7/site-packages/mindspore/train/model.py", line 499, in _train_dataset_sink_processoutputs = self._train_network(*inputs)File "/root/archiconda3/envs/zjc/lib/python3.7/site-packages/mindspore/nn/cell.py", line 386, in __call__out = self.compile_and_run(*inputs)File "/root/archiconda3/envs/zjc/lib/python3.7/site-packages/mindspore/nn/cell.py", line 644, in compile_and_runself.compile(*inputs)File "/root/archiconda3/envs/zjc/lib/python3.7/site-packages/mindspore/nn/cell.py", line 631, in compile_executor.compile(self, *inputs, phase=self.phase, auto_parallel_mode=self._auto_parallel_mode)File "/root/archiconda3/envs/zjc/lib/python3.7/site-packages/mindspore/common/api.py", line 531, in compileresult = self._executor.compile(obj, args_list, phase, use_vm, self.queue_name)RuntimeError: mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc:469 LoadTask] Distribute Task Failed, error: mindspore/ccsrc/runtime/device/ascend/ge_runtime/task/hccl_task.cc:100 Distribute] davinci_model : load task fail, return ret: 1343225860# In file /root/archiconda3/envs/zjc/lib/python3.7/site-packages/mindspore/ops/_grad/grad_nn_ops.py(83)dx = input_grad(w, dout, get_shape(x))^# In file /root/archiconda3/envs/zjc/lib/python3.7/site-packages/mindspore/ops/_grad/grad_nn_ops.py(83)dx = input_grad(w, dout, get_shape(x))^

2. info 日志

[ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.719 [p2p_mgmt.cc:218][167557][218555][Wait][P2PConnected]connected p2p timeout, timeout:120 s. local logicDevid:0, remote physic id:4.[ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.778 [p2p_mgmt.cc:185][167557][218555]call trace: ret -> 16[ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.788 [comm_factory.cc:1087][167557][218555][Get][ExchangerNetwork]Enable P2P Failed, ret[16][ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.796 [comm_factory.cc:240][167557][218555][Create][CommOuter]exchangerNetwork create failed[ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.805 [hccl_impl.cc:1958][167557][218555][Create][OuterComm]errNo[0x0000000005000006] tag[HcomAllReduce_6629421139219749105_0], created commOuter fail. commOuter[0] is null[ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.885 [hccl_impl.cc:1734][167557][213677][Create][CommByAlg]CreateInnerComm [0] or CreateOuterComm[6] failed. commType[2][ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.921 [hccl_impl.cc:1831][167557][213677]call trace: ret -> 4[ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.938 [hccl_impl.cc:893][167557][213677][HcclImpl][AllReduce]errNo[0x0000000005000004]  tag[HcomAllReduce_6629421139219749105_0],all reduce create comm failed[ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.946 [hccl_comm.cc:232][167557][213677]call trace: ret -> 4[ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.957 [hcom.cc:246][167557][213677][AllReduce][Result]errNo[0x0000000005010004] hcclComm all reduce error, tag[HcomAllReduce_6629421139219749105_0],input_ptr[0x1088eaa69200], output_ptr[0x108800000200], count[1132288], data_type[4], op[0], stream[0xfffdb566b530][ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.968 [hcom_ops_kernel_info_store.cc:309][167557][213677]call trace: ret -> 4[ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.983 [hcom_ops_kernel_info_store.cc:191][167557][213677]call trace: ret -> 4[ERROR] HCCL(167557,python):2021-10-09-17:53:10.542.992 [hcom_ops_kernel_info_store.cc:806][167557][213677][Load][Task]errNo[0x0000000005010004] load task failed. (load op[HcomAllReduce] fail)[ERROR] GE(167557,ffff2b2ef1e0,python):2021-10-09-17:53:10.543.045 [mindspore/ccsrc/runtime/device/ascend/ge_runtime/task/hccl_task.cc:100] Distribute] davinci_model : load task fail, return ret: 1343225860[ERROR] DEVICE(167557,ffff2b2ef1e0,python):2021-10-09-17:53:10.543.320 [mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc:469] LoadTask] Distribute Task Failed, error: mindspore/ccsrc/runtime/device/ascend/ge_runtime/task/hccl_task.cc:100 Distribute] davinci_model : load task fail, return ret: 1343225860# In file /root/archiconda3/envs/zjc/lib/python3.7/site-packages/mindspore/ops/_grad/grad_nn_ops.py(83)dx = input_grad(w, dout, get_shape(x))[ERROR] MD(167557,ffff6edbf1e0,python):2021-10-09-17:53:15.902.036 [mindspore/ccsrc/minddata/dataset/util/task_manager.cc:217] InterruptMaster] Task is terminated with err msg(more detail in info level log):Exception thrown from PyFunc. The actual amount of data read from generator 547 is different from generator.len 8400, you should adjust generator.len to make them match.Line of code : 198File         : /home/jenkins/agent-working-dir/workspace/Compile_Ascend_ARM_CentOS/mindspore/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/generator_op.cc[ERROR] HCCL(167557,python):2021-10-09-17:53:17.392.389 [allreducepadding.cc:334][167557][213677][Compare][OutputPaddingMem]Tag[HcomAllReduce_6629421139219749105_0] All Reduce Padding Head Check Failed, TargetValue[41], ActualValue[00]

解答:

提示是hccl建连超时了。

有可能是其他卡已经挂了,也有可能是每卡处理的速度不一样,可以把超时时间设置长一点。

HCCL_CONNECT_TIMEOUT=6000,export下这个环境变量。

这篇关于mindspore8卡分布式训练davinci_model : load task fail, return ret的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/195907

相关文章

MiniGPT-3D, 首个高效的3D点云大语言模型,仅需一张RTX3090显卡,训练一天时间,已开源

项目主页:https://tangyuan96.github.io/minigpt_3d_project_page/ 代码:https://github.com/TangYuan96/MiniGPT-3D 论文:https://arxiv.org/pdf/2405.01413 MiniGPT-3D在多个任务上取得了SoTA,被ACM MM2024接收,只拥有47.8M的可训练参数,在一张RTX

集中式版本控制与分布式版本控制——Git 学习笔记01

什么是版本控制 如果你用 Microsoft Word 写过东西,那你八成会有这样的经历: 想删除一段文字,又怕将来这段文字有用,怎么办呢?有一个办法,先把当前文件“另存为”一个文件,然后继续改,改到某个程度,再“另存为”一个文件。就这样改着、存着……最后你的 Word 文档变成了这样: 过了几天,你想找回被删除的文字,但是已经记不清保存在哪个文件了,只能挨个去找。真麻烦,眼睛都花了。看

开源分布式数据库中间件

转自:https://www.csdn.net/article/2015-07-16/2825228 MyCat:开源分布式数据库中间件 为什么需要MyCat? 虽然云计算时代,传统数据库存在着先天性的弊端,但是NoSQL数据库又无法将其替代。如果传统数据易于扩展,可切分,就可以避免单机(单库)的性能缺陷。 MyCat的目标就是:低成本地将现有的单机数据库和应用平滑迁移到“云”端

Spark MLlib模型训练—聚类算法 PIC(Power Iteration Clustering)

Spark MLlib模型训练—聚类算法 PIC(Power Iteration Clustering) Power Iteration Clustering (PIC) 是一种基于图的聚类算法,用于在大规模数据集上进行高效的社区检测。PIC 算法的核心思想是通过迭代图的幂运算来发现数据中的潜在簇。该算法适用于处理大规模图数据,特别是在社交网络分析、推荐系统和生物信息学等领域具有广泛应用。Spa

SigLIP——采用sigmoid损失的图文预训练方式

SigLIP——采用sigmoid损失的图文预训练方式 FesianXu 20240825 at Wechat Search Team 前言 CLIP中的infoNCE损失是一种对比性损失,在SigLIP这个工作中,作者提出采用非对比性的sigmoid损失,能够更高效地进行图文预训练,本文进行介绍。如有谬误请见谅并联系指出,本文遵守CC 4.0 BY-SA版权协议,转载请联系作者并注

MVC(Model-View-Controller)和MVVM(Model-View-ViewModel)

1、MVC MVC(Model-View-Controller) 是一种常用的架构模式,用于分离应用程序的逻辑、数据和展示。它通过三个核心组件(模型、视图和控制器)将应用程序的业务逻辑与用户界面隔离,促进代码的可维护性、可扩展性和模块化。在 MVC 模式中,各组件可以与多种设计模式结合使用,以增强灵活性和可维护性。以下是 MVC 各组件与常见设计模式的关系和作用: 1. Model(模型)

Detectorn2预训练模型复现:数据准备、训练命令、日志分析与输出目录

Detectorn2预训练模型复现:数据准备、训练命令、日志分析与输出目录 在深度学习项目中,目标检测是一项重要的任务。本文将详细介绍如何使用Detectron2进行目标检测模型的复现训练,涵盖训练数据准备、训练命令、训练日志分析、训练指标以及训练输出目录的各个文件及其作用。特别地,我们将演示在训练过程中出现中断后,如何使用 resume 功能继续训练,并将我们复现的模型与Model Zoo中的

laravel框架实现redis分布式集群原理

在app/config/database.php中配置如下: 'redis' => array('cluster' => true,'default' => array('host' => '172.21.107.247','port' => 6379,),'redis1' => array('host' => '172.21.107.248','port' => 6379,),) 其中cl

基于MySQL实现的分布式锁

概述 在单机时代,虽然不需要分布式锁,但也面临过类似的问题,只不过在单机的情况下,如果有多个线程要同时访问某个共享资源的时候,我们可以采用线程间加锁的机制,即当某个线程获取到这个资源后,就立即对这个资源进行加锁,当使用完资源之后,再解锁,其它线程就可以接着使用了。例如,在JAVA中,甚至专门提供了一些处理锁机制的一些API(synchronize/Lock等)。 但是到了分布式系统的时代,这种

类的load方法和initialize方法对比

1. load方法在main()之前被调用,而initialize方法在main()之后调用 load方法实际是在load_images过程中被调用的。load_images会将当前应用依赖的所有镜像(动态库)加载到内存,在在加载中首先是对镜像进行扫描,将所有包含 load 方法的类加入列表 loadable_classes ,然后从这个列表中逐一调用其所包含的 load 方法。 +[XXCl