Skip to content
Snippets Groups Projects
Commit e89f73e8 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add SLEPc initialization and finalization calls

parent b2431283
No related branches found
No related tags found
1 merge request!93Do not initializa Kokkos Arrays anymore
...@@ -13,7 +13,14 @@ add_library( ...@@ -13,7 +13,14 @@ add_library(
PETScWrapper.cpp PETScWrapper.cpp
PugsUtils.cpp PugsUtils.cpp
RevisionInfo.cpp RevisionInfo.cpp
SignalManager.cpp) SignalManager.cpp
SLEPcWrapper.cpp)
target_link_libraries(
PugsUtils
${PETSC_LIBRARIES}
${SLEPC_LIBRARIES}
)
# --------------- get git revision info --------------- # --------------- get git revision info ---------------
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <utils/Messenger.hpp> #include <utils/Messenger.hpp>
#include <utils/PETScWrapper.hpp> #include <utils/PETScWrapper.hpp>
#include <utils/RevisionInfo.hpp> #include <utils/RevisionInfo.hpp>
#include <utils/SLEPcWrapper.hpp>
#include <utils/SignalManager.hpp> #include <utils/SignalManager.hpp>
#include <utils/pugs_build_info.hpp> #include <utils/pugs_build_info.hpp>
...@@ -124,6 +125,7 @@ initialize(int& argc, char* argv[]) ...@@ -124,6 +125,7 @@ initialize(int& argc, char* argv[])
} }
PETScWrapper::initialize(argc, argv); PETScWrapper::initialize(argc, argv);
SLEPcWrapper::initialize(argc, argv);
setDefaultOMPEnvironment(); setDefaultOMPEnvironment();
Kokkos::initialize(argc, argv); Kokkos::initialize(argc, argv);
...@@ -153,6 +155,7 @@ void ...@@ -153,6 +155,7 @@ void
finalize() finalize()
{ {
Kokkos::finalize(); Kokkos::finalize();
SLEPcWrapper::finalize();
PETScWrapper::finalize(); PETScWrapper::finalize();
parallel::Messenger::destroy(); parallel::Messenger::destroy();
} }
......
#include <utils/SLEPcWrapper.hpp>
#include <utils/pugs_config.hpp>
#ifdef PUGS_HAS_SLEPC
#include <slepc.h>
#endif // PUGS_HAS_SLEPC
namespace SLEPcWrapper
{
void
initialize([[maybe_unused]] int& argc, [[maybe_unused]] char* argv[])
{
#ifdef PUGS_HAS_SLEPC
SlepcInitialize(&argc, &argv, 0, 0);
#endif // PUGS_HAS_SLEPC
}
void
finalize()
{
#ifdef PUGS_HAS_SLEPC
SlepcFinalize();
#endif // PUGS_HAS_SLEPC
}
} // namespace SLEPcWrapper
#ifndef SLEPC_WRAPPER_HPP
#define SLEPC_WRAPPER_HPP
namespace SLEPcWrapper
{
void initialize(int& argc, char* argv[]);
void finalize();
} // namespace SLEPcWrapper
#endif // SLEPC_WRAPPER_HPP
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment