Skip to content

Commit 58c27d5

Browse files
authored
Merge pull request #4972 from jsquyres/pr/v2.x/disable-osc-pt2p-in-thread-multiple
v2.x: osc/pt2pt: disable osc/pt2pt for THREAD_MULTIPLE scenarios
2 parents c643fc3 + 81d4826 commit 58c27d5

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
@@ -18,6 +18,8 @@
1818
# $HEADER$
1919
#
2020

21+
dist_ompidata_DATA = help-osc-pt2pt.txt
22+
2123
pt2pt_sources = \
2224
osc_pt2pt.h \
2325
osc_pt2pt_module.c \

ompi/mca/osc/pt2pt/help-osc-pt2pt.txt

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)