Skip to content

BUFSIZ is undefined in mpiext/affinity.h #9891

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

Merged
merged 1 commit into from
Jan 20, 2022

Conversation

abouteiller
Copy link
Member

including mpi-ext.h in user code causes compilation to fail due to undefined symbol BUFSIZ

BUFSIZ is undefined in mpiext/affinity.h replace it with 1024 as it was prior to 48a71c1

Signed-off-by: Aurelien Bouteiller bouteill@icl.utk.edu

…as prior

to 48a71c1

Signed-off-by: Aurelien Bouteiller <bouteill@icl.utk.edu>
@bosilca
Copy link
Member

bosilca commented Jan 19, 2022

Maybe it makes reference to the horribly-named BUFSIZ from stdio.h ?

@awlauria
Copy link
Contributor

Right - if we want to preserve bufsiz we could just add the stdio.h header. I have no opinion either way.

@abouteiller
Copy link
Member Author

abouteiller commented Jan 19, 2022

Prior version (that is prior to the latest change in 48a71c1) of the code would define the MAX to 1024, but would implement using BUFSIZ (including stdio.h from the .c, but not header-visible) which was probably incorrect to start with in the chance case that BUFSIZ would not be set to 1024 on that system.

I'm not sure there is a clear rationale for having this particular MPI constant be set to BUFSIZ, as this behavior does not have anything to do with setvbuf of fgets.

@awlauria awlauria merged commit 01a4ed9 into open-mpi:master Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants