Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
description of repo status
Open Source
>
AI/ML
>
Machine Learning/Deep Learning
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
91
Star
660
Fork
1.5K
Ascend
/
pytorch
Paused
Code
Issues
38
Pull Requests
350
Wiki
Insights
Pipelines
Service
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
多卡训练报错
DONE
#I8NY3R
训练问题
liuhc33
Opened this issue
2023-12-13 10:36
你好,我的python版本3.8.10,CAAN版本为7.0RC1,torch版本1.11.0 在跑自己的模型时,单卡训练正常,在跑多卡(4卡)时遇到以下问题: ``` Traceback (most recent call last): File "bin/train_ddp.py", line 122, in <module> main() File "bin/train_ddp.py", line 97, in main task.to_distributed(args.nodes, args.node_id, args.gpus, args.gpu) File "/home/liuhangchen/Workspace/eteh-v2-release-offline_export_transfDDP_202311/env_train/eteh/tools/interface/pytorch_backend/th_task.py", line 59, in to_distributed self.trainer.model = DDP(self.model, device_ids=[ File "/usr/local/python3.8.10/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 641, in __init__ dist._verify_params_across_processes(self.process_group, parameters) RuntimeError: [ERROR] HCCL error in: /usr1/01/workspace/j_ctViaEnN/pytorch/torch_npu/csrc/distributed/HCCLUtils.hpp:80. EJ0001: Failed to initialize the HCCP process. Reason: Maybe the last training process is running. Solution: Wait for 10s after killing the last training process and try again. TraceBack (most recent call last): tsd client wait response fail, device response code[1]. unknown device error.[FUNC:WaitRsp][FILE:process_mode_manager.cpp][LINE:270] Traceback (most recent call last): File "bin/train_ddp.py", line 122, in <module> main() File "bin/train_ddp.py", line 97, in main task.to_distributed(args.nodes, args.node_id, args.gpus, args.gpu) File "/home/liuhangchen/Workspace/eteh-v2-release-offline_export_transfDDP_202311/env_train/eteh/tools/interface/pytorch_backend/th_task.py", line 59, in to_distributed self.trainer.model = DDP(self.model, device_ids=[ File "/usr/local/python3.8.10/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 641, in __init__ dist._verify_params_across_processes(self.process_group, parameters) RuntimeError: [ERROR] HCCL error in: /usr1/01/workspace/j_ctViaEnN/pytorch/torch_npu/csrc/distributed/HCCLUtils.hpp:80. EJ0001: Failed to initialize the HCCP process. Reason: Maybe the last training process is running. Solution: Wait for 10s after killing the last training process and try again. TraceBack (most recent call last): tsd client wait response fail, device response code[1]. unknown device error.[FUNC:WaitRsp][FILE:process_mode_manager.cpp][LINE:270] Traceback (most recent call last): File "bin/train_ddp.py", line 122, in <module> main() File "bin/train_ddp.py", line 97, in main task.to_distributed(args.nodes, args.node_id, args.gpus, args.gpu) File "/home/liuhangchen/Workspace/eteh-v2-release-offline_export_transfDDP_202311/env_train/eteh/tools/interface/pytorch_backend/th_task.py", line 59, in to_distributed self.trainer.model = DDP(self.model, device_ids=[ File "/usr/local/python3.8.10/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 641, in __init__ dist._verify_params_across_processes(self.process_group, parameters) RuntimeError: [ERROR] HCCL error in: /usr1/01/workspace/j_ctViaEnN/pytorch/torch_npu/csrc/distributed/HCCLUtils.hpp:80. EJ0001: Failed to initialize the HCCP process. Reason: Maybe the last training process is running. Solution: Wait for 10s after killing the last training process and try again. TraceBack (most recent call last): tsd client wait response fail, device response code[1]. unknown device error.[FUNC:WaitRsp][FILE:process_mode_manager.cpp][LINE:270] /usr/local/python3.8.10/lib/python3.8/tempfile.py:818: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmplttd8atn'> _warnings.warn(warn_message, ResourceWarning) /usr/local/python3.8.10/lib/python3.8/tempfile.py:818: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmpiud_t2y7'> _warnings.warn(warn_message, ResourceWarning) /usr/local/python3.8.10/lib/python3.8/tempfile.py:818: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmph9uzpg9i'> _warnings.warn(warn_message, ResourceWarning) Traceback (most recent call last): File "bin/train_ddp.py", line 122, in <module> main() File "bin/train_ddp.py", line 97, in main task.to_distributed(args.nodes, args.node_id, args.gpus, args.gpu) File "/home/liuhangchen/Workspace/eteh-v2-release-offline_export_transfDDP_202311/env_train/eteh/tools/interface/pytorch_backend/th_task.py", line 59, in to_distributed self.trainer.model = DDP(self.model, device_ids=[ File "/usr/local/python3.8.10/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 641, in __init__ dist._verify_params_across_processes(self.process_group, parameters) RuntimeError: [ERROR] HCCL error in: /usr1/01/workspace/j_ctViaEnN/pytorch/torch_npu/csrc/distributed/HCCLUtils.hpp:80. EI0006: Getting socket times out. Reason: Remote Rank did not send the data in time. Please check the reason for the rank being stuck Solution: 1. Check the rank service processes with other errors or no errors in the cluster.2. If this error is reported for all NPUs, check whether the time difference between the earliest and latest errors is greater than the connect timeout interval (120s by default). If so, adjust the timeout interval by using the HCCL_CONNECT_TIMEOUT environment variable.3. Check the connectivity of the communication link between nodes. (For details, see the TLS command and HCCN connectivity check examples.). For details:https://www.hiascend.com/document /usr/local/python3.8.10/lib/python3.8/tempfile.py:818: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmp77wv06bj'> _warnings.warn(warn_message, ResourceWarning) ./run.offline.transDDP.sh: line 73: 74074 Segmentation fault python3 bin/train_ddp.py -train_config ${train_config} -data_config ${data_conf} -train_name HKUST -task_file bin.taskegs.pytorch_backend.task_ctc_att -task_name CtcAttTask -exp_dir ${exp_dir} -num_epochs ${epochs} -seed 100 --split --nodes $num_nodes --node_id $node_rank --gpus $num_gpus --gpu $gpu_id --dist_backend $dist_backend --init_method $init_method ```
你好,我的python版本3.8.10,CAAN版本为7.0RC1,torch版本1.11.0 在跑自己的模型时,单卡训练正常,在跑多卡(4卡)时遇到以下问题: ``` Traceback (most recent call last): File "bin/train_ddp.py", line 122, in <module> main() File "bin/train_ddp.py", line 97, in main task.to_distributed(args.nodes, args.node_id, args.gpus, args.gpu) File "/home/liuhangchen/Workspace/eteh-v2-release-offline_export_transfDDP_202311/env_train/eteh/tools/interface/pytorch_backend/th_task.py", line 59, in to_distributed self.trainer.model = DDP(self.model, device_ids=[ File "/usr/local/python3.8.10/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 641, in __init__ dist._verify_params_across_processes(self.process_group, parameters) RuntimeError: [ERROR] HCCL error in: /usr1/01/workspace/j_ctViaEnN/pytorch/torch_npu/csrc/distributed/HCCLUtils.hpp:80. EJ0001: Failed to initialize the HCCP process. Reason: Maybe the last training process is running. Solution: Wait for 10s after killing the last training process and try again. TraceBack (most recent call last): tsd client wait response fail, device response code[1]. unknown device error.[FUNC:WaitRsp][FILE:process_mode_manager.cpp][LINE:270] Traceback (most recent call last): File "bin/train_ddp.py", line 122, in <module> main() File "bin/train_ddp.py", line 97, in main task.to_distributed(args.nodes, args.node_id, args.gpus, args.gpu) File "/home/liuhangchen/Workspace/eteh-v2-release-offline_export_transfDDP_202311/env_train/eteh/tools/interface/pytorch_backend/th_task.py", line 59, in to_distributed self.trainer.model = DDP(self.model, device_ids=[ File "/usr/local/python3.8.10/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 641, in __init__ dist._verify_params_across_processes(self.process_group, parameters) RuntimeError: [ERROR] HCCL error in: /usr1/01/workspace/j_ctViaEnN/pytorch/torch_npu/csrc/distributed/HCCLUtils.hpp:80. EJ0001: Failed to initialize the HCCP process. Reason: Maybe the last training process is running. Solution: Wait for 10s after killing the last training process and try again. TraceBack (most recent call last): tsd client wait response fail, device response code[1]. unknown device error.[FUNC:WaitRsp][FILE:process_mode_manager.cpp][LINE:270] Traceback (most recent call last): File "bin/train_ddp.py", line 122, in <module> main() File "bin/train_ddp.py", line 97, in main task.to_distributed(args.nodes, args.node_id, args.gpus, args.gpu) File "/home/liuhangchen/Workspace/eteh-v2-release-offline_export_transfDDP_202311/env_train/eteh/tools/interface/pytorch_backend/th_task.py", line 59, in to_distributed self.trainer.model = DDP(self.model, device_ids=[ File "/usr/local/python3.8.10/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 641, in __init__ dist._verify_params_across_processes(self.process_group, parameters) RuntimeError: [ERROR] HCCL error in: /usr1/01/workspace/j_ctViaEnN/pytorch/torch_npu/csrc/distributed/HCCLUtils.hpp:80. EJ0001: Failed to initialize the HCCP process. Reason: Maybe the last training process is running. Solution: Wait for 10s after killing the last training process and try again. TraceBack (most recent call last): tsd client wait response fail, device response code[1]. unknown device error.[FUNC:WaitRsp][FILE:process_mode_manager.cpp][LINE:270] /usr/local/python3.8.10/lib/python3.8/tempfile.py:818: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmplttd8atn'> _warnings.warn(warn_message, ResourceWarning) /usr/local/python3.8.10/lib/python3.8/tempfile.py:818: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmpiud_t2y7'> _warnings.warn(warn_message, ResourceWarning) /usr/local/python3.8.10/lib/python3.8/tempfile.py:818: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmph9uzpg9i'> _warnings.warn(warn_message, ResourceWarning) Traceback (most recent call last): File "bin/train_ddp.py", line 122, in <module> main() File "bin/train_ddp.py", line 97, in main task.to_distributed(args.nodes, args.node_id, args.gpus, args.gpu) File "/home/liuhangchen/Workspace/eteh-v2-release-offline_export_transfDDP_202311/env_train/eteh/tools/interface/pytorch_backend/th_task.py", line 59, in to_distributed self.trainer.model = DDP(self.model, device_ids=[ File "/usr/local/python3.8.10/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 641, in __init__ dist._verify_params_across_processes(self.process_group, parameters) RuntimeError: [ERROR] HCCL error in: /usr1/01/workspace/j_ctViaEnN/pytorch/torch_npu/csrc/distributed/HCCLUtils.hpp:80. EI0006: Getting socket times out. Reason: Remote Rank did not send the data in time. Please check the reason for the rank being stuck Solution: 1. Check the rank service processes with other errors or no errors in the cluster.2. If this error is reported for all NPUs, check whether the time difference between the earliest and latest errors is greater than the connect timeout interval (120s by default). If so, adjust the timeout interval by using the HCCL_CONNECT_TIMEOUT environment variable.3. Check the connectivity of the communication link between nodes. (For details, see the TLS command and HCCN connectivity check examples.). For details:https://www.hiascend.com/document /usr/local/python3.8.10/lib/python3.8/tempfile.py:818: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmp77wv06bj'> _warnings.warn(warn_message, ResourceWarning) ./run.offline.transDDP.sh: line 73: 74074 Segmentation fault python3 bin/train_ddp.py -train_config ${train_config} -data_config ${data_conf} -train_name HKUST -task_file bin.taskegs.pytorch_backend.task_ctc_att -task_name CtcAttTask -exp_dir ${exp_dir} -num_epochs ${epochs} -seed 100 --split --nodes $num_nodes --node_id $node_rank --gpus $num_gpus --gpu $gpu_id --dist_backend $dist_backend --init_method $init_method ```
Comments (
9
)
Sign in
to comment
Status
DONE
TODO
ACCEPTED
Analysing
Feedback
WIP
Replied
CLOSED
DONE
REJECTED
Assignees
Not set
Labels
Not set
Projects
Unprojected
Unprojected
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(2)
Python
1
https://gitee.com/ascend/pytorch.git
git@gitee.com:ascend/pytorch.git
ascend
pytorch
pytorch
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register