Skip to content

Commit

Permalink
Add MPI_F_XXX global variables for Fortran interoperability
Browse files Browse the repository at this point in the history
  • Loading branch information
dalcinl committed Mar 19, 2024
1 parent 2f9d87c commit b778402
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
16 changes: 12 additions & 4 deletions mpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
16 changes: 12 additions & 4 deletions mpistubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit b778402

Please sign in to comment.