From b778402198085da7db3945d3ac58e00b7aee3b07 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Fri, 15 Mar 2024 23:39:18 +0300 Subject: [PATCH] Add MPI_F_XXX global variables for Fortran interoperability --- mpi.h | 16 ++++++++++++---- mpistubs.c | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/mpi.h b/mpi.h index 5e300d7..d53784e 100644 --- a/mpi.h +++ b/mpi.h @@ -577,10 +577,18 @@ typedef void (MPI_T_event_free_cb_function)(MPI_T_event_registration event_regis typedef void (MPI_T_event_dropped_cb_function)(MPI_Count count, MPI_T_event_registration event_registration, int source_index, MPI_T_cb_safety cb_safety, void *user_data); /* MPI global variables */ -extern MPI_Fint* MPI_F_STATUS_IGNORE; -extern MPI_Fint* MPI_F_STATUSES_IGNORE; -extern MPI_F08_status* MPI_F08_STATUS_IGNORE; -extern MPI_F08_status* MPI_F08_STATUSES_IGNORE; +extern void* MPIX_F_BOTTOM; +extern void* MPIX_F_IN_PLACE; +extern void* MPIX_F_BUFFER_AUTOMATIC; +extern char** MPIX_F_ARGV_NULL; +extern char*** MPIX_F_ARGVS_NULL; +extern MPI_Fint* MPIX_F_ERRCODES_IGNORE; +extern MPI_Fint* MPI_F_STATUS_IGNORE; +extern MPI_Fint* MPI_F_STATUSES_IGNORE; +extern MPI_F08_status* MPI_F08_STATUS_IGNORE; +extern MPI_F08_status* MPI_F08_STATUSES_IGNORE; +extern MPI_Fint* MPIX_F_UNWEIGHTED; +extern MPI_Fint* MPIX_F_WEIGHTS_EMPTY; /* MPI functions */ int MPI_Abort(MPI_Comm comm, int errorcode); diff --git a/mpistubs.c b/mpistubs.c index e84e082..345fa33 100644 --- a/mpistubs.c +++ b/mpistubs.c @@ -2,10 +2,18 @@ #include "mpi.h" /* MPI global variables */ -MPI_Fint * MPI_F_STATUS_IGNORE = NULL; -MPI_Fint * MPI_F_STATUSES_IGNORE = NULL; -MPI_F08_status * MPI_F08_STATUS_IGNORE = NULL; -MPI_F08_status * MPI_F08_STATUSES_IGNORE = NULL; +void* MPIX_F_BOTTOM = NULL; +void* MPIX_F_IN_PLACE = NULL; +void* MPIX_F_BUFFER_AUTOMATIC = NULL; +char** MPIX_F_ARGV_NULL = NULL; +char*** MPIX_F_ARGVS_NULL = NULL; +MPI_Fint* MPIX_F_ERRCODES_IGNORE = NULL; +MPI_Fint* MPI_F_STATUS_IGNORE = NULL; +MPI_Fint* MPI_F_STATUSES_IGNORE = NULL; +MPI_F08_status* MPI_F08_STATUS_IGNORE = NULL; +MPI_F08_status* MPI_F08_STATUSES_IGNORE = NULL; +MPI_Fint* MPIX_F_UNWEIGHTED = NULL; +MPI_Fint* MPIX_F_WEIGHTS_EMPTY = NULL; /* MPI functions */ int MPI_Abort(MPI_Comm comm, int errorcode) { abort(); return 0; }