diff --git a/mpi.h b/mpi.h index 13ceab1..9edcd13 100644 --- a/mpi.h +++ b/mpi.h @@ -37,14 +37,6 @@ typedef MPI_ABI_Offset MPI_Offset; typedef MPI_ABI_Count MPI_Count; #undef MPI_ABI_Count -/* MPI_Fint must match the Fortran default INTEGER kind. */ -/* It is often equivalent to C int but most compilers support wider options. */ -#if !defined(MPI_ABI_Fint) -#define MPI_ABI_Fint int -#endif -typedef MPI_ABI_Fint MPI_Fint; -#undef MPI_ABI_Fint - typedef struct { int MPI_SOURCE; int MPI_TAG; @@ -187,14 +179,6 @@ enum { MPI_F_ERROR = 2 }; -/* Fortran 2008 Status Type */ -typedef struct { - MPI_Fint MPI_SOURCE; - MPI_Fint MPI_TAG; - MPI_Fint MPI_ERROR; - MPI_Fint MPI_internal[5]; -} MPI_F08_status; - /* Error Classes */ enum { MPI_SUCCESS = 0, @@ -1163,34 +1147,28 @@ MPI_Aint MPI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2); double MPI_Wtick(void); double MPI_Wtime(void); -int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status); -int MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status); -int MPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_status *f08_status); -int MPI_Status_f082c(const MPI_F08_status *f08_status, MPI_Status *c_status); -int MPI_Status_f2f08(const MPI_Fint *f_status, MPI_F08_status *f08_status); -int MPI_Status_f082f(const MPI_F08_status *f08_status, MPI_Fint *f_status); -MPI_Fint MPI_Comm_c2f(MPI_Comm comm); -MPI_Comm MPI_Comm_f2c(MPI_Fint comm); -MPI_Fint MPI_Errhandler_c2f(MPI_Errhandler errhandler); -MPI_Errhandler MPI_Errhandler_f2c(MPI_Fint errhandler); -MPI_Fint MPI_Type_c2f(MPI_Datatype datatype); -MPI_Datatype MPI_Type_f2c(MPI_Fint datatype); -MPI_Fint MPI_File_c2f(MPI_File file); -MPI_File MPI_File_f2c(MPI_Fint file); -MPI_Fint MPI_Group_c2f(MPI_Group group); -MPI_Group MPI_Group_f2c(MPI_Fint group); -MPI_Fint MPI_Info_c2f(MPI_Info info); -MPI_Info MPI_Info_f2c(MPI_Fint info); -MPI_Fint MPI_Message_c2f(MPI_Message message); -MPI_Message MPI_Message_f2c(MPI_Fint message); -MPI_Fint MPI_Op_c2f(MPI_Op op); -MPI_Op MPI_Op_f2c(MPI_Fint op); -MPI_Fint MPI_Request_c2f(MPI_Request request); -MPI_Request MPI_Request_f2c(MPI_Fint request); -MPI_Fint MPI_Session_c2f(MPI_Session session); -MPI_Session MPI_Session_f2c(MPI_Fint session); -MPI_Fint MPI_Win_c2f(MPI_Win win); -MPI_Win MPI_Win_f2c(MPI_Fint win); +MPI_Comm MPI_Comm_fromint(int comm); +int MPI_Comm_toint(MPI_Comm comm); +MPI_Errhandler MPI_Errhandler_fromint(int errhandler); +int MPI_Errhandler_toint(MPI_Errhandler errhandler); +MPI_File MPI_File_fromint(int file); +int MPI_File_toint(MPI_File file); +MPI_Group MPI_Group_fromint(int group); +int MPI_Group_toint(MPI_Group group); +MPI_Info MPI_Info_fromint(int info); +int MPI_Info_toint(MPI_Info info); +MPI_Message MPI_Message_fromint(int message); +int MPI_Message_toint(MPI_Message message); +MPI_Op MPI_Op_fromint(int op); +int MPI_Op_toint(MPI_Op op); +MPI_Request MPI_Request_fromint(int request); +int MPI_Request_toint(MPI_Request request); +MPI_Session MPI_Session_fromint(int session); +int MPI_Session_toint(MPI_Session session); +MPI_Datatype MPI_Type_fromint(int datatype); +int MPI_Type_toint(MPI_Datatype datatype); +MPI_Win MPI_Win_fromint(int win); +int MPI_Win_toint(MPI_Win win); /* MPI_T functions */ int MPI_T_category_changed(int *update_number); @@ -1833,34 +1811,28 @@ MPI_Aint PMPI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2); double PMPI_Wtick(void); double PMPI_Wtime(void); -int PMPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status); -int PMPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status); -int PMPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_status *f08_status); -int PMPI_Status_f082c(const MPI_F08_status *f08_status, MPI_Status *c_status); -int PMPI_Status_f2f08(const MPI_Fint *f_status, MPI_F08_status *f08_status); -int PMPI_Status_f082f(const MPI_F08_status *f08_status, MPI_Fint *f_status); -MPI_Fint PMPI_Comm_c2f(MPI_Comm comm); -MPI_Comm PMPI_Comm_f2c(MPI_Fint comm); -MPI_Fint PMPI_Errhandler_c2f(MPI_Errhandler errhandler); -MPI_Errhandler PMPI_Errhandler_f2c(MPI_Fint errhandler); -MPI_Fint PMPI_Type_c2f(MPI_Datatype datatype); -MPI_Datatype PMPI_Type_f2c(MPI_Fint datatype); -MPI_Fint PMPI_File_c2f(MPI_File file); -MPI_File PMPI_File_f2c(MPI_Fint file); -MPI_Fint PMPI_Group_c2f(MPI_Group group); -MPI_Group PMPI_Group_f2c(MPI_Fint group); -MPI_Fint PMPI_Info_c2f(MPI_Info info); -MPI_Info PMPI_Info_f2c(MPI_Fint info); -MPI_Fint PMPI_Message_c2f(MPI_Message message); -MPI_Message PMPI_Message_f2c(MPI_Fint message); -MPI_Fint PMPI_Op_c2f(MPI_Op op); -MPI_Op PMPI_Op_f2c(MPI_Fint op); -MPI_Fint PMPI_Request_c2f(MPI_Request request); -MPI_Request PMPI_Request_f2c(MPI_Fint request); -MPI_Fint PMPI_Session_c2f(MPI_Session session); -MPI_Session PMPI_Session_f2c(MPI_Fint session); -MPI_Fint PMPI_Win_c2f(MPI_Win win); -MPI_Win PMPI_Win_f2c(MPI_Fint win); +MPI_Comm PMPI_Comm_fromint(int comm); +int PMPI_Comm_toint(MPI_Comm comm); +MPI_Errhandler PMPI_Errhandler_fromint(int errhandler); +int PMPI_Errhandler_toint(MPI_Errhandler errhandler); +MPI_File PMPI_File_fromint(int file); +int PMPI_File_toint(MPI_File file); +MPI_Group PMPI_Group_fromint(int group); +int PMPI_Group_toint(MPI_Group group); +MPI_Info PMPI_Info_fromint(int info); +int PMPI_Info_toint(MPI_Info info); +MPI_Message PMPI_Message_fromint(int message); +int PMPI_Message_toint(MPI_Message message); +MPI_Op PMPI_Op_fromint(int op); +int PMPI_Op_toint(MPI_Op op); +MPI_Request PMPI_Request_fromint(int request); +int PMPI_Request_toint(MPI_Request request); +MPI_Session PMPI_Session_fromint(int session); +int PMPI_Session_toint(MPI_Session session); +MPI_Datatype PMPI_Type_fromint(int datatype); +int PMPI_Type_toint(MPI_Datatype datatype); +MPI_Win PMPI_Win_fromint(int win); +int PMPI_Win_toint(MPI_Win win); /* PMPI_T functions */ int PMPI_T_category_changed(int *update_number); diff --git a/mpistubs.c b/mpistubs.c index ea934ad..1dd75c2 100644 --- a/mpistubs.c +++ b/mpistubs.c @@ -589,34 +589,28 @@ MPI_Aint MPI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2) { abort(); return 0; } double MPI_Wtick(void) { abort(); return 0; } double MPI_Wtime(void) { abort(); return 0; } -int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status) { abort(); return 0; } -int MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status) { abort(); return 0; } -int MPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_status *f08_status) { abort(); return 0; } -int MPI_Status_f082c(const MPI_F08_status *f08_status, MPI_Status *c_status) { abort(); return 0; } -int MPI_Status_f2f08(const MPI_Fint *f_status, MPI_F08_status *f08_status) { abort(); return 0; } -int MPI_Status_f082f(const MPI_F08_status *f08_status, MPI_Fint *f_status) { abort(); return 0; } -MPI_Fint MPI_Comm_c2f(MPI_Comm comm) { abort(); return 0; } -MPI_Comm MPI_Comm_f2c(MPI_Fint comm) { abort(); return 0; } -MPI_Fint MPI_Errhandler_c2f(MPI_Errhandler errhandler) { abort(); return 0; } -MPI_Errhandler MPI_Errhandler_f2c(MPI_Fint errhandler) { abort(); return 0; } -MPI_Fint MPI_Type_c2f(MPI_Datatype datatype) { abort(); return 0; } -MPI_Datatype MPI_Type_f2c(MPI_Fint datatype) { abort(); return 0; } -MPI_Fint MPI_File_c2f(MPI_File file) { abort(); return 0; } -MPI_File MPI_File_f2c(MPI_Fint file) { abort(); return 0; } -MPI_Fint MPI_Group_c2f(MPI_Group group) { abort(); return 0; } -MPI_Group MPI_Group_f2c(MPI_Fint group) { abort(); return 0; } -MPI_Fint MPI_Info_c2f(MPI_Info info) { abort(); return 0; } -MPI_Info MPI_Info_f2c(MPI_Fint info) { abort(); return 0; } -MPI_Fint MPI_Message_c2f(MPI_Message message) { abort(); return 0; } -MPI_Message MPI_Message_f2c(MPI_Fint message) { abort(); return 0; } -MPI_Fint MPI_Op_c2f(MPI_Op op) { abort(); return 0; } -MPI_Op MPI_Op_f2c(MPI_Fint op) { abort(); return 0; } -MPI_Fint MPI_Request_c2f(MPI_Request request) { abort(); return 0; } -MPI_Request MPI_Request_f2c(MPI_Fint request) { abort(); return 0; } -MPI_Fint MPI_Session_c2f(MPI_Session session) { abort(); return 0; } -MPI_Session MPI_Session_f2c(MPI_Fint session) { abort(); return 0; } -MPI_Fint MPI_Win_c2f(MPI_Win win) { abort(); return 0; } -MPI_Win MPI_Win_f2c(MPI_Fint win) { abort(); return 0; } +MPI_Comm MPI_Comm_fromint(int comm) { abort(); return NULL; } +int MPI_Comm_toint(MPI_Comm comm) { abort(); return 0; } +MPI_Errhandler MPI_Errhandler_fromint(int errhandler) { abort(); return NULL; } +int MPI_Errhandler_toint(MPI_Errhandler errhandler) { abort(); return 0; } +MPI_File MPI_File_fromint(int file) { abort(); return NULL; } +int MPI_File_toint(MPI_File file) { abort(); return 0; } +MPI_Group MPI_Group_fromint(int group) { abort(); return NULL; } +int MPI_Group_toint(MPI_Group group) { abort(); return 0; } +MPI_Info MPI_Info_fromint(int info) { abort(); return NULL; } +int MPI_Info_toint(MPI_Info info) { abort(); return 0; } +MPI_Message MPI_Message_fromint(int message) { abort(); return NULL; } +int MPI_Message_toint(MPI_Message message) { abort(); return 0; } +MPI_Op MPI_Op_fromint(int op) { abort(); return NULL; } +int MPI_Op_toint(MPI_Op op) { abort(); return 0; } +MPI_Request MPI_Request_fromint(int request) { abort(); return NULL; } +int MPI_Request_toint(MPI_Request request) { abort(); return 0; } +MPI_Session MPI_Session_fromint(int session) { abort(); return NULL; } +int MPI_Session_toint(MPI_Session session) { abort(); return 0; } +MPI_Datatype MPI_Type_fromint(int datatype) { abort(); return NULL; } +int MPI_Type_toint(MPI_Datatype datatype) { abort(); return 0; } +MPI_Win MPI_Win_fromint(int win) { abort(); return NULL; } +int MPI_Win_toint(MPI_Win win) { abort(); return 0; } /* MPI_T functions */ int MPI_T_category_changed(int *update_number) { abort(); return 0; } @@ -1259,34 +1253,28 @@ MPI_Aint PMPI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2) { abort(); return 0; } double PMPI_Wtick(void) { abort(); return 0; } double PMPI_Wtime(void) { abort(); return 0; } -int PMPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status) { abort(); return 0; } -int PMPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status) { abort(); return 0; } -int PMPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_status *f08_status) { abort(); return 0; } -int PMPI_Status_f082c(const MPI_F08_status *f08_status, MPI_Status *c_status) { abort(); return 0; } -int PMPI_Status_f2f08(const MPI_Fint *f_status, MPI_F08_status *f08_status) { abort(); return 0; } -int PMPI_Status_f082f(const MPI_F08_status *f08_status, MPI_Fint *f_status) { abort(); return 0; } -MPI_Fint PMPI_Comm_c2f(MPI_Comm comm) { abort(); return 0; } -MPI_Comm PMPI_Comm_f2c(MPI_Fint comm) { abort(); return 0; } -MPI_Fint PMPI_Errhandler_c2f(MPI_Errhandler errhandler) { abort(); return 0; } -MPI_Errhandler PMPI_Errhandler_f2c(MPI_Fint errhandler) { abort(); return 0; } -MPI_Fint PMPI_Type_c2f(MPI_Datatype datatype) { abort(); return 0; } -MPI_Datatype PMPI_Type_f2c(MPI_Fint datatype) { abort(); return 0; } -MPI_Fint PMPI_File_c2f(MPI_File file) { abort(); return 0; } -MPI_File PMPI_File_f2c(MPI_Fint file) { abort(); return 0; } -MPI_Fint PMPI_Group_c2f(MPI_Group group) { abort(); return 0; } -MPI_Group PMPI_Group_f2c(MPI_Fint group) { abort(); return 0; } -MPI_Fint PMPI_Info_c2f(MPI_Info info) { abort(); return 0; } -MPI_Info PMPI_Info_f2c(MPI_Fint info) { abort(); return 0; } -MPI_Fint PMPI_Message_c2f(MPI_Message message) { abort(); return 0; } -MPI_Message PMPI_Message_f2c(MPI_Fint message) { abort(); return 0; } -MPI_Fint PMPI_Op_c2f(MPI_Op op) { abort(); return 0; } -MPI_Op PMPI_Op_f2c(MPI_Fint op) { abort(); return 0; } -MPI_Fint PMPI_Request_c2f(MPI_Request request) { abort(); return 0; } -MPI_Request PMPI_Request_f2c(MPI_Fint request) { abort(); return 0; } -MPI_Fint PMPI_Session_c2f(MPI_Session session) { abort(); return 0; } -MPI_Session PMPI_Session_f2c(MPI_Fint session) { abort(); return 0; } -MPI_Fint PMPI_Win_c2f(MPI_Win win) { abort(); return 0; } -MPI_Win PMPI_Win_f2c(MPI_Fint win) { abort(); return 0; } +MPI_Comm PMPI_Comm_fromint(int comm) { abort(); return NULL; } +int PMPI_Comm_toint(MPI_Comm comm) { abort(); return 0; } +MPI_Errhandler PMPI_Errhandler_fromint(int errhandler) { abort(); return NULL; } +int PMPI_Errhandler_toint(MPI_Errhandler errhandler) { abort(); return 0; } +MPI_File PMPI_File_fromint(int file) { abort(); return NULL; } +int PMPI_File_toint(MPI_File file) { abort(); return 0; } +MPI_Group PMPI_Group_fromint(int group) { abort(); return NULL; } +int PMPI_Group_toint(MPI_Group group) { abort(); return 0; } +MPI_Info PMPI_Info_fromint(int info) { abort(); return NULL; } +int PMPI_Info_toint(MPI_Info info) { abort(); return 0; } +MPI_Message PMPI_Message_fromint(int message) { abort(); return NULL; } +int PMPI_Message_toint(MPI_Message message) { abort(); return 0; } +MPI_Op PMPI_Op_fromint(int op) { abort(); return NULL; } +int PMPI_Op_toint(MPI_Op op) { abort(); return 0; } +MPI_Request PMPI_Request_fromint(int request) { abort(); return NULL; } +int PMPI_Request_toint(MPI_Request request) { abort(); return 0; } +MPI_Session PMPI_Session_fromint(int session) { abort(); return NULL; } +int PMPI_Session_toint(MPI_Session session) { abort(); return 0; } +MPI_Datatype PMPI_Type_fromint(int datatype) { abort(); return NULL; } +int PMPI_Type_toint(MPI_Datatype datatype) { abort(); return 0; } +MPI_Win PMPI_Win_fromint(int win) { abort(); return NULL; } +int PMPI_Win_toint(MPI_Win win) { abort(); return 0; } /* PMPI_T functions */ int PMPI_T_category_changed(int *update_number) { abort(); return 0; }