Skip to content

Commit 3be0eb9

Browse files
authored
fix multi-node pipeline python tests (#885)
1 parent ef4168d commit 3be0eb9

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

python/mscclpp_benchmark/allreduce_bench.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,8 @@ def get_netinterface_info():
251251
shm_comm.Free()
252252
cp.cuda.Device(MPI.COMM_WORLD.rank % N_GPUS_PER_NODE).use()
253253

254-
# create a MscclppGroup
255-
network_interface, my_ip = get_netinterface_info()
256-
root_ip = MPI.COMM_WORLD.bcast(my_ip, root=0)
257-
ifIpPortTrio = network_interface + ":" + root_ip + ":50000" # some random port
258-
mscclpp_group = CommGroup(interfaceIpPortTrio=ifIpPortTrio, rank=MPI.COMM_WORLD.rank, size=MPI.COMM_WORLD.size)
254+
# create a MscclppGroup (MPI-based bootstrap; ephemeral port, matches executor_test.py)
255+
mscclpp_group = CommGroup(MPI.COMM_WORLD)
259256

260257
# create a NcclComm
261258
if MPI.COMM_WORLD.rank == 0:

test/deploy/pytest.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e
33

44
if [[ $OMPI_COMM_WORLD_RANK == 0 ]]
55
then
6-
pytest /root/mscclpp/python/test/test_mscclpp.py -x -v
6+
python3 -m pytest /root/mscclpp/python/test/test_mscclpp.py -x -v
77
else
8-
pytest /root/mscclpp/python/test/test_mscclpp.py -x 2>&1 >/dev/null
8+
python3 -m pytest /root/mscclpp/python/test/test_mscclpp.py -x 2>&1 >/dev/null
99
fi

test/deploy/run_tests.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function run_pytests()
8282
echo "==================Run python tests================================"
8383
mpirun ${MPI_ARGS} -tag-output -np 16 \
8484
${MSCCLPP_ENV} \
85-
-x MSCCLPP_HOME=/root/mscclpp -npernode 8 bash /root/mscclpp/test/deploy/pytest.sh
85+
-x MSCCLPP_HOME=/root/mscclpp -x PATH="${PATH}" -npernode 8 bash /root/mscclpp/test/deploy/pytest.sh
8686
}
8787

8888
function run_py_benchmark()
@@ -91,9 +91,10 @@ function run_py_benchmark()
9191
mpirun ${MPI_ARGS} -np 16 \
9292
${MSCCLPP_ENV} \
9393
-mca pml ob1 -mca btl ^openib -x NCCL_IB_PCI_RELAXED_ORDERING=1 -x NCCL_SOCKET_IFNAME=eth0 \
94-
-x CUDA_DEVICE_ORDER=PCI_BUS_ID -x NCCL_NET_GDR_LEVEL=5 -x NCCL_TOPO_FILE=/opt/microsoft/ndv4-topo.xml \
95-
-x NCCL_NET_PLUGIN=none -x NCCL_IB_DISABLE=0 -x NCCL_MIN_NCHANNELS=32 -x NCCL_DEBUG=WARN -x NCCL_P2P_DISABLE=0 -x NCCL_SHM_DISABLE=0 \
96-
-x MSCCLPP_HOME=/root/mscclpp -npernode 8 python3 /root/mscclpp/python/mscclpp_benchmark/allreduce_bench.py
94+
-x CUDA_DEVICE_ORDER=PCI_BUS_ID \
95+
-x NCCL_NET_PLUGIN=none -x NCCL_IB_DISABLE=0 -x NCCL_MIN_NCHANNELS=32 -x NCCL_NVLS_ENABLE=0 \
96+
-x NCCL_DEBUG=WARN -x NCCL_P2P_DISABLE=0 -x NCCL_SHM_DISABLE=0 \
97+
-x MSCCLPP_HOME=/root/mscclpp -x PATH="${PATH}" -npernode 8 python3 /root/mscclpp/python/mscclpp_benchmark/allreduce_bench.py
9798
}
9899

99100
if [ $# -lt 1 ]; then

0 commit comments

Comments
 (0)