ompi
ompi copied to clipboard
OFI components: using FI_NAME_MAX is incorrect
I've started working with a new OFI provider which has rather long endpoint names returned from fi_getname
.
We currently have fixed size char arrays of size FI_NAME_MAX
size and do not use the fi_getname
in the way it was intended.
It turns out there's a bug in OFI libfabric and this enum should not have been exposed.
Related to https://github.com/ofiwg/libfabric/issues/7898
Is this the sort of behavior you're trying to implement?
size_t len = 1;
char tmp_addr[1];
fi_getname(fid, tmp_addr, &len);
char *addr = malloc(len);
fi_getname(fid, addr, &len);
Yeah I’ll open a pr next week for this week.
From: William Zhang @.> Reply-To: open-mpi/ompi @.> Date: Wednesday, July 27, 2022 at 2:15 PM To: open-mpi/ompi @.> Cc: "Pritchard Jr., Howard" @.>, Assign @.***> Subject: [EXTERNAL] Re: [open-mpi/ompi] OFI components: using FI_NAME_MAX is incorrect (Issue #10617)
Is this the sort of behavior you're trying to implement?
size_t len = 1;
char tmp_addr[1];
fi_getname(fid, tmp_addr, &len);
char *addr = malloc(len);
fi_getname(fid, addr, &len);
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/open-mpi/ompi/issues/10617*issuecomment-1197319464__;Iw!!Bt8fGhp8LhKGRg!CrCYT67WT-CRIBCfqekS6KwFgeee75CIPlH8lrtUcR9h-cAuoWhlygvsHViivvAw5U06fIW3I9LzFkFaCneXLYSf$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AB3U3KWGSWL4IBHDSZQCEYLVWGKGRANCNFSM542EX5AQ__;!!Bt8fGhp8LhKGRg!CrCYT67WT-CRIBCfqekS6KwFgeee75CIPlH8lrtUcR9h-cAuoWhlygvsHViivvAw5U06fIW3I9LzFkFaCtWTIlHD$. You are receiving this because you were assigned.Message ID: @.***>
closed via #10659 and #10620