diff options
author | Sylvain Jeaugey <sjeaugey@nvidia.com> | 2016-04-19 20:43:38 +0300 |
---|---|---|
committer | Sylvain Jeaugey <sjeaugey@nvidia.com> | 2016-04-19 20:43:38 +0300 |
commit | 9de361a1b97b55f1669107e94efc95c1a299234c (patch) | |
tree | d1102a5404fb917594798d2205a9a8a08121d659 /test | |
parent | b16cc5d197a03ae2ef21c131a63805b36c15b2f5 (diff) |
Fix MPI test usage
Only display usage from rank 0 and exit instead of continuing (and seg fault).
Diffstat (limited to 'test')
-rw-r--r-- | test/mpi/mpi_test.cu | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/mpi/mpi_test.cu b/test/mpi/mpi_test.cu index 54ebbce..ee86edc 100644 --- a/test/mpi/mpi_test.cu +++ b/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 <GPU list per rank>\n", argv[0]); + if (rank == 0) + printf("Usage : %s <GPU list per rank>\n", argv[0]); + exit(1); } int gpu = atoi(argv[rank+1]); |