Skip to content

Commit 64d70b3

Browse files
committed
ofi: Call add_procs through PML
Change ompi_mtl_ofi_get_endpoint() to call the active PML's add_procs() rather than the OFI MTL add_procs() directly when discovering a new process during operation. Functionally, this has no impact in correct operation. However, the current behavior means that the heterogenous and active PML checks are not being executed in the dynamic discovery case. Signed-off-by: Brian Barrett <[email protected]>
1 parent c704ed4 commit 64d70b3

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

ompi/mca/mtl/ofi/mtl_ofi.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
* reserved.
55
* Copyright (c) 2019 Triad National Security, LLC. All rights
66
* reserved.
7+
* Copyright (c) 2018-2020 Amazon.com, Inc. or its affiliates. All rights
8+
* reserved.
79
*
8-
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
910
* $COPYRIGHT$
1011
*
1112
* Additional copyrights may follow
@@ -50,6 +51,10 @@ BEGIN_C_DECLS
5051
extern mca_mtl_ofi_module_t ompi_mtl_ofi;
5152
extern mca_base_framework_t ompi_mtl_base_framework;
5253

54+
extern int ompi_mtl_ofi_add_procs(struct mca_mtl_base_module_t *mtl,
55+
size_t nprocs,
56+
struct ompi_proc_t** procs);
57+
5358
extern int ompi_mtl_ofi_del_procs(struct mca_mtl_base_module_t *mtl,
5459
size_t nprocs,
5560
struct ompi_proc_t **procs);

ompi/mca/mtl/ofi/mtl_ofi_endpoint.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/*
22
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved
3+
* Copyright (c) 2020 Amazon.com, Inc. or its affiliates. All Rights
4+
* reserved.
35
*
46
* $COPYRIGHT$
57
*
@@ -11,11 +13,9 @@
1113
#ifndef OMPI_MTL_OFI_ENDPOINT_H
1214
#define OMPI_MTL_OFI_ENDPOINT_H
1315

14-
BEGIN_C_DECLS
16+
#include "ompi/mca/pml/pml.h"
1517

16-
extern int ompi_mtl_ofi_add_procs(struct mca_mtl_base_module_t *mtl,
17-
size_t nprocs,
18-
struct ompi_proc_t **procs);
18+
BEGIN_C_DECLS
1919

2020
OBJ_CLASS_DECLARATION(mca_mtl_ofi_endpoint_t);
2121

@@ -38,10 +38,12 @@ struct mca_mtl_ofi_endpoint_t {
3838

3939
typedef struct mca_mtl_ofi_endpoint_t mca_mtl_ofi_endpoint_t;
4040

41-
static inline mca_mtl_ofi_endpoint_t *ompi_mtl_ofi_get_endpoint (struct mca_mtl_base_module_t* mtl, ompi_proc_t *ompi_proc)
41+
static inline mca_mtl_ofi_endpoint_t *
42+
ompi_mtl_ofi_get_endpoint(struct mca_mtl_base_module_t* mtl,
43+
ompi_proc_t *ompi_proc)
4244
{
4345
if (OPAL_UNLIKELY(NULL == ompi_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_MTL])) {
44-
if (OPAL_UNLIKELY(OMPI_SUCCESS != ompi_mtl_ofi_add_procs(mtl, 1, &ompi_proc))) {
46+
if (OPAL_UNLIKELY(OMPI_SUCCESS != MCA_PML_CALL(add_procs(&ompi_proc, 1)))) {
4547
/* Fatal error. exit() out */
4648
opal_output(0, "%s:%d: *** The Open MPI OFI MTL is aborting the MPI job (via exit(3)).\n",
4749
__FILE__, __LINE__);

0 commit comments

Comments
 (0)