Skip to content

Fix compilation with MPI-4.0: replace deprecated MPI_Info_get APIs#76

Open
yinliaws wants to merge 1 commit intointel:mainfrom
yinliaws:fix-mpi4-deprecated-info-get
Open

Fix compilation with MPI-4.0: replace deprecated MPI_Info_get APIs#76
yinliaws wants to merge 1 commit intointel:mainfrom
yinliaws:fix-mpi4-deprecated-info-get

Conversation

@yinliaws
Copy link
Copy Markdown

@yinliaws yinliaws commented May 7, 2026

MPI_Info_get and MPI_Info_get_valuelen were deprecated in MPI-4.0 (replaced by MPI_Info_get_string). When building IMB against an MPI implementation that marks these with [[deprecated]] attributes (e.g., OpenMPI main v6.1.0a1), compilation fails under -Werror=deprecated-declarations.

Add a #if MPI_VERSION >= 4 gate in IMB_print_info() to use MPI_Info_get_string on MPI-4.0+ while preserving the original calls for older implementations.

MPI_Info_get and MPI_Info_get_valuelen were deprecated in MPI-4.0
(replaced by MPI_Info_get_string). When building IMB against an MPI
implementation that marks these with [[deprecated]] attributes (e.g.,
OpenMPI main v6.1.0a1), compilation fails under
-Werror=deprecated-declarations.

Add a #if MPI_VERSION >= 4 gate in IMB_print_info() to use
MPI_Info_get_string on MPI-4.0+ while preserving the original calls
for older implementations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants