Skip to content

Commit

Permalink
Add PMIx Horovod test
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
  • Loading branch information
flx42 committed Feb 8, 2023
1 parent 5164d82 commit 863ccf3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/mpi.bats
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ function teardown() {
[ "$(sort -n <<< ${output})" == "$(seq 0 3)" ]
}

@test "PMIx Horovod" {
run_srun --mpi=pmix --ntasks=8 --container-image=nvcr.io/nvidia/tensorflow:23.01-tf2-py3 \
python -c "import os ; import horovod.tensorflow as hvd ; hvd.init(); assert(int(os.getenv('PMIX_RANK')) == hvd.rank())"
}

@test "PMI2 file descriptor" {
run_srun --mpi=pmi2 --ntasks=4 --container-image=ubuntu:18.04 bash -c '[ -n "${PMI_FD}" ] && realpath /proc/self/fd/${PMI_FD} | grep -q socket'
}
Expand Down

0 comments on commit 863ccf3

Please sign in to comment.