diff options
Diffstat (limited to 'tabulator-mpi/main.cpp')
-rw-r--r-- | tabulator-mpi/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tabulator-mpi/main.cpp b/tabulator-mpi/main.cpp index 959cd8c..cb60ecb 100644 --- a/tabulator-mpi/main.cpp +++ b/tabulator-mpi/main.cpp @@ -33,6 +33,11 @@ int main(int argc, char **argv) { MPI_Comm_rank(MPI_COMM_WORLD, &comm_rank); MPI_Comm_size(MPI_COMM_WORLD, &comm_size); + if (comm_size < 2) { + fprintf(stderr, "at least two processes are required\n"); + return 1; + } + const lib94::warrior **warriors = new const lib94::warrior *[argc - 1]; for (int i = 0; i < argc - 1; ++i) warriors[i] = load_warrior(argv[i + 1]); |