Skip to content

Commit 5c47dab

Browse files
hppritchadalcinl
andcommitted
ABI: multiple fixes
Many fixes and improvements contributed by dalcinl. Add fortran support functions and some other functions missing from initial work. Return to generating converter functions as part of the build out of the abi variants. Signed-off-by: Howard Pritchard <howardp@lanl.gov> Co-authored-by: Lisandro Dalcin <dalcinl@gmail.com>
1 parent d07b17b commit 5c47dab

File tree

478 files changed

+9817
-2196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

478 files changed

+9817
-2196
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,11 @@ docs/man
537537
ompi/mpi/c/*_generated*.c
538538
ompi/mpi/c/standard_*.c
539539
ompi/mpi/c/abi.h
540+
ompi/mpi/c/abi_get_info.c
541+
ompi/mpi/c/abi_converters.h
542+
ompi/mpi/c/abi_converters.c
540543
ompi/mpi/c/standard_abi
544+
ompi/mpi/tool/*_generated*.c
541545

542546
# Generated Fortran Bindings
543547
ompi/mpi/fortran/use-mpi-f08/*_generated.F90

VERSION

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ minor=1
2020
release=0
2121

2222
# MPI Standard Compliance Level
23-
mpi_standard_version=3
24-
mpi_standard_subversion=1
23+
mpi_standard_version=5
24+
mpi_standard_subversion=0
2525

2626
# OMPI required dependency versions.
2727
# List in x.y.z format.
@@ -92,6 +92,14 @@ date="Unreleased developer copy"
9292
# but they are "public" within the OMPI code base and select 3rd party
9393
# software packages.
9494

95+
# The current and age values of the libmpi_abi shared library are
96+
# implicitly determined by the MPI ABI definition of the
97+
# version of the MPI specification supported by this Open MPI release.
98+
# The MPI ABI is intended not to break backward compatibility,
99+
# so presumably the current and age values will move in lock step.
100+
# We assume we have flexibility with the revision number as
101+
# bugs are fixed, etc.
102+
95103
# Version numbers are described in the Libtool current:revision:age
96104
# format.
97105

@@ -100,6 +108,7 @@ libmpi_mpifh_so_version=0:0:0
100108
libmpi_usempi_tkr_so_version=0:0:0
101109
libmpi_usempi_ignore_tkr_so_version=0:0:0
102110
libmpi_usempif08_so_version=0:0:0
111+
libmpi_abi_so_version=0:0:0
103112
libopen_pal_so_version=0:0:0
104113
libmpi_java_so_version=0:0:0
105114
liboshmem_so_version=0:0:0

config/ompi_fortran_check_logical_array.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ dnl All rights reserved.
1111
dnl Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
1212
dnl Copyright (c) 2015 Research Organization for Information Science
1313
dnl and Technology (RIST). All rights reserved.
14+
dnl Copyright (c) 2025 Triad National Security, LLC. All rights
15+
dnl reserved.
1416
dnl $COPYRIGHT$
1517
dnl
1618
dnl Additional copyrights may follow
@@ -64,7 +66,7 @@ void ompi_check_f(ompi_fortran_logical_t * logical)
6466
FILE *f=fopen("conftestval", "w");
6567
if (!f) exit(1);
6668

67-
if (logical[[0]] == 0 &&
69+
if (logical[[0]] == $ompi_cv_fortran_false_value &&
6870
logical[[1]] == $ompi_cv_fortran_true_value)
6971
result = 1;
7072
fprintf(f, "%d\n", result);

config/ompi_fortran_get_value_true.m4

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ dnl All rights reserved.
1111
dnl Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
1212
dnl Copyright (c) 2015 Research Organization for Information Science
1313
dnl and Technology (RIST). All rights reserved.
14+
dnl Copyright (c) 2025 Triad National Security, LLC. All rights
15+
dnl reserved.
1416
dnl $COPYRIGHT$
1517
dnl
1618
dnl Additional copyrights may follow
@@ -27,16 +29,22 @@ AC_DEFUN([OMPI_FORTRAN_GET_VALUE_TRUE],[
2729
if test "$ompi_cv_fortran_true_value" = "0" ; then
2830
unset ompi_cv_fortran_true_value
2931
fi
32+
if test "$ompi_cv_fortran_false_value" = "0" ; then
33+
unset ompi_cv_fortran_false_value
34+
fi
3035

3136
AS_VAR_PUSHDEF([fortran_true_var],
3237
[ompi_cv_fortran_true_value])
38+
AS_VAR_PUSHDEF([fortran_false_var],
39+
[ompi_cv_fortran_false_value])
3340

3441
AC_CACHE_CHECK([Fortran value for .TRUE. logical type],
3542
fortran_true_var,
3643
[if test "$1" = "none" || \
3744
test $OMPI_TRY_FORTRAN_BINDINGS -eq $OMPI_FORTRAN_NO_BINDINGS || \
3845
test $ompi_fortran_happy -eq 0 ; then
39-
value=77
46+
tvalue=77
47+
fvalue=77
4048
else
4149
#
4250
# C module
@@ -98,6 +106,14 @@ EOF
98106
CALL ompi_print(value)
99107
end
100108
EOF
109+
cat > conftestf2.f <<EOF
110+
program main
111+
logical value
112+
value=.FALSE.
113+
CALL ompi_print(value)
114+
end
115+
EOF
116+
101117

102118
#
103119
# Try the compilation and run.
@@ -114,11 +130,40 @@ EOF
114130
AS_IF([test "$cross_compiling" = "yes"],
115131
[AC_MSG_ERROR([Can not determine value of .TRUE. when cross-compiling])],
116132
[OPAL_LOG_COMMAND([./conftest],
117-
[value=`sed 's/ *//' conftestval`],
133+
[tvalue=`sed 's/ *//' conftestval`],
118134
[AC_MSG_ERROR([Could not determine value of Fotran .TRUE.. Aborting.])])])
135+
136+
cat > conftestf.f <<EOF
137+
program main
138+
logical value
139+
value=.FALSE.
140+
CALL ompi_print(value)
141+
end
142+
EOF
143+
144+
#
145+
# Try the compilation and run.
146+
#
147+
OPAL_LOG_COMMAND([$CC $CFLAGS -I. -c conftest.c],
148+
[OPAL_LOG_COMMAND([$FC $FCFLAGS -o conftest conftest.o conftestf.f $LDFLAGS $LIBS],
149+
[happy=1], [happy=0])],
150+
[happy=0])
151+
152+
AS_IF([test $happy -eq 0 && test $ompi_fortran_happy -eq 1],
153+
[AC_MSG_ERROR([Could not compile Fortran .FALSE. test. Aborting.])
154+
])
155+
156+
AS_IF([test "$cross_compiling" = "yes"],
157+
[AC_MSG_ERROR([Can not determine value of .FALSE. when cross-compiling])],
158+
[OPAL_LOG_COMMAND([./conftest],
159+
[fvalue=`sed 's/ *//' conftestval`],
160+
[AC_MSG_ERROR([Could not determine value of Fotran .FALSE.. Aborting.])])])
119161
fi
120-
AS_VAR_SET(fortran_true_var, [$value])
121-
unset value
162+
AS_VAR_SET(fortran_true_var, [$tvalue])
163+
unset tvalue
164+
AS_VAR_SET(fortran_false_var, [$fvalue])
165+
unset fvalue
166+
122167
])
123168

124169
AS_VAR_COPY([ompi_fortran_true_value], [fortran_true_var])
@@ -127,6 +172,13 @@ EOF
127172
[Fortran value for LOGICAL .TRUE. value])
128173
AS_VAR_POPDEF([fortran_true_var])
129174

175+
AS_VAR_COPY([ompi_fortran_false_value], [fortran_false_var])
176+
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_VALUE_FALSE],
177+
[$ompi_fortran_false_value],
178+
[Fortran value for LOGICAL .FALSE. value])
179+
AS_VAR_POPDEF([fortran_false_var])
180+
181+
130182
unset happy ompi_print_logical_fn
131183
rm -rf conftest*
132184
])dnl

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ OPAL_SAVE_VERSION([OPAL], [Open Portable Access Layer], [$srcdir/VERSION],
147147

148148
m4_ifdef([project_ompi],
149149
[AC_SUBST(libmpi_so_version)
150+
AC_SUBST(libmpi_abi_so_version)
150151
AC_SUBST(libmpi_mpifh_so_version)
151152
AC_SUBST(libmpi_usempi_tkr_so_version)
152153
AC_SUBST(libmpi_usempi_ignore_tkr_so_version)

docs/Makefile.am

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ OMPI_MAN1 = \
8787
opal_wrapper.1
8888

8989
OMPI_MAN3 = \
90+
MPI_Abi_get_fortran_booleans.3 \
91+
MPI_Abi_get_fortran_info.3 \
92+
MPI_Abi_get_info.3 \
93+
MPI_Abi_get_version.3 \
94+
MPI_Abi_set_fortran_booleans.3 \
95+
MPI_Abi_set_fortran_info.3 \
9096
MPI_Abort.3 \
9197
MPI_Accumulate.3 \
9298
MPI_Add_error_class.3 \
@@ -151,6 +157,7 @@ OMPI_MAN3 = \
151157
MPI_Comm_flush_buffer.3 \
152158
MPI_Comm_free.3 \
153159
MPI_Comm_free_keyval.3 \
160+
MPI_Comm_fromint.3 \
154161
MPI_Comm_get_attr.3 \
155162
MPI_Comm_get_errhandler.3 \
156163
MPI_Comm_get_info.3 \
@@ -174,6 +181,7 @@ OMPI_MAN3 = \
174181
MPI_Comm_split.3 \
175182
MPI_Comm_split_type.3 \
176183
MPI_Comm_test_inter.3 \
184+
MPI_Comm_toint.3 \
177185
MPI_Compare_and_swap.3 \
178186
MPI_Dims_create.3 \
179187
MPI_Dist_graph_create.3 \
@@ -182,8 +190,10 @@ OMPI_MAN3 = \
182190
MPI_Dist_graph_neighbors_count.3 \
183191
MPI_Errhandler_create.3 \
184192
MPI_Errhandler_free.3 \
193+
MPI_Errhandler_fromint.3 \
185194
MPI_Errhandler_get.3 \
186195
MPI_Errhandler_set.3 \
196+
MPI_Errhandler_toint.3 \
187197
MPI_Error_class.3 \
188198
MPI_Error_string.3 \
189199
MPI_Errors.3 \
@@ -196,6 +206,7 @@ OMPI_MAN3 = \
196206
MPI_File_create_errhandler.3 \
197207
MPI_File_delete.3 \
198208
MPI_File_f2c.3 \
209+
MPI_File_fromint.3 \
199210
MPI_File_get_amode.3 \
200211
MPI_File_get_atomicity.3 \
201212
MPI_File_get_byte_offset.3 \
@@ -239,6 +250,7 @@ OMPI_MAN3 = \
239250
MPI_File_set_size.3 \
240251
MPI_File_set_view.3 \
241252
MPI_File_sync.3 \
253+
MPI_File_toint.3 \
242254
MPI_File_write.3 \
243255
MPI_File_write_all.3 \
244256
MPI_File_write_all_begin.3 \
@@ -282,13 +294,15 @@ OMPI_MAN3 = \
282294
MPI_Group_excl.3 \
283295
MPI_Group_f2c.3 \
284296
MPI_Group_free.3 \
297+
MPI_Group_fromint.3 \
285298
MPI_Group_from_session_pset.3 \
286299
MPI_Group_incl.3 \
287300
MPI_Group_intersection.3 \
288301
MPI_Group_range_excl.3 \
289302
MPI_Group_range_incl.3 \
290303
MPI_Group_rank.3 \
291304
MPI_Group_size.3 \
305+
MPI_Group_toint.3 \
292306
MPI_Group_translate_ranks.3 \
293307
MPI_Group_union.3 \
294308
MPI_Iallgather.3 \
@@ -317,12 +331,14 @@ OMPI_MAN3 = \
317331
MPI_Info_env.3 \
318332
MPI_Info_f2c.3 \
319333
MPI_Info_free.3 \
334+
MPI_Info_fromint.3 \
320335
MPI_Info_get.3 \
321336
MPI_Info_get_nkeys.3 \
322337
MPI_Info_get_nthkey.3 \
323338
MPI_Info_get_string.3 \
324339
MPI_Info_get_valuelen.3 \
325340
MPI_Info_set.3 \
341+
MPI_Info_toint.3 \
326342
MPI_Init.3 \
327343
MPI_Initialized.3 \
328344
MPI_Init_thread.3 \
@@ -348,6 +364,8 @@ OMPI_MAN3 = \
348364
MPI_Lookup_name.3 \
349365
MPI_Message_c2f.3 \
350366
MPI_Message_f2c.3 \
367+
MPI_Message_fromint.3 \
368+
MPI_Message_toint.3 \
351369
MPI_Mprobe.3 \
352370
MPI_Mrecv.3 \
353371
MPI_Neighbor_allgather.3 \
@@ -366,6 +384,8 @@ OMPI_MAN3 = \
366384
MPI_Open_port.3 \
367385
MPI_Op_f2c.3 \
368386
MPI_Op_free.3 \
387+
MPI_Op_fromint.3 \
388+
MPI_Op_toint.3 \
369389
MPI_Pack.3 \
370390
MPI_Pack_external.3 \
371391
MPI_Pack_external_size.3 \
@@ -398,10 +418,12 @@ OMPI_MAN3 = \
398418
MPI_Request_c2f.3 \
399419
MPI_Request_f2c.3 \
400420
MPI_Request_free.3 \
421+
MPI_Request_fromint.3 \
401422
MPI_Request_get_status.3 \
402423
MPI_Request_get_status_all.3 \
403424
MPI_Request_get_status_any.3 \
404425
MPI_Request_get_status_some.3 \
426+
MPI_Request_toint.3 \
405427
MPI_Rget.3 \
406428
MPI_Rget_accumulate.3 \
407429
MPI_Rput.3 \
@@ -423,12 +445,14 @@ OMPI_MAN3 = \
423445
MPI_Session_f2c.3 \
424446
MPI_Session_finalize.3 \
425447
MPI_Session_flush_buffer.3 \
448+
MPI_Session_fromint.3 \
426449
MPI_Session_get_info.3 \
427450
MPI_Session_get_nth_pset.3 \
428451
MPI_Session_get_num_psets.3 \
429452
MPI_Session_get_pset_info.3 \
430453
MPI_Session_iflush_buffer.3 \
431454
MPI_Session_init.3 \
455+
MPI_Session_toint.3 \
432456
MPI_Sizeof.3 \
433457
MPI_Ssend.3 \
434458
MPI_Ssend_init.3 \
@@ -440,6 +464,7 @@ OMPI_MAN3 = \
440464
MPI_Status_f082f.3 \
441465
MPI_Status_f2c.3 \
442466
MPI_Status_f2f08.3 \
467+
MPI_Status_fromint.3 \
443468
MPI_Status_get_error.3 \
444469
MPI_Status_get_source.3 \
445470
MPI_Status_get_tag.3 \
@@ -449,6 +474,7 @@ OMPI_MAN3 = \
449474
MPI_Status_set_error.3 \
450475
MPI_Status_set_source.3 \
451476
MPI_Status_set_tag.3 \
477+
MPI_Status_toint.3 \
452478
MPI_T.3 \
453479
MPI_T_category_changed.3 \
454480
MPI_T_category_get_categories.3 \
@@ -525,6 +551,7 @@ OMPI_MAN3 = \
525551
MPI_Type_f2c.3 \
526552
MPI_Type_free.3 \
527553
MPI_Type_free_keyval.3 \
554+
MPI_Type_fromint.3 \
528555
MPI_Type_get_attr.3 \
529556
MPI_Type_get_contents.3 \
530557
MPI_Type_get_envelope.3 \
@@ -544,6 +571,7 @@ OMPI_MAN3 = \
544571
MPI_Type_size.3 \
545572
MPI_Type_size_x.3 \
546573
MPI_Type_struct.3 \
574+
MPI_Type_toint.3 \
547575
MPI_Type_ub.3 \
548576
MPI_Type_vector.3 \
549577
MPI_Unpack.3 \
@@ -573,6 +601,7 @@ OMPI_MAN3 = \
573601
MPI_Win_flush_local_all.3 \
574602
MPI_Win_free.3 \
575603
MPI_Win_free_keyval.3 \
604+
MPI_Win_fromint.3 \
576605
MPI_Win_get_attr.3 \
577606
MPI_Win_get_errhandler.3 \
578607
MPI_Win_get_group.3 \
@@ -589,6 +618,7 @@ OMPI_MAN3 = \
589618
MPI_Win_start.3 \
590619
MPI_Win_sync.3 \
591620
MPI_Win_test.3 \
621+
MPI_Win_toint.3 \
592622
MPI_Win_unlock.3 \
593623
MPI_Win_unlock_all.3 \
594624
MPI_Win_wait.3 \

docs/building-apps/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ Open MPI "wrapper" compilers.
1414
removed-mpi-constructs
1515
deprecation-warnings
1616
building-static-apps
17+
mpi-abi
1718

18-
.. warning:: Open MPI does not attempt to interoperate with other MPI
19+
.. warning:: Except when using the MPI ABI compiler wrapper (mpicc_abi),
20+
Open MPI does not attempt to interoperate with other MPI
1921
implementations, nor executables that were compiled for
2022
them. MPI applications need to be compiled and linked
2123
with Open MPI in order to run under Open MPI.

0 commit comments

Comments
 (0)