From 37d7f94df7d428610a1456cde986bfaa2cc16c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com> Date: Wed, 4 Nov 2020 09:54:19 +0100 Subject: [PATCH] Plug PETScWrapper into unit tests --- tests/mpi_test_main.cpp | 5 +++++ tests/test_main.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/mpi_test_main.cpp b/tests/mpi_test_main.cpp index 45b733f94..87953af0c 100644 --- a/tests/mpi_test_main.cpp +++ b/tests/mpi_test_main.cpp @@ -3,6 +3,7 @@ #include <Kokkos_Core.hpp> +#include <algebra/PETScWrapper.hpp> #include <mesh/DiamondDualConnectivityManager.hpp> #include <mesh/DiamondDualMeshManager.hpp> #include <mesh/MeshDataManager.hpp> @@ -21,6 +22,8 @@ main(int argc, char* argv[]) parallel::Messenger::create(argc, argv); Kokkos::initialize({4, -1, -1, true}); + PETScWrapper::initialize(argc, argv); + const std::string output_base_name{"mpi_test_rank_"}; std::filesystem::path parallel_output(std::string{PUGS_BINARY_DIR}); @@ -86,6 +89,8 @@ main(int argc, char* argv[]) } } + PETScWrapper::finalize(); + Kokkos::finalize(); parallel::Messenger::destroy(); diff --git a/tests/test_main.cpp b/tests/test_main.cpp index 7ab5a66fb..74f695682 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -3,6 +3,7 @@ #include <Kokkos_Core.hpp> +#include <algebra/PETScWrapper.hpp> #include <mesh/DiamondDualConnectivityManager.hpp> #include <mesh/DiamondDualMeshManager.hpp> #include <mesh/MeshDataManager.hpp> @@ -17,6 +18,8 @@ main(int argc, char* argv[]) parallel::Messenger::create(argc, argv); Kokkos::initialize({4, -1, -1, true}); + PETScWrapper::initialize(argc, argv); + Catch::Session session; int result = session.applyCommandLine(argc, argv); @@ -46,6 +49,8 @@ main(int argc, char* argv[]) } } + PETScWrapper::finalize(); + Kokkos::finalize(); parallel::Messenger::destroy(); -- GitLab