Skip to content

Commit 8553ba8

Browse files
dalcinljeffhammond
authored andcommitted
Add Status F08 <-> C/F conversion routines
1 parent 2e20165 commit 8553ba8

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

mpi.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ enum {
160160
MPI_F_STATUS_SIZE = 8
161161
};
162162

163+
typedef struct {
164+
MPI_Fint mpi_val[MPI_F_STATUS_SIZE];
165+
} MPI_F08_status;
166+
163167
// Error classes
164168
enum {
165169
MPI_SUCCESS = 0,
@@ -543,6 +547,8 @@ typedef void (MPI_T_event_dropped_cb_function)(MPI_Count count, MPI_T_event_regi
543547
/* MPI global variables */
544548
extern MPI_Fint * MPI_F_STATUS_IGNORE;
545549
extern MPI_Fint * MPI_F_STATUSES_IGNORE;
550+
extern MPI_F08_status * MPI_F08_STATUS_IGNORE;
551+
extern MPI_F08_status * MPI_F08_STATUSES_IGNORE;
546552

547553
/* MPI functions */
548554
int MPI_Abort(MPI_Comm comm, int errorcode);
@@ -1132,6 +1138,10 @@ double MPI_Wtime(void);
11321138

11331139
int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status);
11341140
int MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status);
1141+
int MPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_status *f08_status);
1142+
int MPI_Status_f082c(const MPI_F08_status *f08_status, MPI_Status *c_status);
1143+
int MPI_Status_f2f08(const MPI_Fint *f_status, MPI_F08_status *f08_status);
1144+
int MPI_Status_f082f(const MPI_F08_status *f08_status, MPI_Fint *f_status);
11351145
MPI_Fint MPI_Comm_c2f(MPI_Comm comm);
11361146
MPI_Comm MPI_Comm_f2c(MPI_Fint comm);
11371147
MPI_Fint MPI_Errhandler_c2f(MPI_Errhandler errhandler);
@@ -1796,6 +1806,10 @@ double PMPI_Wtime(void);
17961806

17971807
int PMPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status);
17981808
int PMPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status);
1809+
int PMPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_status *f08_status);
1810+
int PMPI_Status_f082c(const MPI_F08_status *f08_status, MPI_Status *c_status);
1811+
int PMPI_Status_f2f08(const MPI_Fint *f_status, MPI_F08_status *f08_status);
1812+
int PMPI_Status_f082f(const MPI_F08_status *f08_status, MPI_Fint *f_status);
17991813
MPI_Fint PMPI_Comm_c2f(MPI_Comm comm);
18001814
MPI_Comm PMPI_Comm_f2c(MPI_Fint comm);
18011815
MPI_Fint PMPI_Errhandler_c2f(MPI_Errhandler errhandler);

mpistubs.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
/* MPI global variables */
55
MPI_Fint * MPI_F_STATUS_IGNORE = NULL;
66
MPI_Fint * MPI_F_STATUSES_IGNORE = NULL;
7+
MPI_F08_status * MPI_F08_STATUS_IGNORE = NULL;
8+
MPI_F08_status * MPI_F08_STATUSES_IGNORE = NULL;
79

810
/* MPI functions */
911
int MPI_Abort(MPI_Comm comm, int errorcode) { abort(); return 0; }
@@ -593,6 +595,10 @@ double MPI_Wtime(void) { abort(); return 0; }
593595

594596
int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status) { abort(); return 0; }
595597
int MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status) { abort(); return 0; }
598+
int MPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_status *f08_status) { abort(); return 0; }
599+
int MPI_Status_f082c(const MPI_F08_status *f08_status, MPI_Status *c_status) { abort(); return 0; }
600+
int MPI_Status_f2f08(const MPI_Fint *f_status, MPI_F08_status *f08_status) { abort(); return 0; }
601+
int MPI_Status_f082f(const MPI_F08_status *f08_status, MPI_Fint *f_status) { abort(); return 0; }
596602
MPI_Fint MPI_Comm_c2f(MPI_Comm comm) { abort(); return 0; }
597603
MPI_Comm MPI_Comm_f2c(MPI_Fint comm) { abort(); return 0; }
598604
MPI_Fint MPI_Errhandler_c2f(MPI_Errhandler errhandler) { abort(); return 0; }
@@ -1257,6 +1263,10 @@ double PMPI_Wtime(void) { abort(); return 0; }
12571263

12581264
int PMPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status) { abort(); return 0; }
12591265
int PMPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status) { abort(); return 0; }
1266+
int PMPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_status *f08_status) { abort(); return 0; }
1267+
int PMPI_Status_f082c(const MPI_F08_status *f08_status, MPI_Status *c_status) { abort(); return 0; }
1268+
int PMPI_Status_f2f08(const MPI_Fint *f_status, MPI_F08_status *f08_status) { abort(); return 0; }
1269+
int PMPI_Status_f082f(const MPI_F08_status *f08_status, MPI_Fint *f_status) { abort(); return 0; }
12601270
MPI_Fint PMPI_Comm_c2f(MPI_Comm comm) { abort(); return 0; }
12611271
MPI_Comm PMPI_Comm_f2c(MPI_Fint comm) { abort(); return 0; }
12621272
MPI_Fint PMPI_Errhandler_c2f(MPI_Errhandler errhandler) { abort(); return 0; }

0 commit comments

Comments
 (0)