Skip to content
Snippets Groups Projects
Commit 05c0e214 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

make sure we don't finalize MPI multiple times

parent 9dd63fae
Branches
Tags
No related merge requests found
......@@ -138,9 +138,11 @@ void Message::Initialize(int argc, char **argv)
void Message::Finalize()
{
#if defined(HAVE_PETSC)
int flag;
MPI_Initialized(&flag);
if(flag) MPI_Finalize();
int initialized, finalized;
MPI_Initialized(&initialized);
MPI_Finalized(&finalized);
if(initialized && !finalized)
MPI_Finalize();
#endif
FinalizeSocket();
FinalizeOnelab();
......
2.6.1: enhanced Print[] command.
2.6.1: enhanced Print[] command; minor fixes.
2.6.0: new ability to define and use Macros in .pro files; new run-time
variables (act as registers, but with user-defined names starting with '$')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment