Fix MPI test usage
Only display usage from rank 0 and exit instead of continuing (and seg fault).
This commit is contained in:
parent
b16cc5d197
commit
9de361a1b9
@ -47,7 +47,9 @@ int main(int argc, char *argv[]) {
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
|
||||
if (argc < size) {
|
||||
if (rank == 0)
|
||||
printf("Usage : %s <GPU list per rank>\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int gpu = atoi(argv[rank+1]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user