Skip to content

Commit bc58e22

Browse files
authored
Merge pull request #6120 from gpaulsen/topic/v4.0.x/re-add-deprecated-oops
v4.0.x: Re-add removed deprecate-only MPI-2.0 symbols
2 parents 0258ed5 + 4aa91e1 commit bc58e22

26 files changed

+92
-39
lines changed

ompi/include/mpi.h.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
# define __mpi_interface_deprecated__(msg) __attribute__((__deprecated__))
280280
# endif
281281
# endif
282-
# if OMPI_ENABLE_MPI1_COMPAT
282+
# if (OMPI_ENABLE_MPI1_COMPAT && !OMPI_BUILDING)
283283
# define __mpi_interface_removed__(msg) __mpi_interface_deprecated__(msg)
284284
# define OMPI_OMIT_MPI1_COMPAT_DECLS 0
285285
# endif
@@ -1001,7 +1001,7 @@ OMPI_DECLSPEC extern struct ompi_predefined_info_t ompi_mpi_info_env;
10011001
OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUS_IGNORE;
10021002
OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE;
10031003

1004-
#if !OMPI_OMIT_MPI1_COMPAT_DECLS
1004+
#if (!OMPI_OMIT_MPI1_COMPAT_DECLS || OMPI_BUILDING)
10051005
/*
10061006
* Removed datatypes. These datatypes are only available if Open MPI
10071007
* was configured with --enable-mpi1-compatibility.
@@ -2662,7 +2662,7 @@ OMPI_DECLSPEC int OMPI_C_MPI_NULL_DELETE_FN( MPI_Comm comm, int comm_keyval,
26622662
void* extra_state )
26632663
__mpi_interface_deprecated__("MPI_NULL_DELETE_FN was deprecated in MPI-2.0; use MPI_COMM_NULL_DELETE_FN instead.");
26642664

2665-
#if !OMPI_OMIT_MPI1_COMPAT_DECLS
2665+
#if (!OMPI_OMIT_MPI1_COMPAT_DECLS || OMPI_BUILDING)
26662666
/*
26672667
* Removed typedefs. These typedefs are only available if Open MPI
26682668
* was configured with --enable-mpi1-compatibility.

ompi/mpi/c/Makefile.am

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ libmpi_c_mpi_la_SOURCES = \
7878
ialltoallv.c \
7979
alltoallw.c \
8080
ialltoallw.c \
81+
attr_delete.c \
82+
attr_get.c \
83+
attr_put.c \
8184
barrier.c \
8285
ibarrier.c \
8386
bcast.c \
@@ -285,6 +288,8 @@ libmpi_c_mpi_la_SOURCES = \
285288
ineighbor_alltoallv.c \
286289
neighbor_alltoallw.c \
287290
ineighbor_alltoallw.c \
291+
keyval_create.c \
292+
keyval_free.c \
288293
op_c2f.c \
289294
op_commutative.c \
290295
op_create.c \
@@ -431,24 +436,20 @@ libmpi_c_mpi_la_SOURCES = \
431436
win_unlock_all.c \
432437
win_wait.c
433438

434-
if OMPI_ENABLE_MPI1_COMPAT
439+
440+
# include all of the removed MPI functions in library
441+
# for v4.0.x regardless of state of OMPI_ENABLE_MPI1_COMPAT
435442
libmpi_c_mpi_la_SOURCES += \
436443
address.c \
437-
attr_delete.c \
438-
attr_get.c \
439-
attr_put.c \
440444
errhandler_create.c \
441445
errhandler_get.c \
442446
errhandler_set.c \
443-
keyval_create.c \
444-
keyval_free.c \
445447
type_extent.c \
446448
type_hindexed.c \
447449
type_hvector.c \
448450
type_lb.c \
449451
type_struct.c \
450452
type_ub.c
451-
endif
452453

453454
# Conditionally install the header files
454455

ompi/mpi/c/address.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@
2121
#include "ompi_config.h"
2222
#include <stdio.h>
2323

24+
/* This implementation has been removed from the MPI 3.1 standard.
25+
* Open MPI v4.0.x is keeping the implementation in the library, but
26+
* removing the prototypes from the headers, unless the user configures
27+
* with --enable-mpi1-compatibility.
28+
*
29+
* To prevent having to port these implementations of removed functions
30+
* to the newer MPI calls, we are defining ENABLE_MPI1_COMPAT to 1
31+
* before including the c bindings.
32+
*/
33+
#define ENABLE_MPI1_COMPAT 1
34+
2435
#include "ompi/mpi/c/bindings.h"
2536
#include "ompi/runtime/params.h"
2637
#include "ompi/communicator/communicator.h"

