Skip to content

Commit 66bdd3d

Browse files
hppritchajsquyres
authored andcommitted
osc/pt2pt: disable osc/pt2pt with 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 <howardp@lanl.gov> Signed-off-by: Jeff Squyres <jsquyres@cisco.com> (cherry picked from commit d0ffd66)
1 parent 4ebed21 commit 66bdd3d

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

Diff for: ompi/mca/osc/pt2pt/Makefile.am

+2
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 \

Diff for: ompi/mca/osc/pt2pt/help-osc-pt2pt.txt

+15
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.

Diff for: ompi/mca/osc/pt2pt/osc_pt2pt_component.c

+15
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*/
2626

2727
#include "ompi_config.h"
28+
#include "opal/util/show_help.h"
2829

2930
#include <string.h>
3031

@@ -108,6 +109,7 @@ ompi_osc_pt2pt_module_t ompi_osc_pt2pt_module_template = {
108109
};
109110

110111
bool ompi_osc_pt2pt_no_locks = false;
112+
static bool using_thread_multiple = false;
111113

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

211+
if (enable_mpi_threads) {
212+
using_thread_multiple = true;
213+
}
214+
209215
OBJ_CONSTRUCT(&mca_osc_pt2pt_component.lock, opal_mutex_t);
210216
OBJ_CONSTRUCT(&mca_osc_pt2pt_component.pending_operations, opal_list_t);
211217
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
302308
component */
303309
if (MPI_WIN_FLAVOR_SHARED == flavor) return OMPI_ERR_NOT_SUPPORTED;
304310

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

0 commit comments

Comments
 (0)