Skip to content

Commit c950764

Browse files
authored
Merge pull request #9583 from hppritcha/topic/deprecate_mpi_info_get
MPI4: deprecate MPI_Info_get
2 parents ac3446b + 5328700 commit c950764

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

ompi/include/mpi.h.in

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,14 +1742,18 @@ OMPI_DECLSPEC int MPI_Info_delete(MPI_Info info, const char *key);
17421742
OMPI_DECLSPEC int MPI_Info_dup(MPI_Info info, MPI_Info *newinfo);
17431743
OMPI_DECLSPEC MPI_Info MPI_Info_f2c(MPI_Fint info);
17441744
OMPI_DECLSPEC int MPI_Info_free(MPI_Info *info);
1745+
#if MPI_VERSION < 4
17451746
OMPI_DECLSPEC int MPI_Info_get(MPI_Info info, const char *key, int valuelen,
17461747
char *value, int *flag);
1748+
#endif
17471749
OMPI_DECLSPEC int MPI_Info_get_nkeys(MPI_Info info, int *nkeys);
17481750
OMPI_DECLSPEC int MPI_Info_get_nthkey(MPI_Info info, int n, char *key);
1749-
OMPI_DECLSPEC int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen,
1750-
int *flag);
17511751
OMPI_DECLSPEC int MPI_Info_get_string(MPI_Info info, const char *key, int *buflen,
17521752
char *value, int *flag);
1753+
#if MPI_VERSION < 4
1754+
OMPI_DECLSPEC int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen,
1755+
int *flag);
1756+
#endif
17531757
OMPI_DECLSPEC int MPI_Info_set(MPI_Info info, const char *key, const char *value);
17541758
OMPI_DECLSPEC int MPI_Init(int *argc, char ***argv);
17551759
OMPI_DECLSPEC int MPI_Initialized(int *flag);
@@ -2506,14 +2510,18 @@ OMPI_DECLSPEC int PMPI_Info_delete(MPI_Info info, const char *key);
25062510
OMPI_DECLSPEC int PMPI_Info_dup(MPI_Info info, MPI_Info *newinfo);
25072511
OMPI_DECLSPEC MPI_Info PMPI_Info_f2c(MPI_Fint info);
25082512
OMPI_DECLSPEC int PMPI_Info_free(MPI_Info *info);
2513+
#if MPI_VERSION < 4
25092514
OMPI_DECLSPEC int PMPI_Info_get(MPI_Info info, const char *key, int valuelen,
25102515
char *value, int *flag);
2516+
#endif
25112517
OMPI_DECLSPEC int PMPI_Info_get_nkeys(MPI_Info info, int *nkeys);
25122518
OMPI_DECLSPEC int PMPI_Info_get_nthkey(MPI_Info info, int n, char *key);
25132519
OMPI_DECLSPEC int PMPI_Info_get_string(MPI_Info info, const char *key, int *buflen,
25142520
char *value, int *flag);
2521+
#if MPI_VERSION < 4
25152522
OMPI_DECLSPEC int PMPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen,
25162523
int *flag);
2524+
#endif
25172525
OMPI_DECLSPEC int PMPI_Info_set(MPI_Info info, const char *key, const char *value);
25182526
OMPI_DECLSPEC int PMPI_Init(int *argc, char ***argv);
25192527
OMPI_DECLSPEC int PMPI_Initialized(int *flag);
@@ -3013,7 +3021,21 @@ OMPI_DECLSPEC int PMPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val,
30133021
OMPI_DECLSPEC int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val)
30143022
__mpi_interface_deprecated__("MPI_Attr_put was deprecated in MPI-2.0; use MPI_Comm_set_attr instead");
30153023
OMPI_DECLSPEC int PMPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val)
3016-
__mpi_interface_deprecated__("PMPI_Attr_put was deprecated in MPI-2.0; use PMPI_Comm_set_attr instead");
3024+
__mpi_interface_deprecated__("PMPI_Attr_put was deprecated in MPI-2.0; use PMPI_Comm_set_attr instead");
3025+
#if MPI_VERSION >= 4
3026+
OMPI_DECLSPEC int MPI_Info_get(MPI_Info info, const char *key, int valuelen,
3027+
char *value, int *flag)
3028+
__mpi_interface_deprecated__("MPI_Info_get was deprecated in MPI-4.0; use MPI_Info_get_string instead");
3029+
OMPI_DECLSPEC int PMPI_Info_get(MPI_Info info, const char *key, int valuelen,
3030+
char *value, int *flag)
3031+
__mpi_interface_deprecated__("PMPI_Info_get was deprecated in MPI-4.0; use PMPI_Info_get_string instead");
3032+
OMPI_DECLSPEC int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen,
3033+
int *flag)
3034+
__mpi_interface_deprecated__("MPI_Info_get_valuelen was deprecated in MPI-4.0; use MPI_Info_get_string instead");
3035+
OMPI_DECLSPEC int PMPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen,
3036+
int *flag)
3037+
__mpi_interface_deprecated__("PMPI_Info_get_valuelen was deprecated in MPI-4.0; use PMPI_Info_get_string instead");
3038+
#endif
30173039

30183040
/*
30193041
* Even though MPI_Copy_function and MPI_Delete_function are

0 commit comments

Comments
 (0)