Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.0.x: REF6976 Silent failure of OMPI over OFI with large messages sizes #7006

Merged
merged 1 commit into from
Oct 4, 2019
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
3 changes: 3 additions & 0 deletions ompi/mca/mtl/ofi/help-mtl-ofi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ unusual; your job may behave unpredictably (and/or abort) after this.
Local host: %s
Location: %s:%d
Error: %s (%zd)
#
[message too big]
Message size %llu bigger than supported by selected transport. Max = %llu
11 changes: 9 additions & 2 deletions ompi/mca/mtl/ofi/mtl_ofi.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,20 @@ ompi_mtl_ofi_send_start(struct mca_mtl_base_module_t *mtl,
endpoint = ompi_mtl_ofi_get_endpoint(mtl, ompi_proc);

ompi_ret = ompi_mtl_datatype_pack(convertor, &start, &length, &free_after);
if (OMPI_SUCCESS != ompi_ret) return ompi_ret;
if (OPAL_UNLIKELY(OMPI_SUCCESS != ompi_ret)) {
return ompi_ret;
}

ofi_req->buffer = (free_after) ? start : NULL;
ofi_req->length = length;
ofi_req->status.MPI_ERROR = OMPI_SUCCESS;

if (OPAL_UNLIKELY(MCA_PML_BASE_SEND_SYNCHRONOUS == mode)) {
if (OPAL_UNLIKELY(length > endpoint->mtl_ofi_module->max_msg_size)) {
opal_show_help("help-mtl-ofi.txt",
"message too big", false,
length, endpoint->mtl_ofi_module->max_msg_size);
return OMPI_ERROR;
} else if (OPAL_UNLIKELY(MCA_PML_BASE_SEND_SYNCHRONOUS == mode)) {
ack_req = malloc(sizeof(ompi_mtl_ofi_request_t));
assert(ack_req);
ack_req->parent = ofi_req;
Expand Down
3 changes: 2 additions & 1 deletion ompi/mca/mtl/ofi/mtl_ofi_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
}

/**
* Save the maximum inject size.
* Save the maximum sizes.
*/
ompi_mtl_ofi.max_inject_size = prov->tx_attr->inject_size;
ompi_mtl_ofi.max_msg_size = prov->ep_attr->max_msg_size;

/**
* Create the objects that will be bound to the endpoint.
Expand Down
3 changes: 3 additions & 0 deletions ompi/mca/mtl/ofi/mtl_ofi_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ typedef struct mca_mtl_ofi_module_t {
/** Maximum inject size */
size_t max_inject_size;

/** Largest message that can be sent in a single send. */
size_t max_msg_size;

/** Maximum number of CQ events to read in OFI Progress */
int ofi_progress_event_count;

Expand Down