Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
8cc45316
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8cc45316
编写于
6月 07, 2017
作者:
H
helinwang
提交者:
GitHub
6月 07, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2414 from helinwang/fix_unittest
try to fix unit test test_ProtoServer, test_TrainerOnePass
上级
29a0bc83
4c01cfa1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
8 deletion
+12
-8
Dockerfile
Dockerfile
+2
-1
paddle/pserver/LightNetwork.cpp
paddle/pserver/LightNetwork.cpp
+10
-7
未找到文件。
Dockerfile
浏览文件 @
8cc45316
...
@@ -30,7 +30,8 @@ RUN apt-get update && \
...
@@ -30,7 +30,8 @@ RUN apt-get update && \
python-numpy python-matplotlib gcc g++
\
python-numpy python-matplotlib gcc g++
\
automake locales clang-format-3.8 swig doxygen cmake
\
automake locales clang-format-3.8 swig doxygen cmake
\
liblapack-dev liblapacke-dev libboost-dev
\
liblapack-dev liblapacke-dev libboost-dev
\
clang-3.8 llvm-3.8 libclang-3.8-dev
&&
\
clang-3.8 llvm-3.8 libclang-3.8-dev
\
net-tools
&&
\
apt-get clean
-y
apt-get clean
-y
# Install Go
# Install Go
...
...
paddle/pserver/LightNetwork.cpp
浏览文件 @
8cc45316
...
@@ -383,20 +383,23 @@ void SocketClient::TcpClient(const std::string &serverAddr, int serverPort) {
...
@@ -383,20 +383,23 @@ void SocketClient::TcpClient(const std::string &serverAddr, int serverPort) {
setOption
(
sockfd
);
setOption
(
sockfd
);
/// Now connect to the server
/// Now connect to the server
int
retry_second
=
0
;
int
retry_count
=
0
;
int
error
=
0
;
do
{
do
{
error
=
connect
(
sockfd
,
(
sockaddr
*
)
&
serv_addr
,
sizeof
(
serv_addr
));
if
(
connect
(
sockfd
,
(
sockaddr
*
)
&
serv_addr
,
sizeof
(
serv_addr
))
==
0
)
{
if
(
error
==
ECONNREFUSED
)
{
break
;
}
if
(
errno
==
ECONNREFUSED
)
{
LOG
(
WARNING
)
<<
"connection refused by pserver, try again!"
;
LOG
(
WARNING
)
<<
"connection refused by pserver, try again!"
;
if
(
retry_
second
++
>=
7
)
{
if
(
retry_
count
++
>=
7
)
{
LOG
(
FATAL
)
<<
"connection refused by pserver, maybe pserver failed!"
;
LOG
(
FATAL
)
<<
"connection refused by pserver, maybe pserver failed!"
;
}
}
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
1
));
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
1
));
}
else
{
}
else
{
PCHECK
(
error
>=
0
)
<<
"ERROR connecting to "
<<
serverAddr
;
PCHECK
(
errno
!=
0
)
<<
"ERROR connecting to "
<<
serverAddr
<<
":"
<<
serverPort
<<
"errorno: "
<<
errno
;
}
}
}
while
(
err
or
==
ECONNREFUSED
);
}
while
(
err
no
==
ECONNREFUSED
);
channel_
.
reset
(
new
SocketChannel
(
sockfd
,
serverAddr
));
channel_
.
reset
(
new
SocketChannel
(
sockfd
,
serverAddr
));
tcpRdma_
=
F_TCP
;
tcpRdma_
=
F_TCP
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录