diff --git a/ompi/runtime/ompi_mpi_finalize.c b/ompi/runtime/ompi_mpi_finalize.c index bd135e23a5..a8ef63e814 100644 --- a/ompi/runtime/ompi_mpi_finalize.c +++ b/ompi/runtime/ompi_mpi_finalize.c @@ -494,6 +494,10 @@ int ompi_mpi_finalize(void) opal_class_finalize(); } + /* cleanup environment */ + opal_unsetenv("OMPI_COMMAND", &environ); + opal_unsetenv("OMPI_ARGV", &environ); + /* All done */ done: