Skip to content

Instantly share code, notes, and snippets.

@zarzen
Created April 16, 2021 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zarzen/ede0b9ccae9b5e6fa4722a416962b189 to your computer and use it in GitHub Desktop.
Save zarzen/ede0b9ccae9b5e6fa4722a416962b189 to your computer and use it in GitHub Desktop.
nccl-tests mpirun launch
#!/bin/bash
NP=8
HOSTS="127.0.0.1:8"
MPI_HOME="/opt/amazon/openmpi"
TEST_BIN="/home/ubuntu/nccl-tests/build/all_reduce_perf"
MPI_BIN="${MPI_HOME}/bin/mpirun"
LD_LIBRARY_PATH="${MPI_HOME}/lib":$LD_LIBRARY_PATH
cmd="${MPI_BIN} -np ${NP} \
-H ${HOSTS} \
-bind-to none -map-by slot \
-x PATH \
-x NCCL_DEBUG=INFO \
-x NCCL_TREE_THRESHOLD=0 \
-x LD_LIBRARY_PATH=${LD_LIBRARY_PATH} \
-mca btl ^openib \
-mca btl_tcp_if_exclude lo,docker0 \
${TEST_BIN} -b 128K -e 128M -f 2 "
eval ${cmd}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment