Skip to content

Commit 0a63796

Browse files
committed
Use the active PML to call add_procs()
ompi_mtl_portals4_get_endpoint() was incorrectly making a direct call to ompi_mtl_portals4_add_procs(). Instead use the actve PML to call add_procs(). If add_procs() fails, call ompi_rte_abort() to terminate the job. Signed-off-by: Todd Kordenbrock <thkgcode@gmail.com>
1 parent d03a99c commit 0a63796

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ompi/mca/mtl/portals4/mtl_portals4_endpoint.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
12+
* Copyright (c) 2010-2020 Sandia National Laboratories. All rights reserved.
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -20,6 +20,7 @@
2020
#ifndef OMPI_MTL_PORTALS_ENDPOINT_H
2121
#define OMPI_MTL_PORTALS_ENDPOINT_H
2222

23+
#include "ompi/mca/pml/pml.h"
2324
#include "ompi/mca/mtl/portals4/mtl_portals4.h"
2425

2526
struct mca_mtl_base_endpoint_t {
@@ -31,7 +32,10 @@ static inline mca_mtl_base_endpoint_t *
3132
ompi_mtl_portals4_get_endpoint (struct mca_mtl_base_module_t* mtl, ompi_proc_t *ompi_proc)
3233
{
3334
if (OPAL_UNLIKELY(NULL == ompi_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PORTALS4])) {
34-
ompi_mtl_portals4_add_procs (mtl, 1, &ompi_proc);
35+
int rc;
36+
if (OPAL_UNLIKELY(OMPI_SUCCESS != (rc = MCA_PML_CALL(add_procs(&ompi_proc, 1))))) {
37+
ompi_rte_abort(rc,"ompi_mtl_portals4_get_endpoint(): pml->add_procs() failed. Aborting.\n");
38+
}
3539
}
3640

3741
return ompi_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PORTALS4];

0 commit comments

Comments
 (0)