diff --git a/darshan-runtime/lib/darshan-core.c b/darshan-runtime/lib/darshan-core.c index 64fd803270631e70f093978f6a4109842ea1c143..9d35682077e4cee9fda449d8b4b570ceb8f4825f 100644 --- a/darshan-runtime/lib/darshan-core.c +++ b/darshan-runtime/lib/darshan-core.c @@ -2036,7 +2036,8 @@ static void darshan_core_cleanup(struct darshan_core_runtime* core) #endif #ifdef HAVE_MPI - PMPI_Comm_free(&core->mpi_comm); + if(using_mpi) + PMPI_Comm_free(&core->mpi_comm); #endif if(core->comp_buf)