Optimize cpu allreduce test case
This commit is contained in:
parent
57123f816c
commit
1922113083
|
@ -17,10 +17,11 @@
|
||||||
export MS_WORKER_NUM=8
|
export MS_WORKER_NUM=8
|
||||||
export MS_SCHED_HOST=127.0.0.1
|
export MS_SCHED_HOST=127.0.0.1
|
||||||
export MS_SCHED_PORT=$2
|
export MS_SCHED_PORT=$2
|
||||||
|
export GLOG_v=1
|
||||||
|
|
||||||
# Launch 1 scheduler.
|
# Launch 1 scheduler.
|
||||||
export MS_ROLE=MS_SCHED
|
export MS_ROLE=MS_SCHED
|
||||||
python3 $1 >scheduler.txt 2>&1 &
|
python3 $1 >scheduler.log 2>&1 &
|
||||||
sched_pid=${!}
|
sched_pid=${!}
|
||||||
echo "scheduler start success!"
|
echo "scheduler start success!"
|
||||||
|
|
||||||
|
@ -29,7 +30,7 @@ export MS_ROLE=MS_WORKER
|
||||||
process_pid=()
|
process_pid=()
|
||||||
for((i=0;i<8;i++));
|
for((i=0;i<8;i++));
|
||||||
do
|
do
|
||||||
python3 $1 >worker_$i.txt 2>&1 &
|
python3 $1 >worker_$i.log 2>&1 &
|
||||||
echo "worker ${i} start success with pid ${!}"
|
echo "worker ${i} start success with pid ${!}"
|
||||||
process_pid[${i}]=${!}
|
process_pid[${i}]=${!}
|
||||||
done
|
done
|
||||||
|
|
|
@ -33,6 +33,11 @@ def test_allreduce():
|
||||||
if sys.platform != 'linux':
|
if sys.platform != 'linux':
|
||||||
return
|
return
|
||||||
return_code = os.system("bash build_allreduce_net_cluster.sh run_allreduce.py 8119")
|
return_code = os.system("bash build_allreduce_net_cluster.sh run_allreduce.py 8119")
|
||||||
|
if return_code != 0:
|
||||||
|
os.system(f"echo '\n**************** Worker Log ****************'")
|
||||||
|
os.system(f"grep -E 'ERROR|Error|error' -C 15 ./worker*.log")
|
||||||
|
os.system(f"echo '\n**************** Scheduler Log ****************'")
|
||||||
|
os.system(f"grep -E 'ERROR|Error|error' -C 15 ./scheduler.log")
|
||||||
assert return_code == 0
|
assert return_code == 0
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue