Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/runtime/prte_finalize.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "src/mca/ess/ess.h"
#include "src/runtime/prte_globals.h"
#include "src/runtime/prte_locks.h"
#include "src/runtime/prte_progress_threads.h"
#include "src/runtime/runtime.h"
#include "src/util/name_fns.h"
#include "src/util/proc_info.h"
Expand Down Expand Up @@ -79,6 +80,9 @@ int prte_finalize(void)
/* flag that we are finalizing */
prte_finalizing = true;

// stop ALL prte progress threads
prte_progress_thread_pause(NULL);

// we always must cleanup the session directory tree
prte_job_session_dir_finalize(NULL);

Expand Down
25 changes: 7 additions & 18 deletions src/runtime/prte_progress_threads.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2014-2020 Intel, Inc. All rights reserved.
* Copyright (c) 2015-2020 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2021-2025 Nanook Consulting All rights reserved.
* Copyright (c) 2021-2026 Nanook Consulting All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -378,15 +378,7 @@ int prte_progress_thread_finalize(const char *name)
PMIX_LIST_FOREACH(trk, &tracking, prte_progress_tracker_t)
{
if (0 == strcmp(name, trk->name)) {
/* decrement the refcount */
--trk->refcount;

/* If the refcount is still above 0, we're done here */
if (trk->refcount > 0) {
return PRTE_SUCCESS;
}

/* If the progress thread is active, stop it */
/* If the progress thread is active, stop it */
if (trk->ev_active) {
stop_progress_engine(trk);
}
Expand All @@ -412,23 +404,20 @@ int prte_progress_thread_pause(const char *name)
return PRTE_ERR_NOT_FOUND;
}

if (NULL == name) {
name = shared_thread_name;
}

/* find the specified engine */
PMIX_LIST_FOREACH(trk, &tracking, prte_progress_tracker_t)
{
if (0 == strcmp(name, trk->name)) {
if (NULL == name || 0 == strcmp(name, trk->name)) {
if (trk->ev_active) {
stop_progress_engine(trk);
}

return PRTE_SUCCESS;
if (NULL != name) {
break;
}
}
}

return PRTE_ERR_NOT_FOUND;
return PRTE_SUCCESS;
}

#if PRTE_HAVE_LIBEV
Expand Down
Loading