Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

多机多卡训练出错

Open gobigrassland opened this issue 6 years ago • 3 comments

 File "train.py", line 55, in <module>
    main()
  File "train.py", line 51, in main
    ins.train()
  File "/export/data/PLSC-master/plsc/entry.py", line 927, in train
    exe.run(self.startup_program)
  File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/executor.py", line 783, in run
    six.reraise(*sys.exc_info())
  File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/executor.py", line 778, in run
    use_program_cache=use_program_cache)
  File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/executor.py", line 831, in _run_impl
    use_program_cache=use_program_cache)
  File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/executor.py", line 905, in _run_program
    fetch_var_name)
paddle.fluid.core_avx.EnforceNotMet:

--------------------------------------------
C++ Call Stacks (More useful to developers):
--------------------------------------------
0   std::string paddle::platform::GetTraceBackString<char const*>(char const*&&, char const*, int)
1   paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int)
2   paddle::platform::NCCLCommContext::CreateNCCLComm(ncclUniqueId*, int, int, int, int)
3   paddle::operators::CCommInitOp::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&) const
4   paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, paddle::platform::Place const&)
5   paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool)
6   paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool, std::vector<std::string, std::allocator<std::string> > const&, bool, bool)

----------------------
Error Message Summary:
----------------------
Error: An error occurred here. There is no accurate error hint for this error yet. We are continuously in the process of increasing hint for this kind of error check. It would be helpful if you could inform us of how this conversion went by opening a github issue. And we will resolve it with high priority.
  - New issue link: https://github.com/PaddlePaddle/Paddle/issues/new
  - Recommended issue content: all error stack information
  [unhandled system error] at (/paddle/paddle/fluid/platform/collective_helper.cc:67)
  [operator < c_comm_init > error]

我使用机房机器进行多机分布式训练,出现了上述错误,不知是什么原因导致的。看提示信息可能是nccl初始化出错,也不知道具体是什么原因导致这个问题,而使用其他框架如tensorflow则多机多卡则是正常的。麻烦各位给个建议

gobigrassland avatar Sep 23 '20 06:09 gobigrassland

请问您环境上的nccl版本是?

wanghaoshuang avatar Sep 23 '20 16:09 wanghaoshuang

今天做了一个对比实验

源码: Paddle/PLSC项目 环境: nccl版本2.4.7 paddlepaddle-gpu版本1.7.0.post97 python版本3.7

实验1:在两台机器上,分别使用2块v100,出现了上述问题(这两台机器可以相互ping通的) 实验2:在单台机器上,分别启动2个docker,模拟多机分布式训练,就可以正常训练。 实验表明代码和环境都没有问题,多台机器又可以ping通,真不知道是什么地方出错了?

gobigrassland avatar Sep 24 '20 01:09 gobigrassland

请问您环境上的nccl版本是?

我也出现了一模一样的问题,单机多容器可以正常运行,但是多机多卡和多机单卡都出现如下错误。我的NCCL版本是2.7.8。

----------------------
Error Message Summary:
----------------------
ExternalError:  Nccl error, unhandled system error  at (/paddle/paddle/fluid/platform/nccl_helper.h:71)

INFO 2020-10-29 01:24:22,711 utils.py:274] terminate all the procs
ERROR 2020-10-29 01:24:22,711 utils.py:416] ABORT!!! Out of all 2 trainers, the trainer process with rank=[0] was aborted. Please check its log.
INFO 2020-10-29 01:24:25,715 utils.py:274] terminate all the procs

haideeyuan avatar Oct 29 '20 01:10 haideeyuan