-
Notifications
You must be signed in to change notification settings - Fork 266
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
avoid type redefine of MPI_Comm and MPI_Info #2270
Conversation
Also define NC_MPI_INFO only when parallel I/O is enabled.
Thanks, this is a good solution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clever and simple! ;-)
Should |
netcdf_par.h is installed only if parallel I/O is enabled. Lines 12 to 14 in 4366db8
netcdf-c/include/CMakeLists.txt Lines 38 to 42 in 4366db8
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic, thank you!
Maybe we don't want to only build dparallel.c when parallel is enabled. |
I have submitted a PR to undo these changes (#2300). If these kind of changes are needed, they must be done in a way that does not break netcdf-fortran. |
Does this mean that #2187 is the way forward then? |
I really don't know. ;-) However, whatever is done must be done in such a way that netcdf-fortran does not break. That could mean we restore these changes and then change netcdf-fortran so that it too does not include or use the parallel functions except for parallel builds. Or perhaps some other solution, like #2187 is best. But whatever it is, it needs to not break netcdf-fortran. I am wondering if netcdf-c shouldn't build and test netcdf-fortran as part of the netcdf-c CI run. That is, treat netcdf-fortran as an extra set of tests for netcdf-c. That way, we would not make the mistake of making changes to netcdf-c which are fine by themselves, but break the fortran build. |
See #2301 |
I suggest to fix netcdf-fortran.
|
@wkliao I don't object to that solution, but I suspect it will have to wait until after the next netcdf-c/netcdf-fortran release, unless it is done immediately... |
It turns out the fix is simple. See #352 |
Thanks! |
MPI_Comm and MPI_Info should only be used when parallel I/O is enabled.
Compiling file libdispatch/dparallel.c is skipped when parallel I/O is disabled.