Skip to content

Commit c70adf6

Browse files
authored
Merge pull request #13349 from hppritcha/issue_12192
mark _x functions for deprecation
2 parents 7c432fb + ea39ace commit c70adf6

File tree

6 files changed

+58
-19
lines changed

6 files changed

+58
-19
lines changed

docs/man-openmpi/man3/MPI_Get_elements.3.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ number of elements in the probed message. Note that the two functions
6868
:ref:`MPI_Get_count` and :ref:`MPI_Get_elements` return the same values when they are
6969
used with primitive data types.
7070

71+
NOTES
72+
-----
73+
74+
Note that :ref:`MPI_Get_elements_x` is *deprecated* as of MPI-4.1. Please use
75+
the big count version of :ref:`MPI_Get_elements` instead.
76+
7177

7278
ERRORS
7379
------

docs/man-openmpi/man3/MPI_Status_set_elements.3.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ that does not logically belong in status. Furthermore, modifying the
5656
values in a status set internally by MPI, such as :ref:`MPI_Recv`, may lead to
5757
unpredictable results and is strongly discouraged.
5858

59+
Note that :ref:`MPI_Status_set_elements_x` is *deprecated* as of MPI-4.1. Please use
60+
the big count version of :ref:`MPI_Status_set_elements` instead.
5961

6062
ERRORS
6163
------

docs/man-openmpi/man3/MPI_Type_get_extent.3.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ parameter is too small to hold the output value), it is set to
3636
MPI_UNDEFINED.
3737

3838

39-
NOTE
40-
----
39+
NOTES
40+
-----
4141

4242
Use of :ref:`MPI_Type_get_extent` is strongly recommended over the legacy MPI-1
4343
functions :ref:`MPI_Type_extent` and :ref:`MPI_Type_lb`.
4444

45+
Note that :ref:`MPI_Type_get_extent_x` is *deprecated* as of MPI-4.1. Please use
46+
the big count version of :ref:`MPI_Type_get_extent` instead.
47+
4548

4649
ERRORS
4750
------

docs/man-openmpi/man3/MPI_Type_get_true_extent.3.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ hold a data type, uncompressed.
4646
See section 4.1.8 of the MPI-3 standard for more detailed definitions of these
4747
parameters in relation to the typemap.
4848

49+
NOTE
50+
----
51+
52+
Note that :ref:`MPI_Type_get_true_extent_x` is *deprecated* as of MPI-4.1. Please use
53+
the big count version of :ref:`MPI_Type_get_true_extent` instead.
4954

5055
ERRORS
5156
------

docs/man-openmpi/man3/MPI_Type_size.3.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ multiplicity. For either function, if the *size* parameter cannot
3636
express the value to be returned (e.g., if the parameter is too small to
3737
hold the output value), it is set to MPI_UNDEFINED.
3838

39+
NOTE
40+
----
41+
42+
Note that :ref:`MPI_Type_size_x` is *deprecated* as of MPI-4.1. Please use
43+
the big count version of :ref:`MPI_Type_size` instead.
44+
3945

4046
ERRORS
4147
------

ompi/include/mpi.h.in

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* Copyright (c) 2021-2022 Amazon.com, Inc. or its affiliates. All Rights
2626
* reserved.
2727
* Copyright (c) 2021 Bull S.A.S. All rights reserved.
28-
* Copyright (c) 2018-2022 Triad National Security, LLC. All rights
28+
* Copyright (c) 2018-2025 Triad National Security, LLC. All rights
2929
* reserved.
3030
* Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved
3131
* Copyright (c) 2025 Jeffrey M. Squyres. All rights reserved.
@@ -385,10 +385,16 @@
385385

386386
#if MPI_VERSION >= 4
387387
# define __mpi_interface_deprecated_in_mpi40__(msg) __mpi_interface_deprecated__(msg)
388+
#if MPI_SUBVERSION == 1 || MPI_VERSION > 4
389+
# define __mpi_interface_deprecated_in_mpi41__(msg) __mpi_interface_deprecated__(msg)
390+
#endif
388391
#else
389392
# define __mpi_interface_deprecated_in_mpi40__(msg)
393+
# define __mpi_interface_deprecated_in_mpi41__(msg)
390394
#endif
391395

