always call MPI_Finalize() before exiting tester program

This commit is contained in:
Axel Kohlmeyer 2020-08-09 15:17:53 -04:00
parent b223ca1436
commit 4708cd7e1f
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 5 additions and 0 deletions

View File

@ -102,13 +102,16 @@ int main(int argc, char **argv)
if (strcmp(argv[iarg], "-g") == 0) {
if (iarg + 1 < argc) {
generate_yaml_file(argv[iarg + 1], test_config);
MPI_Finalize();
return 0;
} else {
usage(std::cerr, argv[0]);
MPI_Finalize();
return 1;
}
} else if (strcmp(argv[iarg], "-u") == 0) {
generate_yaml_file(argv[1], test_config);
MPI_Finalize();
return 0;
} else if (strcmp(argv[iarg], "-d") == 0) {
if (iarg + 1 < argc) {
@ -116,6 +119,7 @@ int main(int argc, char **argv)
iarg += 2;
} else {
usage(std::cerr, argv[0]);
MPI_Finalize();
return 1;
}
} else if (strcmp(argv[iarg], "-s") == 0) {
@ -127,6 +131,7 @@ int main(int argc, char **argv)
} else {
std::cerr << "unknown option: " << argv[iarg] << "\n\n";
usage(std::cerr, argv[0]);
MPI_Finalize();
return 1;
}
}