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