Skip to content

Commit bf960a4

Browse files
hppritchabwbarrett
authored andcommitted
osc/pt2pt: disable when THREAD_MULTIPLE.
Per discussion at #2614 (comment), do not allow for selection of the OSC PT2PT when creating an MPI RMA window when THREAD_MULTIPLE is active. Print a helpful message and return a not-supported error. Signed-off-by: Howard Pritchard <[email protected]> Signed-off-by: Jeff Squyres <[email protected]> (cherry picked from commit d0ffd66) Signed-off-by: Jeff Squyres <[email protected]> (cherry picked from commit 5b7c866)
1 parent b434bd6 commit bf960a4

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

ompi/mca/osc/pt2pt/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
# $HEADER$
2020
#
2121

22+
dist_ompidata_DATA = help-osc-pt2pt.txt
23+
2224
pt2pt_sources = \
2325
osc_pt2pt.h \
2426
osc_pt2pt_module.c \
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# -*- text -*-
2+
#
3+
# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
4+
# reserved.
5+
#
6+
# $COPYRIGHT$
7+
#
8+
# Additional copyrights may follow
9+
#
10+
# $HEADER$
11+
#
12+
[mpi-thread-multiple-not-supported]
13+
The OSC pt2pt component does not support MPI_THREAD_MULTIPLE in this release.
14+
Workarounds are to run on a single node, or to use a system with an RDMA
15+
capable network such as Infiniband.

ompi/mca/osc/pt2pt/osc_pt2pt_component.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*/
2525

2626
#include "ompi_config.h"
27+
#include "opal/util/show_help.h"
2728

2829
#include <string.h>
2930

@@ -110,6 +111,7 @@ ompi_osc_pt2pt_module_t ompi_osc_pt2pt_module_template = {
110111
};
111112

112113
bool ompi_osc_pt2pt_no_locks = false;
114+
static bool using_thread_multiple = false;
113115

114116
/* look up parameters for configuring this window. The code first
115117
looks in the info structure passed by the user, then through mca
@@ -208,6 +210,10 @@ component_init(bool enable_progress_threads,
208210
{
209211
int ret;
210212

213+
if (enable_mpi_threads) {
214+
using_thread_multiple = true;
215+
}
216+
211217
OBJ_CONSTRUCT(&mca_osc_pt2pt_component.lock, opal_mutex_t);
212218
OBJ_CONSTRUCT(&mca_osc_pt2pt_component.pending_operations, opal_list_t);
213219
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
304310
component */
305311
if (MPI_WIN_FLAVOR_SHARED == flavor) return OMPI_ERR_NOT_SUPPORTED;
306312

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+
307322
/* create module structure with all fields initialized to zero */
308323
module = (ompi_osc_pt2pt_module_t*)
309324
calloc(1, sizeof(ompi_osc_pt2pt_module_t));

0 commit comments

Comments
 (0)