1
1

mtl ofi: show the positive value of the error

The value of ret is negative (e.g., -61), but it is displayed in the
help message as `%zd`, which renders as unsigned (i.e., a giant
positive value).  So make sure to negate the negative value before
rendering it (e.g., so we display "61", not "4294967235").

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
Jeff Squyres 2017-11-11 04:58:59 -08:00
родитель e8c13ef286
Коммит f910f554f7

Просмотреть файл

@ -368,7 +368,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
opal_show_help("help-mtl-ofi.txt", "OFI call fail", true, opal_show_help("help-mtl-ofi.txt", "OFI call fail", true,
"fi_getinfo", "fi_getinfo",
ompi_process_info.nodename, __FILE__, __LINE__, ompi_process_info.nodename, __FILE__, __LINE__,
fi_strerror(-ret), ret); fi_strerror(-ret), -ret);
goto error; goto error;
} }
@ -397,7 +397,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
opal_show_help("help-mtl-ofi.txt", "OFI call fail", true, opal_show_help("help-mtl-ofi.txt", "OFI call fail", true,
"fi_fabric", "fi_fabric",
ompi_process_info.nodename, __FILE__, __LINE__, ompi_process_info.nodename, __FILE__, __LINE__,
fi_strerror(-ret), ret); fi_strerror(-ret), -ret);
goto error; goto error;
} }
@ -414,7 +414,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
opal_show_help("help-mtl-ofi.txt", "OFI call fail", true, opal_show_help("help-mtl-ofi.txt", "OFI call fail", true,
"fi_domain", "fi_domain",
ompi_process_info.nodename, __FILE__, __LINE__, ompi_process_info.nodename, __FILE__, __LINE__,
fi_strerror(-ret), ret); fi_strerror(-ret), -ret);
goto error; goto error;
} }
@ -433,7 +433,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
opal_show_help("help-mtl-ofi.txt", "OFI call fail", true, opal_show_help("help-mtl-ofi.txt", "OFI call fail", true,
"fi_endpoint", "fi_endpoint",
ompi_process_info.nodename, __FILE__, __LINE__, ompi_process_info.nodename, __FILE__, __LINE__,
fi_strerror(-ret), ret); fi_strerror(-ret), -ret);
goto error; goto error;
} }
@ -617,7 +617,7 @@ finalize_err:
opal_show_help("help-mtl-ofi.txt", "OFI call fail", true, opal_show_help("help-mtl-ofi.txt", "OFI call fail", true,
"fi_close", "fi_close",
ompi_process_info.nodename, __FILE__, __LINE__, ompi_process_info.nodename, __FILE__, __LINE__,
fi_strerror(-ret), ret); fi_strerror(-ret), -ret);
return OMPI_ERROR; return OMPI_ERROR;
} }