Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
bdae7ed3
P
Paddle
项目概览
PaddlePaddle
/
Paddle
12 个月 前同步成功
通知
2292
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
bdae7ed3
编写于
1月 18, 2021
作者:
G
gongweibao
提交者:
GitHub
1月 18, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix potential port conflicts. (#30508)
Fix potential port conflicts
上级
843dc3cd
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
10 addition
and
4 deletion
+10
-4
python/paddle/fluid/tests/unittests/CMakeLists.txt
python/paddle/fluid/tests/unittests/CMakeLists.txt
+5
-2
python/paddle/fluid/tests/unittests/test_fleet_launch_ps.sh
python/paddle/fluid/tests/unittests/test_fleet_launch_ps.sh
+5
-2
未找到文件。
python/paddle/fluid/tests/unittests/CMakeLists.txt
浏览文件 @
bdae7ed3
...
...
@@ -516,7 +516,6 @@ if(WITH_DISTRIBUTE)
py_test_modules
(
test_launch_coverage MODULES test_launch_coverage
)
endif
()
bash_test_modules
(
test_fleet_launch_ps START_BASH test_fleet_launch_ps.sh ENVS PADDLE_BINARY_DIR=
${
PADDLE_BINARY_DIR
}
)
bash_test_modules
(
test_fleetrun START_BASH test_fleetrun.sh ENVS PADDLE_BINARY_DIR=
${
PADDLE_BINARY_DIR
}
)
bash_test_modules
(
test_fleet_run_random_port START_BASH test_fleet_run_random_port.sh ENVS PADDLE_BINARY_DIR=
${
PADDLE_BINARY_DIR
}
)
bash_test_modules
(
test_fleet_launch_async START_BASH test_fleet_launch_async.sh ENVS PADDLE_BINARY_DIR=
${
PADDLE_BINARY_DIR
}
)
...
...
@@ -527,8 +526,12 @@ if(WITH_DISTRIBUTE)
set
(
dist_ut_port 20001
)
foreach
(
TEST_OP
${
DIST_TEST_OPS
}
)
bash_test_modules
(
${
TEST_OP
}
START_BASH dist_test.sh SERIAL LABELS
"RUN_TYPE=EXCLUSIVE"
ENVS
"PADDLE_DIST_UT_PORT=
${
dist_ut_port
}
"
)
MATH
(
EXPR dist_ut_port
"
${
dist_ut_port
}
+50"
)
MATH
(
EXPR dist_ut_port
"
${
dist_ut_port
}
+40"
)
if
(
dist_ut_port GREATER_EQUAL 22998
)
message
(
FATAL_ERROR
"available ports have been exhausted:
${
dist_ut_port
}
"
)
endif
()
endforeach
(
TEST_OP
)
bash_test_modules
(
test_fleet_launch_ps START_BASH test_fleet_launch_ps.sh SERIAL LABELS
"RUN_TYPE=EXCLUSIVE"
ENVS
"PADDLE_DIST_UT_PORT=
${
dist_ut_port
}
"
PADDLE_BINARY_DIR=
${
PADDLE_BINARY_DIR
}
)
endif
(
NOT APPLE
)
endif
()
...
...
python/paddle/fluid/tests/unittests/test_fleet_launch_ps.sh
浏览文件 @
bdae7ed3
...
...
@@ -17,6 +17,9 @@
set
-e
function
test_launch_ps
(){
server_port_0
=
${
PADDLE_DIST_UT_PORT
}
server_port_1
=
$((
PADDLE_DIST_UT_PORT
+
1
))
echo
"server_port_0:
${
server_port_0
}
server_port_1=
${
server_port_1
}
"
python
-m
paddle.distributed.fleet.launch
--server_num
=
2
--worker_num
=
2 fleet_ps_training.py 2> ut.elog
if
grep
-q
"server are killed"
ut.elog
;
then
echo
"test pserver launch succeed"
...
...
@@ -25,7 +28,7 @@ function test_launch_ps(){
exit
-1
fi
python
-m
paddle.distributed.fleet.launch
--servers
=
"127.0.0.1:
6780,127.0.0.1:6781
"
--workers
=
"127.0.0.1:6782,127.0.0.1:6783"
fleet_ps_training.py 2> ut.elog
python
-m
paddle.distributed.fleet.launch
--servers
=
"127.0.0.1:
${
server_port_0
}
,127.0.0.1:
${
server_port_1
}
"
--workers
=
"127.0.0.1:6782,127.0.0.1:6783"
fleet_ps_training.py 2> ut.elog
if
grep
-q
"server are killed"
ut.elog
;
then
echo
"test pserver launch succeed"
else
...
...
@@ -33,7 +36,7 @@ function test_launch_ps(){
exit
-1
fi
python
-m
paddle.distributed.fleet.launch
--servers
=
"127.0.0.1:
6780,127.0.0.1:6781
"
--workers
=
"127.0.0.1,127.0.0.1"
fleet_ps_training.py 2> ut.elog
python
-m
paddle.distributed.fleet.launch
--servers
=
"127.0.0.1:
${
server_port_0
}
,127.0.0.1:
${
server_port_1
}
"
--workers
=
"127.0.0.1,127.0.0.1"
fleet_ps_training.py 2> ut.elog
if
grep
-q
"server are killed"
ut.elog
;
then
echo
"test pserver launch succeed"
else
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录