Unverified Commit 4327d712 authored by Chao Ma's avatar Chao Ma Committed by GitHub
Browse files

[Distributed] Check num_workers and num_samplers (#2108)

* check num_workers

* update

* update

* update

* update

* update

* update
parent 33a8bb93
......@@ -322,6 +322,8 @@ if __name__ == '__main__':
parser.add_argument('--local_rank', type=int, help='get rank of the process')
parser.add_argument('--standalone', action='store_true', help='run in the standalone mode')
args = parser.parse_args()
assert args.num_workers == int(os.environ.get('DGL_NUM_SAMPLER')), \
'The num_workers should be the same value with num_samplers.'
print(args)
main(args)
......@@ -486,6 +486,8 @@ if __name__ == '__main__':
parser.add_argument('--remove_edge', default=False, action='store_true',
help="whether to remove edges during sampling")
args = parser.parse_args()
assert args.num_workers == int(os.environ.get('DGL_NUM_SAMPLER')), \
'The num_workers should be the same value with num_samplers.'
print(args)
main(args)
......@@ -57,7 +57,7 @@ def submit_jobs(args, udf_command):
tot_num_clients = args.num_trainers * (1 + args.num_samplers) * len(hosts)
# launch server tasks
server_cmd = 'DGL_ROLE=server'
server_cmd = 'DGL_ROLE=server DGL_NUM_SAMPLER=' + str(args.num_samplers)
server_cmd = server_cmd + ' ' + 'OMP_NUM_THREADS=' + str(args.num_server_threads)
server_cmd = server_cmd + ' ' + 'DGL_NUM_CLIENT=' + str(tot_num_clients)
server_cmd = server_cmd + ' ' + 'DGL_CONF_PATH=' + str(args.part_config)
......@@ -70,7 +70,7 @@ def submit_jobs(args, udf_command):
cmd = 'cd ' + str(args.workspace) + '; ' + cmd
execute_remote(cmd, ip, args.ssh_port, thread_list)
# launch client tasks
client_cmd = 'DGL_DIST_MODE="distributed" DGL_ROLE=client'
client_cmd = 'DGL_DIST_MODE="distributed" DGL_ROLE=client DGL_NUM_SAMPLER=' + str(args.num_samplers)
client_cmd = client_cmd + ' ' + 'DGL_NUM_CLIENT=' + str(tot_num_clients)
client_cmd = client_cmd + ' ' + 'DGL_CONF_PATH=' + str(args.part_config)
client_cmd = client_cmd + ' ' + 'DGL_IP_CONFIG=' + str(args.ip_config)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment