diff --git a/ompi/runtime/ompi_rte.c b/ompi/runtime/ompi_rte.c index 68dfebde57f..7c554018b78 100644 --- a/ompi/runtime/ompi_rte.c +++ b/ompi/runtime/ompi_rte.c @@ -972,8 +972,6 @@ static bool check_file(const char *root, const char *path) int ompi_rte_finalize(void) { - /* shutdown pmix */ - PMIx_Finalize(NULL, 0); /* cleanup the session directory we created */ if (NULL != opal_process_info.job_session_dir) { @@ -1033,6 +1031,9 @@ int ompi_rte_finalize(void) opal_finalize (); + /* shutdown pmix */ + PMIx_Finalize(NULL, 0); + return OMPI_SUCCESS; }