Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ompi/mca/mtl/ofi/help-mtl-ofi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
#
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved
#
# Copyright (c) 2017 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
[OFI call fail]
Open MPI failed an OFI Libfabric library call (%s).This is highly unusual;
your job may behave unpredictably (and/or abort) after this.
Open MPI failed an OFI Libfabric library call (%s). This is highly
unusual; your job may behave unpredictably (and/or abort) after this.

Local host: %s
Location: %s:%d
Error: %s (%zd)
29 changes: 16 additions & 13 deletions ompi/mca/mtl/ofi/mtl_ofi_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved
*
* Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2014-2017 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2015-2016 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
Expand Down Expand Up @@ -362,13 +362,16 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
NULL, /* Optional name or fabric to resolve */
NULL, /* Optional service name or port to request */
0ULL, /* Optional flag */
hints, /* In: Hints to filter providers */
hints, /* In: Hints to filter providers */
&providers); /* Out: List of matching providers */
if (0 != ret) {
if (FI_ENODATA == -ret) {
// It is not an error if no information is returned.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: c++ comment style

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We allow this in Open MPI (since compiling Open MPI requires a C99 compiler, which officially standardized //-style comments in C).

goto error;
} else if (0 != ret) {
opal_show_help("help-mtl-ofi.txt", "OFI call fail", true,
"fi_getinfo",
ompi_process_info.nodename, __FILE__, __LINE__,
fi_strerror(-ret), ret);
fi_strerror(-ret), -ret);
goto error;
}

Expand Down Expand Up @@ -397,7 +400,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
opal_show_help("help-mtl-ofi.txt", "OFI call fail", true,
"fi_fabric",
ompi_process_info.nodename, __FILE__, __LINE__,
fi_strerror(-ret), ret);
fi_strerror(-ret), -ret);
goto error;
}

Expand All @@ -414,7 +417,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
opal_show_help("help-mtl-ofi.txt", "OFI call fail", true,
"fi_domain",
ompi_process_info.nodename, __FILE__, __LINE__,
fi_strerror(-ret), ret);
fi_strerror(-ret), -ret);
goto error;
}

Expand All @@ -433,7 +436,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
opal_show_help("help-mtl-ofi.txt", "OFI call fail", true,
"fi_endpoint",
ompi_process_info.nodename, __FILE__, __LINE__,
fi_strerror(-ret), ret);
fi_strerror(-ret), -ret);
goto error;
}

Expand Down Expand Up @@ -591,23 +594,23 @@ ompi_mtl_ofi_finalize(struct mca_mtl_base_module_t *mtl)
opal_progress_unregister(ompi_mtl_ofi_progress_no_inline);

/* Close all the OFI objects */
if (ret = fi_close((fid_t)ompi_mtl_ofi.ep)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the extra parenthesis ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the commit message on a8686a6.

if ((ret = fi_close((fid_t)ompi_mtl_ofi.ep))) {
goto finalize_err;
}

if (ret = fi_close((fid_t)ompi_mtl_ofi.cq)) {
if ((ret = fi_close((fid_t)ompi_mtl_ofi.cq))) {
goto finalize_err;
}

if (ret = fi_close((fid_t)ompi_mtl_ofi.av)) {
if ((ret = fi_close((fid_t)ompi_mtl_ofi.av))) {
goto finalize_err;
}

if (ret = fi_close((fid_t)ompi_mtl_ofi.domain)) {
if ((ret = fi_close((fid_t)ompi_mtl_ofi.domain))) {
goto finalize_err;
}

if (ret = fi_close((fid_t)ompi_mtl_ofi.fabric)) {
if ((ret = fi_close((fid_t)ompi_mtl_ofi.fabric))) {
goto finalize_err;
}

Expand All @@ -617,7 +620,7 @@ ompi_mtl_ofi_finalize(struct mca_mtl_base_module_t *mtl)
opal_show_help("help-mtl-ofi.txt", "OFI call fail", true,
"fi_close",
ompi_process_info.nodename, __FILE__, __LINE__,
fi_strerror(-ret), ret);
fi_strerror(-ret), -ret);

return OMPI_ERROR;
}
Expand Down