From 66ec2047e5a3407af30f82e707fb0b98615dfbda Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 16 Apr 2026 18:38:59 -0400 Subject: [PATCH] MPIABI: Update to upstream MPICH 5.0.1 --- M/MPIABI/build_tarballs.jl | 16 +- M/MPIABI/bundled/files/fortran_binding_abi.c | 280 ++++++++++++++++++ M/MPIABI/bundled/patches/fortran.patch | 108 ------- M/MPIABI/bundled/patches/mpi.h.patch | 77 +++++ .../bundled/patches/mpich-disable-file.patch | 91 ++++++ 5 files changed, 460 insertions(+), 112 deletions(-) create mode 100644 M/MPIABI/bundled/files/fortran_binding_abi.c delete mode 100644 M/MPIABI/bundled/patches/fortran.patch create mode 100644 M/MPIABI/bundled/patches/mpi.h.patch create mode 100644 M/MPIABI/bundled/patches/mpich-disable-file.patch diff --git a/M/MPIABI/build_tarballs.jl b/M/MPIABI/build_tarballs.jl index 6b098bb39c5..a35451e3f19 100644 --- a/M/MPIABI/build_tarballs.jl +++ b/M/MPIABI/build_tarballs.jl @@ -9,7 +9,7 @@ name = "MPIABI" # OpenMPI's released versions. # # We are currently at version 0.1 because some details of the ABI are still being hashed out, e.g. the library SOVERSION. -version = v"0.1.3" +version = v"0.1.4" # The MPI ABI does not provide Fortran bindings. Packages using this # ABI should use a different package, e.g. @@ -24,8 +24,8 @@ sources = [ GitSource("https://github.com/mpi-forum/mpi-abi-stubs", "e3a9e9b16f86099723d287b6ab477626ab4956b8"), # MPICH source, implementing the C bindings - ArchiveSource("https://www.mpich.org/static/downloads/5.0.0/mpich-5.0.0.tar.gz", - "e9350e32224283e95311f22134f36c98e3cd1c665d17fae20a6cc92ed3cffe11"), + ArchiveSource("https://www.mpich.org/static/downloads/5.0.1/mpich-5.0.1.tar.gz", + "8c1832a13ddacf071685069f5fadfd1f2877a29e1a628652892c65211b1f3327"), # Patches DirectorySource("bundled"), @@ -45,6 +45,11 @@ cd ${WORKSPACE}/srcdir/mpich* # `` should not actually be used on FreeBSD.) atomic_patch -p1 ${WORKSPACE}/srcdir/patches/pthread_np.patch +# Add C bindings missing from the MPI ABI +cp ${WORKSPACE}/srcdir/files/fortran_binding_abi.c src/binding/abi/fortran_binding_abi.c +perl -pi -e 's!src/binding/abi/c_binding_abi.c!src/binding/abi/c_binding_abi.c src/binding/abi/fortran_binding_abi.c!' src/binding/abi/Makefile.mk +./autogen.sh + # - Do not install doc and man files which contain files which clashing names on # case-insensitive file systems: # * https://github.com/JuliaPackaging/Yggdrasil/pull/315 @@ -136,6 +141,9 @@ fi ./configure "${configure_flags[@]}" +# Disable MPI_File_{c2f,f2c} that shouldn't be there +atomic_patch -p1 ${WORKSPACE}/srcdir/patches/mpich-disable-file.patch + # Remove empty `-l` flags from libtool # (Why are they there? They should not be.) # Run the command several times to handle multiple (overlapping) occurrences. @@ -210,7 +218,7 @@ cd ${WORKSPACE}/srcdir/mpi-abi-stubs # # MPI programs may expect it, but the MPI ABI standard intentionally excludes it. # We choose to provide a Fortran ABI as well, and therefore we need to define it here. -atomic_patch -p1 ${WORKSPACE}/srcdir/patches/fortran.patch +atomic_patch -p1 ${WORKSPACE}/srcdir/patches/mpi.h.patch # Install the official MPI ABI header file install -Dvm 644 mpi.h ${includedir}/mpi.h diff --git a/M/MPIABI/bundled/files/fortran_binding_abi.c b/M/MPIABI/bundled/files/fortran_binding_abi.c new file mode 100644 index 00000000000..705cae7d3e5 --- /dev/null +++ b/M/MPIABI/bundled/files/fortran_binding_abi.c @@ -0,0 +1,280 @@ +// For MPICH + +#include "mpi_abi.h" + +//////////////////////////////////////////////////////////////////////////////// +// Types + +typedef int MPI_Fint; + +typedef MPI_Status MPI_F08_Status; + +//////////////////////////////////////////////////////////////////////////////// +// Constants + +#define MPI_F_STATUS_IGNORE ((MPI_Fint *)MPI_STATUS_IGNORE) +#define MPI_F_STATUSES_IGNORE ((MPI_Fint *)MPI_STATUSES_IGNORE) +#define MPI_F08_STATUS_IGNORE ((MPI_F08_Status *)MPI_STATUS_IGNORE) +#define MPI_F08_STATUSES_IGNORE ((MPI_F08_Status *)MPI_STATUSES_IGNORE) + +//////////////////////////////////////////////////////////////////////////////// +// Status functions + +__attribute__((visibility("default"))) int +PMPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status) { + if (f_status == MPI_F_STATUS_IGNORE || f_status == MPI_F_STATUSES_IGNORE || + c_status == MPI_STATUS_IGNORE || c_status == MPI_STATUSES_IGNORE) + return MPI_ERR_ARG; + *c_status = *(const MPI_Status *)f_status; + return MPI_SUCCESS; +} + +__attribute__((visibility("default"))) int +PMPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status) { + if (c_status == MPI_STATUS_IGNORE || c_status == MPI_STATUSES_IGNORE || + f_status == MPI_F_STATUS_IGNORE || f_status == MPI_F_STATUSES_IGNORE) + return MPI_ERR_ARG; + *(MPI_Status *)f_status = *c_status; + return MPI_SUCCESS; +} + +__attribute__((visibility("default"))) int +PMPI_Status_f082c(const MPI_F08_Status *f08_status, MPI_Status *c_status) { + if (f08_status == MPI_F08_STATUS_IGNORE || + f08_status == MPI_F08_STATUSES_IGNORE || c_status == MPI_STATUS_IGNORE || + c_status == MPI_STATUSES_IGNORE) + return MPI_ERR_ARG; + *c_status = *(const MPI_Status *)f08_status; + return MPI_SUCCESS; +} + +__attribute__((visibility("default"))) int +PMPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_Status *f08_status) { + if (c_status == MPI_STATUS_IGNORE || c_status == MPI_STATUSES_IGNORE || + f08_status == MPI_F08_STATUS_IGNORE || + f08_status == MPI_F08_STATUSES_IGNORE) + return MPI_ERR_ARG; + *(MPI_Status *)f08_status = *c_status; + return MPI_SUCCESS; +} + +__attribute__((visibility("default"))) int +MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status) { + return PMPI_Status_f2c(f_status, c_status); +} + +__attribute__((visibility("default"))) int +MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status) { + return PMPI_Status_c2f(c_status, f_status); +} + +__attribute__((visibility("default"))) int +MPI_Status_f082c(const MPI_F08_Status *f08_status, MPI_Status *c_status) { + return PMPI_Status_f082c(f08_status, c_status); +} + +__attribute__((visibility("default"))) int +MPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_Status *f08_status) { + return PMPI_Status_c2f08(c_status, f08_status); +} + +//////////////////////////////////////////////////////////////////////////////// +// Handle functions + +__attribute__((visibility("default"))) MPI_Comm PMPI_Comm_f2c(MPI_Fint comm) { + return MPI_Comm_fromint(comm); +} + +__attribute__((visibility("default"))) MPI_Fint PMPI_Comm_c2f(MPI_Comm comm) { + return MPI_Comm_toint(comm); +} + +__attribute__((visibility("default"))) MPI_Errhandler +PMPI_Errhandler_f2c(MPI_Fint errhandler) { + return MPI_Errhandler_fromint(errhandler); +} + +__attribute__((visibility("default"))) MPI_Fint +PMPI_Errhandler_c2f(MPI_Errhandler errhandler) { + return MPI_Errhandler_toint(errhandler); +} + +__attribute__((visibility("default"))) MPI_File PMPI_File_f2c(MPI_Fint file) { + return MPI_File_fromint(file); +} + +__attribute__((visibility("default"))) MPI_Fint PMPI_File_c2f(MPI_File file) { + return MPI_File_toint(file); +} + +__attribute__((visibility("default"))) MPI_Group +PMPI_Group_f2c(MPI_Fint group) { + return MPI_Group_fromint(group); +} + +__attribute__((visibility("default"))) MPI_Fint +PMPI_Group_c2f(MPI_Group group) { + return MPI_Group_toint(group); +} + +__attribute__((visibility("default"))) MPI_Info PMPI_Info_f2c(MPI_Fint info) { + return MPI_Info_fromint(info); +} + +__attribute__((visibility("default"))) MPI_Fint PMPI_Info_c2f(MPI_Info info) { + return MPI_Info_toint(info); +} + +__attribute__((visibility("default"))) MPI_Message +PMPI_Message_f2c(MPI_Fint message) { + return MPI_Message_fromint(message); +} + +__attribute__((visibility("default"))) MPI_Fint +PMPI_Message_c2f(MPI_Message message) { + return MPI_Message_toint(message); +} + +__attribute__((visibility("default"))) MPI_Op PMPI_Op_f2c(MPI_Fint op) { + return MPI_Op_fromint(op); +} + +__attribute__((visibility("default"))) MPI_Fint PMPI_Op_c2f(MPI_Op op) { + return MPI_Op_toint(op); +} + +__attribute__((visibility("default"))) MPI_Request +PMPI_Request_f2c(MPI_Fint request) { + return MPI_Request_fromint(request); +} + +__attribute__((visibility("default"))) MPI_Fint +PMPI_Request_c2f(MPI_Request request) { + return MPI_Request_toint(request); +} + +__attribute__((visibility("default"))) MPI_Session +PMPI_Session_f2c(MPI_Fint session) { + return MPI_Session_fromint(session); +} + +__attribute__((visibility("default"))) MPI_Fint +PMPI_Session_c2f(MPI_Session session) { + return MPI_Session_toint(session); +} + +__attribute__((visibility("default"))) MPI_Datatype +PMPI_Type_f2c(MPI_Fint datatype) { + return MPI_Type_fromint(datatype); +} + +__attribute__((visibility("default"))) MPI_Fint +PMPI_Type_c2f(MPI_Datatype datatype) { + return MPI_Type_toint(datatype); +} + +__attribute__((visibility("default"))) MPI_Win PMPI_Win_f2c(MPI_Fint win) { + return MPI_Win_fromint(win); +} + +__attribute__((visibility("default"))) MPI_Fint PMPI_Win_c2f(MPI_Win win) { + return MPI_Win_toint(win); +} + +__attribute__((visibility("default"))) MPI_Comm MPI_Comm_f2c(MPI_Fint comm) { + return PMPI_Comm_f2c(comm); +} + +__attribute__((visibility("default"))) MPI_Fint MPI_Comm_c2f(MPI_Comm comm) { + return PMPI_Comm_c2f(comm); +} + +__attribute__((visibility("default"))) MPI_Errhandler +MPI_Errhandler_f2c(MPI_Fint errhandler) { + return PMPI_Errhandler_f2c(errhandler); +} + +__attribute__((visibility("default"))) MPI_Fint +MPI_Errhandler_c2f(MPI_Errhandler errhandler) { + return PMPI_Errhandler_c2f(errhandler); +} + +__attribute__((visibility("default"))) MPI_File MPI_File_f2c(MPI_Fint file) { + return PMPI_File_f2c(file); +} + +__attribute__((visibility("default"))) MPI_Fint MPI_File_c2f(MPI_File file) { + return PMPI_File_c2f(file); +} + +__attribute__((visibility("default"))) MPI_Group MPI_Group_f2c(MPI_Fint group) { + return PMPI_Group_f2c(group); +} + +__attribute__((visibility("default"))) MPI_Fint MPI_Group_c2f(MPI_Group group) { + return PMPI_Group_c2f(group); +} + +__attribute__((visibility("default"))) MPI_Info MPI_Info_f2c(MPI_Fint info) { + return PMPI_Info_f2c(info); +} + +__attribute__((visibility("default"))) MPI_Fint MPI_Info_c2f(MPI_Info info) { + return PMPI_Info_c2f(info); +} + +__attribute__((visibility("default"))) MPI_Message +MPI_Message_f2c(MPI_Fint message) { + return PMPI_Message_f2c(message); +} + +__attribute__((visibility("default"))) MPI_Fint +MPI_Message_c2f(MPI_Message message) { + return PMPI_Message_c2f(message); +} + +__attribute__((visibility("default"))) MPI_Op MPI_Op_f2c(MPI_Fint op) { + return PMPI_Op_f2c(op); +} + +__attribute__((visibility("default"))) MPI_Fint MPI_Op_c2f(MPI_Op op) { + return PMPI_Op_c2f(op); +} + +__attribute__((visibility("default"))) MPI_Request +MPI_Request_f2c(MPI_Fint request) { + return PMPI_Request_f2c(request); +} + +__attribute__((visibility("default"))) MPI_Fint +MPI_Request_c2f(MPI_Request request) { + return PMPI_Request_c2f(request); +} + +__attribute__((visibility("default"))) MPI_Session +MPI_Session_f2c(MPI_Fint session) { + return PMPI_Session_f2c(session); +} + +__attribute__((visibility("default"))) MPI_Fint +MPI_Session_c2f(MPI_Session session) { + return PMPI_Session_c2f(session); +} + +__attribute__((visibility("default"))) MPI_Datatype +MPI_Type_f2c(MPI_Fint datatype) { + return PMPI_Type_f2c(datatype); +} + +__attribute__((visibility("default"))) MPI_Fint +MPI_Type_c2f(MPI_Datatype datatype) { + return PMPI_Type_c2f(datatype); +} + +__attribute__((visibility("default"))) MPI_Win MPI_Win_f2c(MPI_Fint win) { + return PMPI_Win_f2c(win); +} + +__attribute__((visibility("default"))) MPI_Fint MPI_Win_c2f(MPI_Win win) { + return PMPI_Win_c2f(win); +} diff --git a/M/MPIABI/bundled/patches/fortran.patch b/M/MPIABI/bundled/patches/fortran.patch deleted file mode 100644 index 353d09eae56..00000000000 --- a/M/MPIABI/bundled/patches/fortran.patch +++ /dev/null @@ -1,108 +0,0 @@ ---- a/mpi.h -+++ b/mpi.h -@@ -1899,7 +1899,105 @@ - int PMPI_T_source_get_info(int source_index, char *name, int *name_len, char *desc, int *desc_len, MPI_T_source_order *ordering, MPI_Count *ticks_per_second, MPI_Count *max_ticks, MPI_Info *info); - int PMPI_T_source_get_num(int *num_sources); - int PMPI_T_source_get_timestamp(int source_index, MPI_Count *timestamp); -+ -+/* Fortran declarations */ -+ -+typedef int MPI_Fint; -+ -+typedef MPI_Status MPI_F08_Status; -+ -+#define MPI_F_STATUS_IGNORE ((MPI_Fint*)MPI_STATUS_IGNORE) -+#define MPI_F_STATUSES_IGNORE ((MPI_Fint*)MPI_STATUSES_IGNORE) -+#define MPI_F08_STATUS_IGNORE ((MPI_F08_Status*)MPI_STATUS_IGNORE) -+#define MPI_F08_STATUSES_IGNORE ((MPI_F08_Status*)MPI_STATUSES_IGNORE) -+ -+static inline int PMPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status) -+{ -+ if (f_status == MPI_F_STATUS_IGNORE || f_status == MPI_F_STATUSES_IGNORE || -+ c_status == MPI_STATUS_IGNORE || c_status == MPI_STATUSES_IGNORE) -+ return MPI_ERR_ARG; -+ *c_status = *(const MPI_Status*)f_status; -+ return MPI_SUCCESS; -+} -+ -+static inline int PMPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status) -+{ -+ if (c_status == MPI_STATUS_IGNORE || c_status == MPI_STATUSES_IGNORE || -+ f_status == MPI_F_STATUS_IGNORE || f_status == MPI_F_STATUSES_IGNORE) -+ return MPI_ERR_ARG; -+ *(MPI_Status*)f_status = *c_status; -+ return MPI_SUCCESS; -+} -+ -+static inline int PMPI_Status_f082c(const MPI_F08_Status *f08_status, MPI_Status *c_status) -+{ -+ if (f08_status == MPI_F08_STATUS_IGNORE || f08_status == MPI_F08_STATUSES_IGNORE || -+ c_status == MPI_STATUS_IGNORE || c_status == MPI_STATUSES_IGNORE) -+ return MPI_ERR_ARG; -+ *c_status = *(const MPI_Status*)f08_status; -+ return MPI_SUCCESS; -+} -+ -+static inline int PMPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_Status *f08_status) -+{ -+ if (c_status == MPI_STATUS_IGNORE || c_status == MPI_STATUSES_IGNORE || -+ f08_status == MPI_F08_STATUS_IGNORE || f08_status == MPI_F08_STATUSES_IGNORE) -+ return MPI_ERR_ARG; -+ *(MPI_Status*)f08_status = *c_status; -+ return MPI_SUCCESS; -+} -+ -+static inline int MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status) { return PMPI_Status_f2c(f_status, c_status); } -+static inline int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status) { return PMPI_Status_c2f(c_status, f_status); } -+static inline int MPI_Status_f082c(const MPI_F08_Status *f08_status, MPI_Status *c_status) { return PMPI_Status_f082c(f08_status, c_status); } -+static inline int MPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_Status *f08_status) { return PMPI_Status_c2f08(c_status, f08_status); } -+ -+static inline MPI_Comm PMPI_Comm_f2c(MPI_Fint comm) { return MPI_Comm_fromint(comm); } -+static inline MPI_Fint PMPI_Comm_c2f(MPI_Comm comm) { return MPI_Comm_toint(comm); } -+static inline MPI_Errhandler PMPI_Errhandler_f2c(MPI_Fint errhandler) { return MPI_Errhandler_fromint(errhandler); } -+static inline MPI_Fint PMPI_Errhandler_c2f(MPI_Errhandler errhandler) { return MPI_Errhandler_toint(errhandler); } -+static inline MPI_File PMPI_File_f2c(MPI_Fint file) { return MPI_File_fromint(file); } -+static inline MPI_Fint PMPI_File_c2f(MPI_File file) { return MPI_File_toint(file); } -+static inline MPI_Group PMPI_Group_f2c(MPI_Fint group) { return MPI_Group_fromint(group); } -+static inline MPI_Fint PMPI_Group_c2f(MPI_Group group) { return MPI_Group_toint(group); } -+static inline MPI_Info PMPI_Info_f2c(MPI_Fint info) { return MPI_Info_fromint(info); } -+static inline MPI_Fint PMPI_Info_c2f(MPI_Info info) { return MPI_Info_toint(info); } -+static inline MPI_Message PMPI_Message_f2c(MPI_Fint message) { return MPI_Message_fromint(message); } -+static inline MPI_Fint PMPI_Message_c2f(MPI_Message message) { return MPI_Message_toint(message); } -+static inline MPI_Op PMPI_Op_f2c(MPI_Fint op) { return MPI_Op_fromint(op); } -+static inline MPI_Fint PMPI_Op_c2f(MPI_Op op) { return MPI_Op_toint(op); } -+static inline MPI_Request PMPI_Request_f2c(MPI_Fint request) { return MPI_Request_fromint(request); } -+static inline MPI_Fint PMPI_Request_c2f(MPI_Request request) { return MPI_Request_toint(request); } -+static inline MPI_Session PMPI_Session_f2c(MPI_Fint session) { return MPI_Session_fromint(session); } -+static inline MPI_Fint PMPI_Session_c2f(MPI_Session session) { return MPI_Session_toint(session); } -+static inline MPI_Datatype PMPI_Type_f2c(MPI_Fint datatype) { return MPI_Type_fromint(datatype); } -+static inline MPI_Fint PMPI_Type_c2f(MPI_Datatype datatype) { return MPI_Type_toint(datatype); } -+static inline MPI_Win PMPI_Win_f2c(MPI_Fint win) { return MPI_Win_fromint(win); } -+static inline MPI_Fint PMPI_Win_c2f(MPI_Win win) { return MPI_Win_toint(win); } -+ -+static inline MPI_Comm MPI_Comm_f2c(MPI_Fint comm) { return PMPI_Comm_f2c(comm); } -+static inline MPI_Fint MPI_Comm_c2f(MPI_Comm comm) { return PMPI_Comm_c2f(comm); } -+static inline MPI_Errhandler MPI_Errhandler_f2c(MPI_Fint errhandler) { return MPI_Errhandler_f2c(errhandler); } -+static inline MPI_Fint MPI_Errhandler_c2f(MPI_Errhandler errhandler) { return PMPI_Errhandler_c2f(errhandler); } -+static inline MPI_File MPI_File_f2c(MPI_Fint file) { return PMPI_File_f2c(file); } -+static inline MPI_Fint MPI_File_c2f(MPI_File file) { return PMPI_File_c2f(file); } -+static inline MPI_Group MPI_Group_f2c(MPI_Fint group) { return PMPI_Group_f2c(group); } -+static inline MPI_Fint MPI_Group_c2f(MPI_Group group) { return PMPI_Group_c2f(group); } -+static inline MPI_Info MPI_Info_f2c(MPI_Fint info) { return PMPI_Info_f2c(info); } -+static inline MPI_Fint MPI_Info_c2f(MPI_Info info) { return PMPI_Info_c2f(info); } -+static inline MPI_Message MPI_Message_f2c(MPI_Fint message) { return PMPI_Message_f2c(message); } -+static inline MPI_Fint MPI_Message_c2f(MPI_Message message) { return PMPI_Message_c2f(message); } -+static inline MPI_Op MPI_Op_f2c(MPI_Fint op) { return PMPI_Op_f2c(op); } -+static inline MPI_Fint MPI_Op_c2f(MPI_Op op) { return PMPI_Op_c2f(op); } -+static inline MPI_Request MPI_Request_f2c(MPI_Fint request) { return PMPI_Request_f2c(request); } -+static inline MPI_Fint MPI_Request_c2f(MPI_Request request) { return PMPI_Request_c2f(request); } -+static inline MPI_Session MPI_Session_f2c(MPI_Fint session) { return PMPI_Session_f2c(session); } -+static inline MPI_Fint MPI_Session_c2f(MPI_Session session) { return PMPI_Session_c2f(session); } -+static inline MPI_Datatype MPI_Type_f2c(MPI_Fint datatype) { return PMPI_Type_f2c(datatype); } -+static inline MPI_Fint MPI_Type_c2f(MPI_Datatype datatype) { return PMPI_Type_c2f(datatype); } -+static inline MPI_Win MPI_Win_f2c(MPI_Fint win) { return PMPI_Win_f2c(win); } -+static inline MPI_Fint MPI_Win_c2f(MPI_Win win) { return PMPI_Win_c2f(win); } - - #if defined(__cplusplus) - } - #endif diff --git a/M/MPIABI/bundled/patches/mpi.h.patch b/M/MPIABI/bundled/patches/mpi.h.patch new file mode 100644 index 00000000000..fe9d9f30db5 --- /dev/null +++ b/M/MPIABI/bundled/patches/mpi.h.patch @@ -0,0 +1,77 @@ +--- a/mpi.h ++++ b/mpi.h +@@ -1899,7 +1899,74 @@ + int PMPI_T_source_get_info(int source_index, char *name, int *name_len, char *desc, int *desc_len, MPI_T_source_order *ordering, MPI_Count *ticks_per_second, MPI_Count *max_ticks, MPI_Info *info); + int PMPI_T_source_get_num(int *num_sources); + int PMPI_T_source_get_timestamp(int source_index, MPI_Count *timestamp); ++ ++/* Fortran declarations */ ++ ++typedef int MPI_Fint; ++ ++typedef MPI_Status MPI_F08_Status; ++ ++#define MPI_F_STATUS_IGNORE ((MPI_Fint*)MPI_STATUS_IGNORE) ++#define MPI_F_STATUSES_IGNORE ((MPI_Fint*)MPI_STATUSES_IGNORE) ++#define MPI_F08_STATUS_IGNORE ((MPI_F08_Status*)MPI_STATUS_IGNORE) ++#define MPI_F08_STATUSES_IGNORE ((MPI_F08_Status*)MPI_STATUSES_IGNORE) ++ ++int PMPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status); ++int PMPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status); ++int PMPI_Status_f082c(const MPI_F08_Status *f08_status, MPI_Status *c_status); ++int PMPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_Status *f08_status); ++ ++int MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status); ++int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status); ++int MPI_Status_f082c(const MPI_F08_Status *f08_status, MPI_Status *c_status); ++int MPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_Status *f08_status); ++ ++MPI_Comm PMPI_Comm_f2c(MPI_Fint comm); ++MPI_Fint PMPI_Comm_c2f(MPI_Comm comm); ++MPI_Errhandler PMPI_Errhandler_f2c(MPI_Fint errhandler); ++MPI_Fint PMPI_Errhandler_c2f(MPI_Errhandler errhandler); ++MPI_File PMPI_File_f2c(MPI_Fint file); ++MPI_Fint PMPI_File_c2f(MPI_File file); ++MPI_Group PMPI_Group_f2c(MPI_Fint group); ++MPI_Fint PMPI_Group_c2f(MPI_Group group); ++MPI_Info PMPI_Info_f2c(MPI_Fint info); ++MPI_Fint PMPI_Info_c2f(MPI_Info info); ++MPI_Message PMPI_Message_f2c(MPI_Fint message); ++MPI_Fint PMPI_Message_c2f(MPI_Message message); ++MPI_Op PMPI_Op_f2c(MPI_Fint op); ++MPI_Fint PMPI_Op_c2f(MPI_Op op); ++MPI_Request PMPI_Request_f2c(MPI_Fint request); ++MPI_Fint PMPI_Request_c2f(MPI_Request request); ++MPI_Session PMPI_Session_f2c(MPI_Fint session); ++MPI_Fint PMPI_Session_c2f(MPI_Session session); ++MPI_Datatype PMPI_Type_f2c(MPI_Fint datatype); ++MPI_Fint PMPI_Type_c2f(MPI_Datatype datatype); ++MPI_Win PMPI_Win_f2c(MPI_Fint win); ++MPI_Fint PMPI_Win_c2f(MPI_Win win); ++ ++MPI_Comm MPI_Comm_f2c(MPI_Fint comm); ++MPI_Fint MPI_Comm_c2f(MPI_Comm comm); ++MPI_Errhandler MPI_Errhandler_f2c(MPI_Fint errhandler); ++MPI_Fint MPI_Errhandler_c2f(MPI_Errhandler errhandler); ++MPI_File MPI_File_f2c(MPI_Fint file); ++MPI_Fint MPI_File_c2f(MPI_File file); ++MPI_Group MPI_Group_f2c(MPI_Fint group); ++MPI_Fint MPI_Group_c2f(MPI_Group group); ++MPI_Info MPI_Info_f2c(MPI_Fint info); ++MPI_Fint MPI_Info_c2f(MPI_Info info); ++MPI_Message MPI_Message_f2c(MPI_Fint message); ++MPI_Fint MPI_Message_c2f(MPI_Message message); ++MPI_Op MPI_Op_f2c(MPI_Fint op); ++MPI_Fint MPI_Op_c2f(MPI_Op op); ++MPI_Request MPI_Request_f2c(MPI_Fint request); ++MPI_Fint MPI_Request_c2f(MPI_Request request); ++MPI_Session MPI_Session_f2c(MPI_Fint session); ++MPI_Fint MPI_Session_c2f(MPI_Session session); ++MPI_Datatype MPI_Type_f2c(MPI_Fint datatype); ++MPI_Fint MPI_Type_c2f(MPI_Datatype datatype); ++MPI_Win MPI_Win_f2c(MPI_Fint win); ++MPI_Fint MPI_Win_c2f(MPI_Win win); + + #if defined(__cplusplus) + } + #endif diff --git a/M/MPIABI/bundled/patches/mpich-disable-file.patch b/M/MPIABI/bundled/patches/mpich-disable-file.patch new file mode 100644 index 00000000000..8eacaf095f6 --- /dev/null +++ b/M/MPIABI/bundled/patches/mpich-disable-file.patch @@ -0,0 +1,91 @@ +--- a/src/binding/abi/io_abi.c ++++ b/src/binding/abi/io_abi.c +@@ -9,44 +9,7 @@ + #include "io_abi_internal.h" + #include "mpir_io_impl.h" + #include + +-/* -- Begin Profiling Symbol Block for routine MPI_File_c2f */ +-#if defined(HAVE_PRAGMA_WEAK) +-#pragma weak MPI_File_c2f = PMPI_File_c2f +-#elif defined(HAVE_PRAGMA_HP_SEC_DEF) +-#pragma _HP_SECONDARY_DEF PMPI_File_c2f MPI_File_c2f +-#elif defined(HAVE_PRAGMA_CRI_DUP) +-#pragma _CRI duplicate MPI_File_c2f as PMPI_File_c2f +-#elif defined(HAVE_WEAK_ATTRIBUTE) +-MPI_Fint MPI_File_c2f(MPI_File file) __attribute__ ((weak, alias("PMPI_File_c2f"))); +-#endif +-/* -- End Profiling Symbol Block */ +- +-/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build +- the MPI routines */ +-#ifndef MPICH_MPI_FROM_PMPI +-#undef MPI_File_c2f +-#define MPI_File_c2f PMPI_File_c2f +-#endif /* MPICH_MPI_FROM_PMPI */ +- +-static MPI_Fint internal_File_c2f(MPI_File file) +-{ +-#ifndef HAVE_ROMIO +- return 0; +-#else +- return MPIR_File_c2f_impl(file); +-#endif +-} +- +-MPI_Fint MPI_File_c2f(ABI_File file_abi) +-{ +- if ((uintptr_t) file_abi > 0 && (uintptr_t) file_abi < 4096) { +- return (int) (uintptr_t) file_abi; +- } +- MPI_File file = ABI_File_to_mpi(file_abi); +- return internal_File_c2f(file); +-} +- + /* -- Begin Profiling Symbol Block for routine MPI_File_close */ + #if defined(HAVE_PRAGMA_WEAK) + #pragma weak MPI_File_close = PMPI_File_close +@@ -131,43 +94,7 @@ + mpi_errno = MPIO_Err_return_file(MPI_FILE_NULL, mpi_errno); + goto fn_exit; + } + +-/* -- Begin Profiling Symbol Block for routine MPI_File_f2c */ +-#if defined(HAVE_PRAGMA_WEAK) +-#pragma weak MPI_File_f2c = PMPI_File_f2c +-#elif defined(HAVE_PRAGMA_HP_SEC_DEF) +-#pragma _HP_SECONDARY_DEF PMPI_File_f2c MPI_File_f2c +-#elif defined(HAVE_PRAGMA_CRI_DUP) +-#pragma _CRI duplicate MPI_File_f2c as PMPI_File_f2c +-#elif defined(HAVE_WEAK_ATTRIBUTE) +-MPI_File MPI_File_f2c(MPI_Fint file) __attribute__ ((weak, alias("PMPI_File_f2c"))); +-#endif +-/* -- End Profiling Symbol Block */ +- +-/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build +- the MPI routines */ +-#ifndef MPICH_MPI_FROM_PMPI +-#undef MPI_File_f2c +-#define MPI_File_f2c PMPI_File_f2c +-#endif /* MPICH_MPI_FROM_PMPI */ +- +-static MPI_File internal_File_f2c(MPI_Fint file) +-{ +-#ifndef HAVE_ROMIO +- return 0; +-#else +- return MPIR_File_f2c_impl(file); +-#endif +-} +- +-ABI_File MPI_File_f2c(MPI_Fint file) +-{ +- if (file > 0 && file < 4096) { +- return (ABI_File) (uintptr_t) file; +- } +- return ABI_File_from_mpi(internal_File_f2c(file)); +-} +- + /* -- Begin Profiling Symbol Block for routine MPI_File_get_amode */ + #if defined(HAVE_PRAGMA_WEAK) + #pragma weak MPI_File_get_amode = PMPI_File_get_amode