Skip to content

Commit

Permalink
[Fix] reduce concurrent client/server processes to avoid port already…
Browse files Browse the repository at this point in the history
… in use (dmlc#3697)
  • Loading branch information
Rhett-Ying authored Jan 28, 2022
1 parent 6255c95 commit bf5497a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions tests/distributed/test_dist_graph_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,9 @@ def test_server_client():
check_server_client(True, 1, 1)
check_server_client(False, 1, 1)
check_server_client(True, 2, 2)
check_server_client(True, 1, 1, 5)
check_server_client(False, 1, 1, 5)
check_server_client(True, 2, 2, 5)
check_server_client(True, 1, 1, 2)
check_server_client(False, 1, 1, 2)
check_server_client(True, 2, 2, 2)

@unittest.skipIf(os.name == 'nt', reason='Do not support windows yet')
@unittest.skipIf(dgl.backend.backend_name == "tensorflow", reason="TF doesn't support distributed DistEmbedding")
Expand All @@ -597,9 +597,9 @@ def test_dist_emb_server_client():
check_dist_emb_server_client(True, 1, 1)
check_dist_emb_server_client(False, 1, 1)
check_dist_emb_server_client(True, 2, 2)
check_dist_emb_server_client(True, 1, 1, 5)
check_dist_emb_server_client(False, 1, 1, 5)
check_dist_emb_server_client(True, 2, 2, 5)
check_dist_emb_server_client(True, 1, 1, 2)
check_dist_emb_server_client(False, 1, 1, 2)
check_dist_emb_server_client(True, 2, 2, 2)

@unittest.skipIf(dgl.backend.backend_name == "tensorflow", reason="TF doesn't support some of operations in DistGraph")
@unittest.skipIf(dgl.backend.backend_name == "mxnet", reason="Turn off Mxnet support")
Expand Down
4 changes: 2 additions & 2 deletions tests/distributed/test_mp_dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def check_neg_dataloader(g, tmpdir, num_server, num_workers):
@pytest.mark.parametrize("num_workers", [0, 4])
@pytest.mark.parametrize("drop_last", [True, False])
@pytest.mark.parametrize("reshuffle", [True, False])
@pytest.mark.parametrize("num_groups", [1, 5])
@pytest.mark.parametrize("num_groups", [1, 2])
def test_dist_dataloader(tmpdir, num_server, num_workers, drop_last, reshuffle, num_groups):
reset_envs()
generate_ip_config("mp_ip_config.txt", num_server, num_server)
Expand Down Expand Up @@ -451,7 +451,7 @@ def test_neg_dataloader(tmpdir, num_server, num_workers):
test_dataloader(Path(tmpdirname), 3, 4, 'node')
test_dataloader(Path(tmpdirname), 3, 4, 'edge')
test_neg_dataloader(Path(tmpdirname), 3, 4)
for num_groups in [1, 5]:
for num_groups in [1, 2]:
test_dist_dataloader(Path(tmpdirname), 3, 0, True, True, num_groups)
test_dist_dataloader(Path(tmpdirname), 3, 4, True, True, num_groups)
test_dist_dataloader(Path(tmpdirname), 3, 0, True, False, num_groups)
Expand Down
4 changes: 2 additions & 2 deletions tests/distributed/test_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ def test_multi_client_groups():
num_servers = 1
generate_ip_config(ip_config, num_machines, num_servers)
# presssue test
num_clients = 15
num_groups = 15
num_clients = 2
num_groups = 2
ctx = mp.get_context('spawn')
pserver_list = []
for i in range(num_servers*num_machines):
Expand Down

0 comments on commit bf5497a

Please sign in to comment.