Skip to content

Commit

Permalink
Move MPI tool finalization, i.e. MPI_T_finalize(), after MPI_Finalize().
Browse files Browse the repository at this point in the history
As per MPI standard it can be done either way, but for some reason
the Darshan I/O performance profiler dies with SEGV if done in the other
order. It is not clear to me why that is.
  • Loading branch information
theurich committed Jul 31, 2023
1 parent d06b7d6 commit e4f5f32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Infrastructure/VM/src/ESMCI_VMKernel.C
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,6 @@ void VMK::finalize(int finalizeMpi){
delete [] cid[i];
delete [] cid;
delete [] ssiLocalPetList;
// finalize the MPI tool interface
MPI_T_finalize();
// conditionally finalize MPI
int finalized;
MPI_Finalized(&finalized);
Expand All @@ -695,6 +693,9 @@ void VMK::finalize(int finalizeMpi){
if (finalizeMpi)
MPI_Finalize();
}
// finalize the MPI tool interface
// do this _after_ MPI_Finalize() or else Darshan dies with SEGV (not clear why)
MPI_T_finalize();
}


Expand Down

0 comments on commit e4f5f32

Please sign in to comment.