summaryrefslogtreecommitdiff
path: root/tabulator-mpi/main.cpp
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2023-05-31 01:30:26 -0400
committerBenji Dial <benji@benjidial.net>2023-05-31 01:30:26 -0400
commit6aa768c7c840fa326596a3b40a0954a9f475ed63 (patch)
treeab7ff64d68532d69e8a9f222a88e4e84db3bbd51 /tabulator-mpi/main.cpp
parent21d36220c869e4e28d437993a082b12b67a2428f (diff)
downloadlib94-6aa768c7c840fa326596a3b40a0954a9f475ed63.tar.gz
new tabulator running look
Diffstat (limited to 'tabulator-mpi/main.cpp')
-rw-r--r--tabulator-mpi/main.cpp5
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]);