Explorar o código

Add help to MPI LU

Samuel Thibault %!s(int64=12) %!d(string=hai) anos
pai
achega
8b49014e07
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      mpi/examples/mpi_lu/plu_example.c

+ 6 - 0
mpi/examples/mpi_lu/plu_example.c

@@ -109,6 +109,12 @@ static void parse_args(int rank, int argc, char **argv)
 			char *argptr;
 			q = strtol(argv[++i], &argptr, 10);
 		}
+
+		if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0 || strcmp(argv[i], "--help") == 0) {
+			fprintf(stderr,"usage: %s [-size n] [-nblocks b] [-check] [-display] [-numa] [-p p] [-q q]\n", argv[0]);
+			fprintf(stderr,"\np * q must be equal to the number of MPI nodes\n");
+			exit(0);
+		}
 	}
 }