summaryrefslogtreecommitdiff
path: root/tabulator-mpi/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tabulator-mpi/main.cpp')
-rw-r--r--tabulator-mpi/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tabulator-mpi/main.cpp b/tabulator-mpi/main.cpp
index e6e1a27..cd17044 100644
--- a/tabulator-mpi/main.cpp
+++ b/tabulator-mpi/main.cpp
@@ -42,6 +42,15 @@ int main(int argc, char **argv) {
for (int i = 0; i < argc - 1; ++i)
warriors[i] = load_warrior(argv[i + 1]);
+ for (int i = 0; i < argc - 1; ++i)
+ for (int j = i + 1; j < argc - 1; ++j) {
+ const lib94::warrior *wbuf[2] = {warriors[i], warriors[j]};
+ if (!lib94::init_round(wbuf, 2)) {
+ fprintf(stderr, "warriors do not fit in core\n");
+ return 1;
+ }
+ }
+
if (comm_rank == 0)
head_main(comm_size, argc - 1, warriors);
else