ソースを参照

Add help to MPI LU

Samuel Thibault 12 年 前
コミット
8b49014e07
共有1 個のファイルを変更した6 個の追加0 個の削除を含む
  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);
+		}
 	}
 }