ompi/mpi/c/attr_fn.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12+
* Copyright (c) 2018 Research Organization for Information Science
13+
* and Technology (RIST). All rights reserved.
1214
* $COPYRIGHT$
1315
*
1416
* Additional copyrights may follow
@@ -131,11 +133,6 @@ int OMPI_C_MPI_COMM_DUP_FN( MPI_Comm comm, int comm_keyval, void* extra_state,
131133
return MPI_SUCCESS;
132134
}
133135

134-
#if !defined(OMPI_ENABLE_MPI1_COMPAT)
135-
136-
#error "Need to delete the code below now that the removed functions are no longer shipping"
137-
138-
#elif OMPI_ENABLE_MPI1_COMPAT
139136
int OMPI_C_MPI_NULL_DELETE_FN( MPI_Comm comm, int comm_keyval,
140137
void* attribute_val_out,
141138
void* extra_state )
@@ -159,4 +156,3 @@ int OMPI_C_MPI_DUP_FN( MPI_Comm comm, int comm_keyval, void* extra_state,
159156
*(void**)attribute_val_out = attribute_val_in;
160157
return MPI_SUCCESS;
161158
}
162-
#endif

ompi/mpi/c/errhandler_create.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23+
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
24+
* see comments in address.c for more information. */
25+
#define ENABLE_MPI1_COMPAT 1
26+
2327
#include "ompi/mpi/c/bindings.h"
2428
#include "ompi/communicator/communicator.h"
2529
#include "ompi/errhandler/errhandler.h"
@@ -31,7 +35,7 @@
3135
#define MPI_Errhandler_create PMPI_Errhandler_create
3236
#endif
3337

