call MPI_Finalize() so we don't have spurious memory leaks from MPI reported by valgrind

This commit is contained in:
Axel Kohlmeyer
2020-06-17 01:42:05 -04:00
parent 39b61fbdbe
commit e88bb9dd59
5 changed files with 20 additions and 5 deletions

View File

@ -128,5 +128,8 @@ int main(int argc, char **argv)
MPI_Init(&argc, &argv); MPI_Init(&argc, &argv);
::testing::InitGoogleMock(&argc, argv); ::testing::InitGoogleMock(&argc, argv);
if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = true; if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = true;
return RUN_ALL_TESTS();
int rv = RUN_ALL_TESTS();
MPI_Finalize();
return rv;
} }

View File

@ -110,5 +110,8 @@ int main(int argc, char **argv)
return 1; return 1;
} }
} }
return RUN_ALL_TESTS();
int rv = RUN_ALL_TESTS();
MPI_Finalize();
return rv;
} }

View File

@ -350,5 +350,8 @@ int main(int argc, char **argv)
MPI_Init(&argc, &argv); MPI_Init(&argc, &argv);
::testing::InitGoogleMock(&argc, argv); ::testing::InitGoogleMock(&argc, argv);
if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = true; if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = true;
return RUN_ALL_TESTS();
int rv = RUN_ALL_TESTS();
MPI_Finalize();
return rv;
} }

View File

@ -202,5 +202,8 @@ int main(int argc, char **argv)
MPI_Init(&argc, &argv); MPI_Init(&argc, &argv);
::testing::InitGoogleMock(&argc, argv); ::testing::InitGoogleMock(&argc, argv);
if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = true; if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = true;
return RUN_ALL_TESTS();
int rv = RUN_ALL_TESTS();
MPI_Finalize();
return rv;
} }

View File

@ -199,5 +199,8 @@ int main(int argc, char **argv)
MPI_Init(&argc, &argv); MPI_Init(&argc, &argv);
::testing::InitGoogleMock(&argc, argv); ::testing::InitGoogleMock(&argc, argv);
if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = true; if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = true;
return RUN_ALL_TESTS();
int rv = RUN_ALL_TESTS();
MPI_Finalize();
return rv;
} }