Skip to content

Conversation

@danleifeng
Copy link
Contributor

PR types

Bug fixes

PR changes

OPs

Describe

目前动态图nccl初始化时由于inet_pton函数只支持传入具体的ip地址,不支持传入域名,因此跑多机动态图任务(paddlecloud上)时程序会挂掉

if (inet_pton(AF_INET, ip, &serv_addr.sin_addr) <= 0) {
    PADDLE_THROW(platform::errors::Unavailable("Open address %s failed.", ep));
  }

解决方法:
在函数inet_pton前通过gethostbyname函数做解析

在paddlecloud上验证通过:

I1019 19:28:28.448112  1570 nccl_context.cc:105] nccl_context host: job-0bb5f8d7770b19f0-trainer-0.a5139f34-68ad-5528-8bb7-a906d3bfbf7b
I1019 19:28:28.453824  1570 nccl_context.cc:114] nccl_context host->ip: 10.127.31.20
...
I1019 19:28:28.453972  1570 nccl_context.cc:105] nccl_context host: job-0bb5f8d7770b19f0-trainer-1.a5139f34-68ad-5528-8bb7-a906d3bfbf7b
I1019 19:28:28.470842  1570 nccl_context.cc:114] nccl_context host->ip: 10.127.19.141
....

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@danleifeng danleifeng requested a review from zhiqiu October 20, 2020 07:03
Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants