|
24 | 24 | */ |
25 | 25 |
|
26 | 26 | #include "ompi_config.h" |
| 27 | +#include "opal/util/show_help.h" |
27 | 28 |
|
28 | 29 | #include <string.h> |
29 | 30 |
|
@@ -110,6 +111,7 @@ ompi_osc_pt2pt_module_t ompi_osc_pt2pt_module_template = { |
110 | 111 | }; |
111 | 112 |
|
112 | 113 | bool ompi_osc_pt2pt_no_locks = false; |
| 114 | +static bool using_thread_multiple = false; |
113 | 115 |
|
114 | 116 | /* look up parameters for configuring this window. The code first |
115 | 117 | looks in the info structure passed by the user, then through mca |
@@ -208,6 +210,10 @@ component_init(bool enable_progress_threads, |
208 | 210 | { |
209 | 211 | int ret; |
210 | 212 |
|
| 213 | + if (enable_mpi_threads) { |
| 214 | + using_thread_multiple = true; |
| 215 | + } |
| 216 | + |
211 | 217 | OBJ_CONSTRUCT(&mca_osc_pt2pt_component.lock, opal_mutex_t); |
212 | 218 | OBJ_CONSTRUCT(&mca_osc_pt2pt_component.pending_operations, opal_list_t); |
213 | 219 | OBJ_CONSTRUCT(&mca_osc_pt2pt_component.pending_operations_lock, opal_mutex_t); |
@@ -304,6 +310,15 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit |
304 | 310 | component */ |
305 | 311 | if (MPI_WIN_FLAVOR_SHARED == flavor) return OMPI_ERR_NOT_SUPPORTED; |
306 | 312 |
|
| 313 | + /* |
| 314 | + * workaround for issue https://github.com/open-mpi/ompi/issues/2614 |
| 315 | + * The following check needs to be removed once 2614 is addressed. |
| 316 | + */ |
| 317 | + if (using_thread_multiple) { |
| 318 | + opal_show_help("help-osc-pt2pt.txt", "mpi-thread-multiple-not-supported", true); |
| 319 | + return OMPI_ERR_NOT_SUPPORTED; |
| 320 | + } |
| 321 | + |
307 | 322 | /* create module structure with all fields initialized to zero */ |
308 | 323 | module = (ompi_osc_pt2pt_module_t*) |
309 | 324 | calloc(1, sizeof(ompi_osc_pt2pt_module_t)); |
|
0 commit comments