Skip to content
Snippets Groups Projects
Commit 3c63e935 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[BL/MPI] Wrap MPI_Init and Finalize calls

parent deaed983
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,26 @@ ...@@ -21,6 +21,26 @@
namespace BaseLib::MPI namespace BaseLib::MPI
{ {
struct Setup
{
Setup(int argc, char* argv[])
{
#ifdef USE_PETSC
MPI_Init(&argc, &argv);
#else
(void)argc;
(void)argv;
#endif // USE_PETSC
}
~Setup()
{
#ifdef USE_PETSC
MPI_Finalize();
#endif // USE_PETSC
}
};
#ifdef USE_PETSC #ifdef USE_PETSC
struct Mpi struct Mpi
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment