Skip to content

Commit

Permalink
Best provider might be NULL (#26279)
Browse files Browse the repository at this point in the history
Don't set the maximum messages size if the provider is NULL (no provider
was found).

[Reviewed by @jabraham17, thank  you.]
  • Loading branch information
jhh67 authored Nov 21, 2024
2 parents 53bee29 + abb3cab commit 0c5f14d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions runtime/src/comm/ofi/comm-ofi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1617,9 +1617,11 @@ struct fi_info* findProvInList(struct fi_info* info,

// Set the maximum message size if specified

best->ep_attr->max_msg_size =
chpl_env_rt_get_int("COMM_OFI_MAX_MSG_SIZE",
best->ep_attr->max_msg_size);
if (best) {
best->ep_attr->max_msg_size =
chpl_env_rt_get_int("COMM_OFI_MAX_MSG_SIZE",
best->ep_attr->max_msg_size);
}

return (best == NULL) ? NULL : fi_dupinfo(best);
}
Expand Down

0 comments on commit 0c5f14d

Please sign in to comment.