396+
397+
392398
#if !defined(OMPI_REMOVED_USE_STATIC_ASSERT)
393399
# define OMPI_REMOVED_USE_STATIC_ASSERT 0
394400
#endif
@@ -1883,7 +1889,6 @@ OMPI_DECLSPEC int MPI_Get_count(const MPI_Status *status, MPI_Datatype datatype
18831889
OMPI_DECLSPEC int MPI_Get_count_c(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count);
18841890
OMPI_DECLSPEC int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count);
18851891
OMPI_DECLSPEC int MPI_Get_elements_c(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count);
1886-
OMPI_DECLSPEC int MPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count);
18871892
OMPI_DECLSPEC int MPI_Get(void *origin_addr, int origin_count,
18881893
MPI_Datatype origin_datatype, int target_rank,
18891894
MPI_Aint target_disp, int target_count,
@@ -2375,8 +2380,6 @@ OMPI_DECLSPEC int MPI_Status_set_elements(MPI_Status *status, MPI_Datatype data
23752380
int count);
23762381
OMPI_DECLSPEC int MPI_Status_set_elements_c(MPI_Status *status, MPI_Datatype datatype,
23772382
MPI_Count count);
2378-
OMPI_DECLSPEC int MPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype,
2379-
MPI_Count count);
23802383
OMPI_DECLSPEC int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag,
23812384
MPI_Status array_of_statuses[]);
23822385
OMPI_DECLSPEC int MPI_Testany(int count, MPI_Request array_of_requests[], int *index,
@@ -2486,16 +2489,12 @@ OMPI_DECLSPEC int MPI_Type_get_extent(MPI_Datatype type, MPI_Aint *lb,
24862489
MPI_Aint *extent);
24872490
OMPI_DECLSPEC int MPI_Type_get_extent_c(MPI_Datatype type, MPI_Count *lb,
24882491
MPI_Count *extent);
2489-
OMPI_DECLSPEC int MPI_Type_get_extent_x(MPI_Datatype type, MPI_Count *lb,
2490-
MPI_Count *extent);
24912492
OMPI_DECLSPEC int MPI_Type_get_name(MPI_Datatype type, char *type_name,
24922493
int *resultlen);
24932494
OMPI_DECLSPEC int MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint *true_lb,
24942495
MPI_Aint *true_extent);
24952496
OMPI_DECLSPEC int MPI_Type_get_true_extent_c(MPI_Datatype datatype, MPI_Count *true_lb,
24962497
MPI_Count *true_extent);
2497-
OMPI_DECLSPEC int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *true_lb,
2498-
MPI_Count *true_extent);
24992498
OMPI_DECLSPEC int MPI_Type_indexed(int count, const int array_of_blocklengths[],
25002499
const int array_of_displacements[],
25012500
MPI_Datatype oldtype, MPI_Datatype *newtype);
@@ -2508,7 +2507,6 @@ OMPI_DECLSPEC int MPI_Type_set_attr(MPI_Datatype type, int type_keyval,
25082507
OMPI_DECLSPEC int MPI_Type_set_name(MPI_Datatype type, const char *type_name);
25092508
OMPI_DECLSPEC int MPI_Type_size(MPI_Datatype type, int *size);
25102509
OMPI_DECLSPEC int MPI_Type_size_c(MPI_Datatype type, MPI_Count *size);
2511-
OMPI_DECLSPEC int MPI_Type_size_x(MPI_Datatype type, MPI_Count *size);
25122510
OMPI_DECLSPEC int MPI_Type_vector(int count, int blocklength, int stride,
25132511
MPI_Datatype oldtype, MPI_Datatype *newtype);
25142512
OMPI_DECLSPEC int MPI_Type_vector_c(MPI_Count count, MPI_Count blocklength, MPI_Count stride,
@@ -3042,7 +3040,6 @@ OMPI_DECLSPEC int PMPI_Get_count(const MPI_Status *status, MPI_Datatype datatyp
30423040
OMPI_DECLSPEC int PMPI_Get_count_c(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count);
30433041
OMPI_DECLSPEC int PMPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count);
30443042
OMPI_DECLSPEC int PMPI_Get_elements_c(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count);
3045-
OMPI_DECLSPEC int PMPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count);
30463043
OMPI_DECLSPEC int PMPI_Get(void *origin_addr, int origin_count,
30473044
MPI_Datatype origin_datatype, int target_rank,
30483045
MPI_Aint target_disp, int target_count,
@@ -3534,8 +3531,6 @@ OMPI_DECLSPEC int PMPI_Status_set_elements(MPI_Status *status, MPI_Datatype dat
35343531
int count);
35353532
OMPI_DECLSPEC int PMPI_Status_set_elements_c(MPI_Status *status, MPI_Datatype datatype,
35363533
MPI_Count count);
3537-
OMPI_DECLSPEC int PMPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype,
3538-
MPI_Count count);
35393534
OMPI_DECLSPEC int PMPI_Testall(int count, MPI_Request array_of_requests[], int *flag,
35403535
MPI_Status array_of_statuses[]);
35413536
OMPI_DECLSPEC int PMPI_Testany(int count, MPI_Request array_of_requests[], int *index,
@@ -3645,16 +3640,12 @@ OMPI_DECLSPEC int PMPI_Type_get_extent(MPI_Datatype type, MPI_Aint *lb,
36453640
MPI_Aint *extent);
36463641
OMPI_DECLSPEC int PMPI_Type_get_extent_c(MPI_Datatype type, MPI_Count *lb,
36473642
MPI_Count *extent);
3648-
OMPI_DECLSPEC int PMPI_Type_get_extent_x(MPI_Datatype type, MPI_Count *lb,
3649-
MPI_Count *extent);
36503643
OMPI_DECLSPEC int PMPI_Type_get_name(MPI_Datatype type, char *type_name,
36513644
int *resultlen);
36523645
OMPI_DECLSPEC int PMPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint *true_lb,
36533646
MPI_Aint *true_extent);
36543647
OMPI_DECLSPEC int PMPI_Type_get_true_extent_c(MPI_Datatype datatype, MPI_Count *true_lb,
36553648
MPI_Count *true_extent);
3656-
OMPI_DECLSPEC int PMPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *true_lb,
3657-
MPI_Count *true_extent);
36583649
OMPI_DECLSPEC int PMPI_Type_indexed(int count, const int array_of_blocklengths[],
36593650
const int array_of_displacements[],
36603651
MPI_Datatype oldtype, MPI_Datatype *newtype);
@@ -3667,7 +3658,6 @@ OMPI_DECLSPEC int PMPI_Type_set_attr(MPI_Datatype type, int type_keyval,
36673658
OMPI_DECLSPEC int PMPI_Type_set_name(MPI_Datatype type, const char *type_name);
36683659
OMPI_DECLSPEC int PMPI_Type_size(MPI_Datatype type, int *size);
36693660
OMPI_DECLSPEC int PMPI_Type_size_c(MPI_Datatype type, MPI_Count *size);
3670-
OMPI_DECLSPEC int PMPI_Type_size_x(MPI_Datatype type, MPI_Count *size);
36713661
OMPI_DECLSPEC int PMPI_Type_vector(int count, int blocklength, int stride,
36723662
MPI_Datatype oldtype, MPI_Datatype *newtype);
36733663
OMPI_DECLSPEC int PMPI_Type_vector_c(MPI_Count count, MPI_Count blocklength, MPI_Count stride,
@@ -3912,6 +3902,33 @@ OMPI_DECLSPEC int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *va
39123902
OMPI_DECLSPEC int PMPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen,
39133903
int *flag)
39143904
__mpi_interface_deprecated_in_mpi40__("PMPI_Info_get_valuelen was deprecated in MPI-4.0; use PMPI_Info_get_string instead");
3905+
OMPI_DECLSPEC int MPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count)
3906+
__mpi_interface_deprecated_in_mpi41__("MPI_Get_elements_x was deprecated in MPI-4.1; use MPI_Get_elements_c instead");
3907+
OMPI_DECLSPEC int PMPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count)
3908+
__mpi_interface_deprecated_in_mpi41__("PMPI_Get_elements_x was deprecated in MPI-4.1; use PMPI_Get_elements_c instead");
3909+
OMPI_DECLSPEC int MPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype,
3910+
MPI_Count count)
3911+
__mpi_interface_deprecated_in_mpi41__("MPI_Status_set_elements_x was deprecated in MPI-4.1; use MPI_Status_set_elements_c instead");
3912+
OMPI_DECLSPEC int PMPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype,
3913+
MPI_Count count)
3914+
__mpi_interface_deprecated_in_mpi41__("PMPI_Status_set_elements_x was deprecated in MPI-4.1; use PMPI_Status_set_elements_c instead");
3915+
OMPI_DECLSPEC int MPI_Type_get_extent_x(MPI_Datatype type, MPI_Count *lb,
3916+
MPI_Count *extent)
3917+
__mpi_interface_deprecated_in_mpi41__("MPI_Type_get_extent_x was deprecated in MPI-4.1; use MPI_Type_get_extent_c instead");
3918+
OMPI_DECLSPEC int PMPI_Type_get_extent_x(MPI_Datatype type, MPI_Count *lb,
3919+
MPI_Count *extent)
3920+
__mpi_interface_deprecated_in_mpi41__("PMPI_Type_get_extent_x was deprecated in MPI-4.1; use PMPI_Type_get_extent_c instead");
3921+
OMPI_DECLSPEC int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *true_lb,
3922+
MPI_Count *true_extent)
3923+
__mpi_interface_deprecated_in_mpi41__("MPI_Type_get_true_extent_x was deprecated in MPI-4.1; use MPI_Type_get_true_extent_c instead");
3924+
OMPI_DECLSPEC int PMPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *true_lb,
3925+
MPI_Count *true_extent)
3926+
__mpi_interface_deprecated_in_mpi41__("PMPI_Type_get_true_extent_x was deprecated in MPI-4.1; use PMPI_Type_get_true_extent_c instead");
3927+
OMPI_DECLSPEC int MPI_Type_size_x(MPI_Datatype type, MPI_Count *size)
3928+
__mpi_interface_deprecated_in_mpi41__("MPI_Type_size_x was deprecated in MPI-4.1; use MPI_Type_size_c instead");
3929+
OMPI_DECLSPEC int PMPI_Type_size_x(MPI_Datatype type, MPI_Count *size)
3930+
__mpi_interface_deprecated_in_mpi41__("MPI_Type_size_x was deprecated in MPI-4.1; use MPI_Type_size_c instead");
3931+
39153932

39163933
OMPI_DECLSPEC int MPI_T_event_get_num (int *num_events);
39173934
OMPI_DECLSPEC int MPI_T_event_get_info (int event_index, char *name, int *name_len,

0 commit comments

Comments
 (0)