-
Notifications
You must be signed in to change notification settings - Fork 903
RFC: Provide equivalence of MPICH_ASYNC_PROGRESS #13088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -544,9 +544,21 @@ fi | |
AC_DEFINE_UNQUOTED([OPAL_ENABLE_GETPWUID], [$opal_want_getpwuid], | ||
[Disable getpwuid support (default: enabled)]) | ||
|
||
dnl We no longer support the old OPAL_ENABLE_PROGRESS_THREADS. At | ||
dnl some point, this should die. | ||
AC_DEFINE([OPAL_ENABLE_PROGRESS_THREADS], | ||
[0], | ||
[Whether we want BTL progress threads enabled]) | ||
# | ||
# Disable progress threads | ||
# | ||
AC_MSG_CHECKING([if want asynchronous progress threads]) | ||
AC_ARG_ENABLE([progress_threads], | ||
[AS_HELP_STRING([--disable-progress-threads], | ||
[Disable asynchronous progress threads. Note that when enabled, for performance-related reasons, the progress thread is still not spawned by default. User must set env var OMPI_ASYNC_PROGRESS or OPAL_ASYNC_PROGRESS to 1 to really activate the progress thread at runtime. (default: enabled)])]) | ||
if test "$enable_progress_threads" = "no"; then | ||
AC_MSG_RESULT([no]) | ||
opal_want_progress_threads=0 | ||
else | ||
AC_MSG_RESULT([yes]) | ||
opal_want_progress_threads=1 | ||
fi | ||
AC_DEFINE_UNQUOTED([OPAL_ENABLE_PROGRESS_THREADS], [$opal_want_progress_threads], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I saw the comment about maintaining the If there is no bug in the old support for progress thread maintain the code as much as possible. |
||
[Disable BTL asynchronous progress threads (default: enabled)]) | ||
|
||
])dnl |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -193,9 +193,10 @@ int ompi_mpi_finalize(void) | |
opal_atomic_swap_32(&ompi_mpi_state, | ||
OMPI_MPI_STATE_FINALIZE_PAST_COMM_SELF_DESTRUCT); | ||
|
||
#if OPAL_ENABLE_PROGRESS_THREADS == 0 | ||
opal_progress_set_event_flag(OPAL_EVLOOP_ONCE | OPAL_EVLOOP_NONBLOCK); | ||
#endif | ||
/* shutdown async progress thread before tearing down further services */ | ||
if (opal_async_progress_thread_spawned) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is okay for now but does leave a hole to plug for the sessions model, but since this is an buy-in option for the application user it should be okay for how. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mind elaborate on this @hppritcha, I fail to see the issue with the session model. |
||
opal_progress_shutdown_async_progress_thread(); | ||
} | ||
|
||
/* NOTE: MPI-2.1 requires that MPI_FINALIZE is "collective" across | ||
*all* connected processes. This only means that all processes | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,16 @@ OPAL_DECLSPEC extern bool opal_built_with_cuda_support; | |
OPAL_DECLSPEC extern bool opal_built_with_rocm_support; | ||
OPAL_DECLSPEC extern bool opal_built_with_ze_support; | ||
|
||
# if OPAL_ENABLE_PROGRESS_THREADS == 1 | ||
OPAL_DECLSPEC extern bool opal_async_progress_thread_spawned; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This patch removes the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, done in new updated version. Thanks for proposal. |
||
# else | ||
/* When disabled at configure, using 'static const' will allow compilers to | ||
* not only evaluate the boolean at compile time, but also to remove its | ||
* storage within any object file which is including this header. | ||
* See https://godbolt.org/z/hxc8EjPa4 */ | ||
OPAL_DECLSPEC static const bool opal_async_progress_thread_spawned = false; | ||
# endif | ||
|
||
/** | ||
* * Whether we want to enable CUDA GPU buffer send and receive support. | ||
* */ | ||
|
Uh oh!
There was an error while loading. Please reload this page.