34-
int MPI_Errhandler_create(MPI_Handler_function *function,
38+
int MPI_Errhandler_create(MPI_Comm_errhandler_function *function,
3539
MPI_Errhandler *errhandler)
3640
{
3741

ompi/mpi/c/errhandler_get.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23+
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
24+
* see comments in address.c for more information. */
25+
#define ENABLE_MPI1_COMPAT 1
26+
2327
#include "ompi/mpi/c/bindings.h"
2428
#include "ompi/runtime/params.h"
2529
#include "ompi/communicator/communicator.h"

ompi/mpi/c/errhandler_set.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23+
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
24+
* see comments in address.c for more information. */
25+
#define ENABLE_MPI1_COMPAT 1
26+
2327
#include "ompi/mpi/c/bindings.h"
2428
#include "ompi/runtime/params.h"
2529
#include "ompi/communicator/communicator.h"

ompi/mpi/c/profile/Makefile.am

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ nodist_libmpi_c_pmpi_la_SOURCES = \
5858
pialltoallv.c \
5959
palltoallw.c \
6060
pialltoallw.c \
61+
pattr_delete.c \
62+
pattr_get.c \
63+
pattr_put.c \
6164
pbarrier.c \
6265
pibarrier.c \
6366
pbcast.c \
@@ -265,6 +268,8 @@ nodist_libmpi_c_pmpi_la_SOURCES = \
265268
pineighbor_alltoallv.c \
266269
pneighbor_alltoallw.c \
267270
pineighbor_alltoallw.c \
271+
pkeyval_create.c \
272+
pkeyval_free.c \
268273
pop_c2f.c \
269274
pop_create.c \
270275
pop_commutative.c \
@@ -411,24 +416,19 @@ nodist_libmpi_c_pmpi_la_SOURCES = \
411416
pwin_unlock_all.c \
412417
pwin_wait.c
413418

414-
if OMPI_ENABLE_MPI1_COMPAT
419+
# include all of the removed MPI functions in library
420+
# for v4.0.x regardless of state of OMPI_ENABLE_MPI1_COMPAT
415421
nodist_libmpi_c_pmpi_la_SOURCES += \
416422
paddress.c \
417-
pattr_delete.c \
418-
pattr_get.c \
419-
pattr_put.c \
420423
perrhandler_create.c \
421424
perrhandler_get.c \
422425
perrhandler_set.c \
423-
pkeyval_create.c \
424-
pkeyval_free.c \
425426
ptype_extent.c \
426427
ptype_hindexed.c \
427428
ptype_hvector.c \
428429
ptype_lb.c \
429430
ptype_struct.c \
430431
ptype_ub.c
431-
endif
432432

433433
#
434434
# Sym link in the sources from the real MPI directory

ompi/mpi/c/type_extent.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23+
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
24+
* see comments in address.c for more information. */
25+
#define ENABLE_MPI1_COMPAT 1
26+
2327
#include "ompi/mpi/c/bindings.h"
2428
#include "ompi/runtime/params.h"
2529
#include "ompi/communicator/communicator.h"

ompi/mpi/c/type_hindexed.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23+
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
24+
* see comments in address.c for more information. */
25+
#define ENABLE_MPI1_COMPAT 1
26+
2327
#include "ompi/mpi/c/bindings.h"
2428
#include "ompi/runtime/params.h"
2529
#include "ompi/communicator/communicator.h"

ompi/mpi/c/type_hvector.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23+
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
24+
* see comments in address.c for more information. */
25+
#define ENABLE_MPI1_COMPAT 1
26+
2327
#include "ompi/mpi/c/bindings.h"
2428
#include "ompi/runtime/params.h"
2529
#include "ompi/communicator/communicator.h"

ompi/mpi/c/type_lb.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23+
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
24+
* see comments in address.c for more information. */
25+
#define ENABLE_MPI1_COMPAT 1
26+
2327
#include "ompi/mpi/c/bindings.h"
2428
#include "ompi/runtime/params.h"
2529
#include "ompi/communicator/communicator.h"

ompi/mpi/c/type_struct.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23+
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
24+
* see comments in address.c for more information. */
25+
#define ENABLE_MPI1_COMPAT 1
26+
2327
#include "ompi/mpi/c/bindings.h"
2428

2529
#if OMPI_BUILD_MPI_PROFILING

ompi/mpi/c/type_ub.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23+
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
24+
* see comments in address.c for more information. */
25+
#define ENABLE_MPI1_COMPAT 1
26+
2327
#include "ompi/mpi/c/bindings.h"
2428
#include "ompi/runtime/params.h"
2529
#include "ompi/communicator/communicator.h"

ompi/mpi/fortran/mpif-h/Makefile.am

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ lib@OMPI_LIBMPI_NAME@_mpifh_la_SOURCES += \
138138
alltoall_f.c \
139139
alltoallv_f.c \
140140
alltoallw_f.c \
141+
attr_delete_f.c \
142+
attr_get_f.c \
143+
attr_put_f.c \
141144
barrier_f.c \
142145
bcast_f.c \
143146
bsend_f.c \
@@ -335,6 +338,8 @@ lib@OMPI_LIBMPI_NAME@_mpifh_la_SOURCES += \
335338
iscatterv_f.c \
336339
issend_f.c \
337340
is_thread_main_f.c \
341+
keyval_create_f.c \
342+
keyval_free_f.c \
338343
lookup_name_f.c \
339344
mprobe_f.c \
340345
mrecv_f.c \
@@ -476,26 +481,20 @@ lib@OMPI_LIBMPI_NAME@_mpifh_la_SOURCES += \
476481
win_flush_local_f.c \
477482
win_flush_local_all_f.c
478483

479-
480-
if OMPI_ENABLE_MPI1_COMPAT
484+
# include all of the removed MPI functions in library
485+
# for v4.0.x regardless of state of OMPI_ENABLE_MPI1_COMPAT
481486
lib@OMPI_LIBMPI_NAME@_mpifh_la_SOURCES += \
482487
address_f.c \
483-
attr_delete_f.c \
484-
attr_get_f.c \
485-
attr_put_f.c \
486488
errhandler_create_f.c \
487489
errhandler_get_f.c \
488490
errhandler_set_f.c \
489-
keyval_create_f.c \
490-
keyval_free_f.c \
491491
type_extent_f.c \
492492
type_hindexed_f.c \
493493
type_hvector_f.c \
494494
type_lb_f.c \
495495
type_struct_f.c \
496496
type_ub_f.c
497497
endif
498-
endif
499498

500499
#
501500
# Conditionally install the header files

ompi/mpi/fortran/mpif-h/address_f.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
1313
* Copyright (c) 2015 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
15+
* Copyright (c) 2018 IBM Corporation. All rights reserved.
1516
* $COPYRIGHT$
1617
*
1718
* Additional copyrights may follow

ompi/mpi/fortran/mpif-h/errhandler_create_f.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Copyright (c) 2008-2012 Cisco Systems, Inc. All rights reserved.
1313
* Copyright (c) 2015 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
15+
* Copyright (c) 2018 IBM Corporation. All rights reserved.
1516
* $COPYRIGHT$
1617
*
1718
* Additional copyrights may follow

ompi/mpi/fortran/mpif-h/errhandler_get_f.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
1313
* Copyright (c) 2015 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
15+
* Copyright (c) 2018 IBM Corporation. All rights reserved.
1516
* $COPYRIGHT$
1617
*
1718
* Additional copyrights may follow

ompi/mpi/fortran/mpif-h/errhandler_set_f.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Copyright (c) 2008-2012 Cisco Systems, Inc. All rights reserved.
1313
* Copyright (c) 2015 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
15+
* Copyright (c) 2018 IBM Corporation. All rights reserved.
1516
* $COPYRIGHT$
1617
*
1718
* Additional copyrights may follow

ompi/mpi/fortran/mpif-h/profile/Makefile.am

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ linked_files = \
5454
palltoall_f.c \
5555
palltoallv_f.c \
5656
palltoallw_f.c \
57+
pattr_delete_f.c \
58+
pattr_get_f.c \
59+
pattr_put_f.c \
5760
pbarrier_f.c \
5861
pbcast_f.c \
5962
pbsend_f.c \
@@ -251,6 +254,8 @@ linked_files = \
251254
pisend_f.c \
252255
pissend_f.c \
253256
pis_thread_main_f.c \
257+
pkeyval_create_f.c \
258+
pkeyval_free_f.c \
254259
plookup_name_f.c \
255260
pmprobe_f.c \
256261
pmrecv_f.c \
@@ -392,24 +397,19 @@ linked_files = \
392397
pwin_flush_local_f.c \
393398
pwin_flush_local_all_f.c
394399

395-
if OMPI_ENABLE_MPI1_COMPAT
400+
# include all of the removed MPI functions in library
401+
# for v4.0.x regardless of state of OMPI_ENABLE_MPI1_COMPAT
396402
linked_files += \
397403
paddress_f.c \
398-
pattr_delete_f.c \
399-
pattr_get_f.c \
400-
pattr_put_f.c \
401404
perrhandler_create_f.c \
402405
perrhandler_get_f.c \
403406
perrhandler_set_f.c \
404-
pkeyval_create_f.c \
405-
pkeyval_free_f.c \
406407
ptype_extent_f.c \
407408
ptype_hindexed_f.c \
408409
ptype_hvector_f.c \
409410
ptype_lb_f.c \
410411
ptype_struct_f.c \
411412
ptype_ub_f.c
412-
endif
413413

414414
#
415415
# Sym link in the sources from the real MPI directory

0 commit comments

Comments
 (0)