From 6e57ed83dfa4acb05b2b5195231e525b29932cb1 Mon Sep 17 00:00:00 2001 From: Sylvain Jeaugey Date: Tue, 19 Apr 2016 10:43:38 -0700 Subject: [PATCH] Fix MPI test usage Only display usage from rank 0 and exit instead of continuing (and seg fault). [ROCm/rccl commit: 9de361a1b97b55f1669107e94efc95c1a299234c] --- projects/rccl/test/mpi/mpi_test.cu | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/rccl/test/mpi/mpi_test.cu b/projects/rccl/test/mpi/mpi_test.cu index 54ebbce995..ee86edcb3b 100644 --- a/projects/rccl/test/mpi/mpi_test.cu +++ b/projects/rccl/test/mpi/mpi_test.cu @@ -47,7 +47,9 @@ int main(int argc, char *argv[]) { MPI_Comm_rank(MPI_COMM_WORLD, &rank); if (argc < size) { - printf("Usage : %s \n", argv[0]); + if (rank == 0) + printf("Usage : %s \n", argv[0]); + exit(1); } int gpu = atoi(argv[rank+1]);