Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/nccl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSylvain Jeaugey <sjeaugey@nvidia.com>2016-04-19 20:43:38 +0300
committerSylvain Jeaugey <sjeaugey@nvidia.com>2016-04-19 20:43:38 +0300
commit9de361a1b97b55f1669107e94efc95c1a299234c (patch)
treed1102a5404fb917594798d2205a9a8a08121d659 /test
parentb16cc5d197a03ae2ef21c131a63805b36c15b2f5 (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.cu4
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]);