diff --git a/python/paddle/fluid/tests/book/CMakeLists.txt b/python/paddle/fluid/tests/book/CMakeLists.txt index 6f717302468af3b57db69ffd6009563423481a33..09c650f16e2fb4ae8d8e53f9d184afb15dfe5b59 100644 --- a/python/paddle/fluid/tests/book/CMakeLists.txt +++ b/python/paddle/fluid/tests/book/CMakeLists.txt @@ -9,7 +9,7 @@ endforeach() set_tests_properties(test_word2vec_book PROPERTIES TIMEOUT 120) set_tests_properties(test_recognize_digits PROPERTIES TIMEOUT 120) set_tests_properties(test_image_classification PROPERTIES TIMEOUT 200) -set_tests_properties(test_label_semantic_roles PROPERTIES TIMEOUT 120) +set_tests_properties(test_label_semantic_roles PROPERTIES TIMEOUT 240) set_tests_properties(test_machine_translation PROPERTIES TIMEOUT 120) set_tests_properties(test_rnn_encoder_decoder PROPERTIES TIMEOUT 120) set_tests_properties(test_fit_a_line PROPERTIES TIMEOUT 120) diff --git a/python/paddle/fluid/tests/unittests/test_fleet_launch_ps.sh b/python/paddle/fluid/tests/unittests/test_fleet_launch_ps.sh index 21875851bf53040ead644649ac9ea651531e951b..67a8d7e57502581d2ba7527ad562790798267a1d 100644 --- a/python/paddle/fluid/tests/unittests/test_fleet_launch_ps.sh +++ b/python/paddle/fluid/tests/unittests/test_fleet_launch_ps.sh @@ -16,27 +16,19 @@ 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" - else - echo "test pserver launch failed" - exit -1 - fi +server_port_0=${PADDLE_DIST_UT_PORT} +server_port_1=$(( PADDLE_DIST_UT_PORT + 1 )) +worker_port_0=$(( PADDLE_DIST_UT_PORT + 2 )) +worker_port_1=$(( PADDLE_DIST_UT_PORT + 3 )) +heter_worker_port_0=$(( PADDLE_DIST_UT_PORT + 4 )) +heter_worker_port_1=$(( PADDLE_DIST_UT_PORT + 5 )) - 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 - echo "test pserver launch failed" - exit -1 - fi +function test_launch_ps(){ - 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 + 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:${worker_port_0},127.0.0.1:${worker_port_1}" \ + fleet_ps_training.py 2> ut.elog if grep -q "server are killed" ut.elog; then echo "test pserver launch succeed" else @@ -46,7 +38,11 @@ function test_launch_ps(){ } function test_launch_ps_heter(){ - python -m paddle.distributed.fleet.launch --server_num=2 --worker_num=2 --heter_worker_num=2 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:${worker_port_0},127.0.0.1:${worker_port_1}" \ + --heter_workers="127.0.0.1:${heter_worker_port_0},127.0.0.1:${heter_worker_port_1}" \ + fleet_ps_training.py 2> ut.elog if grep -q "server are killed" ut.elog; then echo "test heter pserver launch succeed" else