Skip to content

Commit c6b1981

Browse files
committed
bml: always enable the bml
This commit ensures the bml is always enabled whether or not it will be used. This ensures that any available btls communicate their modex so that they can be used for one-sided communication. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 4135cdf commit c6b1981

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

ompi/mca/bml/base/bml_base_init.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
12
/*
23
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
34
* University Research and Technology
@@ -11,6 +12,8 @@
1112
* All rights reserved.
1213
* Copyright (c) 2015 Research Organization for Information Science
1314
* and Technology (RIST). All rights reserved.
15+
* Copyright (c) 2016 Los Alamos National Security, LLC. All rights
16+
* reserved.
1417
* $COPYRIGHT$
1518
*
1619
* Additional copyrights may follow
@@ -49,18 +52,18 @@ mca_bml_base_inited(void)
4952

5053
int mca_bml_base_init( bool enable_progress_threads,
5154
bool enable_mpi_threads) {
52-
opal_list_item_t *item = NULL;
5355
mca_bml_base_component_t *component = NULL, *best_component = NULL;
5456
mca_bml_base_module_t *module = NULL, *best_module = NULL;
5557
int priority = 0, best_priority = -1;
5658
mca_base_component_list_item_t *cli = NULL;
5759

60+
if (init_called) {
61+
return OPAL_SUCCESS;
62+
}
63+
5864
init_called = true;
5965

60-
for (item = opal_list_get_first(&ompi_bml_base_framework.framework_components);
61-
opal_list_get_end(&ompi_bml_base_framework.framework_components) != item;
62-
item = opal_list_get_next(item)) {
63-
cli = (mca_base_component_list_item_t*) item;
66+
OPAL_LIST_FOREACH(cli, &ompi_bml_base_framework.framework_components, mca_base_component_list_item_t) {
6467
component = (mca_bml_base_component_t*) cli->cli_component;
6568
if(NULL == component->bml_init) {
6669
opal_output_verbose( 10, ompi_bml_base_framework.framework_output,

ompi/runtime/ompi_mpi_init.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#include "opal/mca/rcache/base/base.h"
5959
#include "opal/mca/rcache/rcache.h"
6060
#include "opal/mca/mpool/base/base.h"
61+
#include "opal/mca/btl/base/base.h"
6162
#include "opal/mca/pmix/pmix.h"
6263
#include "opal/util/timings.h"
6364

@@ -599,6 +600,10 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
599600
error = "mca_bml_base_open() failed";
600601
goto error;
601602
}
603+
if (OMPI_SUCCESS != (ret = mca_bml_base_init (1, ompi_mpi_thread_multiple))) {
604+
error = "mca_bml_base_init() failed";
605+
goto error;
606+
}
602607
if (OMPI_SUCCESS != (ret = mca_base_framework_open(&ompi_pml_base_framework, 0))) {
603608
error = "mca_pml_base_open() failed";
604609
goto error;

0 commit comments

Comments
 (0)