diff --git a/src/mpi/f77/pack_external_f.c b/src/mpi/f77/pack_external_f.c index a3d333e60e..7053f8dd6b 100644 --- a/src/mpi/f77/pack_external_f.c +++ b/src/mpi/f77/pack_external_f.c @@ -46,11 +46,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PACK_EXTERNAL, #include "mpi/f77/profile/defines.h" #endif -void mpi_pack_external_f(char *datarep, char *inbuf, MPI_Fint *incount, MPI_Fint *datatype, char *outbuf, MPI_Fint *outsize, MPI_Fint *position, MPI_Fint *ierr) +void mpi_pack_external_f(char *datarep, char *inbuf, MPI_Fint *incount, + MPI_Fint *datatype, char *outbuf, + MPI_Fint *outsize, MPI_Fint *position, + MPI_Fint *ierr) { MPI_Datatype type = MPI_Type_f2c(*datatype); - *ierr = MPI_Pack_external(datarep, inbuf, *incount, - type, outbuf, - (MPI_Aint) *outsize, (MPI_Aint *)position); + *ierr = OMPI_INT_2_FINT(MPI_Pack_external(datarep, inbuf, + OMPI_FINT_2_INT(*incount), + type, outbuf, + (MPI_Aint) *outsize, + (MPI_Aint *)position)); } diff --git a/src/mpi/f77/pack_external_size_f.c b/src/mpi/f77/pack_external_size_f.c index 27c53c5153..1af6d7588a 100644 --- a/src/mpi/f77/pack_external_size_f.c +++ b/src/mpi/f77/pack_external_size_f.c @@ -46,11 +46,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PACK_EXTERNAL_SIZE, #include "mpi/f77/profile/defines.h" #endif -void mpi_pack_external_size_f(char *datarep, MPI_Fint *incount, MPI_Fint *datatype, MPI_Fint *size, MPI_Fint *ierr) +void mpi_pack_external_size_f(char *datarep, MPI_Fint *incount, + MPI_Fint *datatype, MPI_Fint *size, + MPI_Fint *ierr) { MPI_Datatype type = MPI_Type_f2c(*datatype); - *ierr = MPI_Pack_external_size (datarep, *incount, - type, (MPI_Aint *)size); + *ierr = OMPI_INT_2_FINT(MPI_Pack_external_size(datarep, + OMPI_FINT_2_INT(*incount), + type, (MPI_Aint *)size)); } diff --git a/src/mpi/f77/pcontrol_f.c b/src/mpi/f77/pcontrol_f.c index b6fcae0803..dfc820ed93 100644 --- a/src/mpi/f77/pcontrol_f.c +++ b/src/mpi/f77/pcontrol_f.c @@ -48,5 +48,5 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PCONTROL, void mpi_pcontrol_f(MPI_Fint *level) { - MPI_Pcontrol( *level ); + MPI_Pcontrol(OMPI_FINT_2_INT(*level)); } diff --git a/src/mpi/f77/query_thread_f.c b/src/mpi/f77/query_thread_f.c index 5ce363fd4d..3cd4335d7a 100644 --- a/src/mpi/f77/query_thread_f.c +++ b/src/mpi/f77/query_thread_f.c @@ -48,5 +48,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_QUERY_THREAD, void mpi_query_thread_f(MPI_Fint *provided, MPI_Fint *ierr) { - *ierr = MPI_Query_thread(provided); + OMPI_SINGLE_NAME_DECL(provided); + + *ierr = OMPI_INT_2_FINT(MPI_Query_thread(OMPI_SINGLE_NAME_CONVERT(provided))); + OMPI_SINGLE_INT_2_FINT(provided); } diff --git a/src/mpi/f77/recv_init_f.c b/src/mpi/f77/recv_init_f.c index 5432aa056d..096e58d627 100644 --- a/src/mpi/f77/recv_init_f.c +++ b/src/mpi/f77/recv_init_f.c @@ -46,7 +46,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_RECV_INIT, #include "mpi/f77/profile/defines.h" #endif -void mpi_recv_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) +void mpi_recv_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, + MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, + MPI_Fint *request, MPI_Fint *ierr) { MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Request c_req; @@ -54,7 +56,10 @@ void mpi_recv_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *s c_comm = MPI_Comm_f2c (*comm); - *ierr = MPI_Recv_init(buf, *count, c_type, *source, *tag, c_comm, &c_req); + *ierr = OMPI_INT_2_FINT(MPI_Recv_init(buf, OMPI_FINT_2_INT(*count), + c_type, OMPI_FINT_2_INT(*source), + OMPI_INT_2_FINT(*tag), c_comm, + &c_req)); if (MPI_SUCCESS == *ierr) { *request = MPI_Request_c2f(c_req); diff --git a/src/mpi/f77/request_free_f.c b/src/mpi/f77/request_free_f.c index f72e5cbdbd..0fa4e7b056 100644 --- a/src/mpi/f77/request_free_f.c +++ b/src/mpi/f77/request_free_f.c @@ -49,7 +49,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_REQUEST_FREE, void mpi_request_free_f(MPI_Fint *request, MPI_Fint *ierr) { MPI_Request c_req = MPI_Request_f2c( *request ); - *ierr = MPI_Request_free( &c_req ); + *ierr = OMPI_INT_2_FINT(MPI_Request_free( &c_req )); /* This value comes from the MPI_REQUEST_NULL value in mpif.h. Do not change without consulting mpif.h! */ diff --git a/src/mpi/f77/request_get_status_f.c b/src/mpi/f77/request_get_status_f.c index 6ab71f1ee7..289821e925 100644 --- a/src/mpi/f77/request_get_status_f.c +++ b/src/mpi/f77/request_get_status_f.c @@ -46,12 +46,17 @@ OMPI_GENERATE_F77_BINDINGS (MPI_REQUEST_GET_STATUS, #include "mpi/f77/profile/defines.h" #endif -void mpi_request_get_status_f(MPI_Fint *request, MPI_Fint *flag, MPI_Fint *status, MPI_Fint *ierr) +void mpi_request_get_status_f(MPI_Fint *request, MPI_Fint *flag, + MPI_Fint *status, MPI_Fint *ierr) { MPI_Status c_status; MPI_Request c_req = MPI_Request_f2c( *request ); + OMPI_SINGLE_NAME_DECL(flag); - *ierr = MPI_Request_get_status( c_req, flag, &c_status ); + *ierr = OMPI_INT_2_FINT(MPI_Request_get_status(c_req, + OMPI_SINGLE_NAME_CONVERT(flag), + &c_status)); + OMPI_SINGLE_INT_2_FINT(flag); MPI_Status_c2f( &c_status, status ); } diff --git a/src/mpi/f77/rsend_f.c b/src/mpi/f77/rsend_f.c index e0cae69f56..e6e91c1c02 100644 --- a/src/mpi/f77/rsend_f.c +++ b/src/mpi/f77/rsend_f.c @@ -46,12 +46,15 @@ OMPI_GENERATE_F77_BINDINGS (MPI_RSEND, #include "mpi/f77/profile/defines.h" #endif -void mpi_rsend_f(char *ibuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr) +void mpi_rsend_f(char *ibuf, MPI_Fint *count, MPI_Fint *datatype, + MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr) { MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Comm c_comm; c_comm = MPI_Comm_f2c (*comm); - *ierr = MPI_Rsend(ibuf, *count, c_type, *dest, *tag, c_comm); + *ierr = OMPI_INT_2_FINT(MPI_Rsend(ibuf, OMPI_FINT_2_INT(*count), + c_type, OMPI_FINT_2_INT(*dest), + OMPI_FINT_2_INT(*tag), c_comm)); } diff --git a/src/mpi/f77/rsend_init_f.c b/src/mpi/f77/rsend_init_f.c index 633e6fc64e..fcc7f7b343 100644 --- a/src/mpi/f77/rsend_init_f.c +++ b/src/mpi/f77/rsend_init_f.c @@ -46,7 +46,10 @@ OMPI_GENERATE_F77_BINDINGS (MPI_RSEND_INIT, #include "mpi/f77/profile/defines.h" #endif -void mpi_rsend_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) +void mpi_rsend_init_f(char *buf, MPI_Fint *count, + MPI_Fint *datatype, MPI_Fint *dest, + MPI_Fint *tag, MPI_Fint *comm, + MPI_Fint *request, MPI_Fint *ierr) { MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Request c_req; @@ -54,7 +57,10 @@ void mpi_rsend_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint * c_comm = MPI_Comm_f2c (*comm); - *ierr = MPI_Rsend_init(buf, *count, c_type, *dest, *tag, c_comm, &c_req); + *ierr = OMPI_INT_2_FINT(MPI_Rsend_init(buf, OMPI_FINT_2_INT(*count), + c_type, OMPI_FINT_2_INT(*dest), + OMPI_FINT_2_INT(*tag), + c_comm, &c_req)); if (MPI_SUCCESS == *ierr) { *request = MPI_Request_c2f(c_req); diff --git a/src/mpi/f77/send_init_f.c b/src/mpi/f77/send_init_f.c index 704386399a..6cd15b9c7f 100644 --- a/src/mpi/f77/send_init_f.c +++ b/src/mpi/f77/send_init_f.c @@ -46,7 +46,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SEND_INIT, #include "mpi/f77/profile/defines.h" #endif -void mpi_send_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) +void mpi_send_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, + MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, + MPI_Fint *request, MPI_Fint *ierr) { MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Request c_req; @@ -54,7 +56,10 @@ void mpi_send_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *d c_comm = MPI_Comm_f2c (*comm); - *ierr = MPI_Send_init(buf, *count, c_type, *dest, *tag, c_comm, &c_req); + *ierr = OMPI_INT_2_FINT(MPI_Send_init(buf, OMPI_FINT_2_INT(*count), + c_type, OMPI_FINT_2_INT(*dest), + OMPI_FINT_2_INT(*tag), + c_comm, &c_req)); if (MPI_SUCCESS == *ierr) { *request = MPI_Request_c2f(c_req); diff --git a/src/mpi/f77/sendrecv_f.c b/src/mpi/f77/sendrecv_f.c index 46a66307b3..23f41775ff 100644 --- a/src/mpi/f77/sendrecv_f.c +++ b/src/mpi/f77/sendrecv_f.c @@ -46,7 +46,11 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SENDRECV, #include "mpi/f77/profile/defines.h" #endif -void mpi_sendrecv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, MPI_Fint *dest, MPI_Fint *sendtag, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *source, MPI_Fint *recvtag, MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr) +void mpi_sendrecv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, + MPI_Fint *dest, MPI_Fint *sendtag, char *recvbuf, + MPI_Fint *recvcount, MPI_Fint *recvtype, + MPI_Fint *source, MPI_Fint *recvtag, MPI_Fint *comm, + MPI_Fint *status, MPI_Fint *ierr) { MPI_Comm c_comm; MPI_Datatype c_sendtype = MPI_Type_f2c(*sendtype); @@ -54,8 +58,12 @@ void mpi_sendrecv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, MPI_ c_comm = MPI_Comm_f2c (*comm); - *ierr = MPI_Sendrecv(sendbuf, *sendcount, c_sendtype, - *dest, *sendtag, recvbuf, *recvcount, - c_recvtype, *source, *recvtag, c_comm, - (MPI_Status*)status); + *ierr = OMPI_INT_2_FINT(MPI_Sendrecv(sendbuf, OMPI_FINT_2_INT(*sendcount), + c_sendtype, + OMPI_FINT_2_INT(*dest), + OMPI_FINT_2_INT(*sendtag), + recvbuf, *recvcount, + c_recvtype, OMPI_FINT_2_INT(*source), + OMPI_FINT_2_INT(*recvtag), + c_comm, (MPI_Status*)status)); } diff --git a/src/mpi/f77/sendrecv_replace_f.c b/src/mpi/f77/sendrecv_replace_f.c index e35e78e2d3..dd6d4c3e4c 100644 --- a/src/mpi/f77/sendrecv_replace_f.c +++ b/src/mpi/f77/sendrecv_replace_f.c @@ -46,14 +46,22 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SENDRECV_REPLACE, #include "mpi/f77/profile/defines.h" #endif -void mpi_sendrecv_replace_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *sendtag, MPI_Fint *source, MPI_Fint *recvtag, MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr) +void mpi_sendrecv_replace_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, + MPI_Fint *dest, MPI_Fint *sendtag, + MPI_Fint *source, MPI_Fint *recvtag, + MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr) { MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Comm c_comm; c_comm = MPI_Comm_f2c (*comm); - *ierr = MPI_Sendrecv_replace(buf, *count, c_type, *dest, - *sendtag, *source, *recvtag, c_comm, - (MPI_Status*)status); + *ierr = OMPI_INT_2_FINT(MPI_Sendrecv_replace(buf, + OMPI_FINT_2_INT(*count), + c_type, + OMPI_FINT_2_INT(*dest), + OMPI_FINT_2_INT(*sendtag), + OMPI_FINT_2_INT(*source), + OMPI_FINT_2_INT(*recvtag), + c_comm, (MPI_Status*)status)); } diff --git a/src/mpi/f77/ssend_f.c b/src/mpi/f77/ssend_f.c index 5a6e1ef797..f7542070e9 100644 --- a/src/mpi/f77/ssend_f.c +++ b/src/mpi/f77/ssend_f.c @@ -46,12 +46,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SSEND, #include "mpi/f77/profile/defines.h" #endif -void mpi_ssend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr) +void mpi_ssend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, + MPI_Fint *dest, MPI_Fint *tag, + MPI_Fint *comm, MPI_Fint *ierr) { MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Comm c_comm; c_comm = MPI_Comm_f2c (*comm); - *ierr = MPI_Ssend(buf, *count, c_type, *dest, *tag, c_comm); + *ierr = OMPI_INT_2_FINT(MPI_Ssend(buf, OMPI_FINT_2_INT(*count), + c_type, OMPI_FINT_2_INT(*dest), + OMPI_FINT_2_INT(*tag), c_comm)); } diff --git a/src/mpi/f77/ssend_init_f.c b/src/mpi/f77/ssend_init_f.c index 82d3bc19fd..4298485893 100644 --- a/src/mpi/f77/ssend_init_f.c +++ b/src/mpi/f77/ssend_init_f.c @@ -46,7 +46,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SSEND_INIT, #include "mpi/f77/profile/defines.h" #endif -void mpi_ssend_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) +void mpi_ssend_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, + MPI_Fint *dest, MPI_Fint *tag, + MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Request c_req; @@ -54,7 +56,10 @@ void mpi_ssend_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint * c_comm = MPI_Comm_f2c (*comm); - *ierr = MPI_Ssend_init(buf, *count, c_type, *dest, *tag, c_comm, &c_req); + *ierr = OMPI_INT_2_FINT(MPI_Ssend_init(buf, OMPI_FINT_2_INT(*count), + c_type, OMPI_FINT_2_INT(*dest), + OMPI_FINT_2_INT(*tag), + c_comm, &c_req)); if (MPI_SUCCESS == *ierr) { *request = MPI_Request_c2f(c_req); diff --git a/src/mpi/f77/start_f.c b/src/mpi/f77/start_f.c index 6a8fa83f49..29fdcee93f 100644 --- a/src/mpi/f77/start_f.c +++ b/src/mpi/f77/start_f.c @@ -51,7 +51,7 @@ void mpi_start_f(MPI_Fint *request, MPI_Fint *ierr) MPI_Request c_req = MPI_Request_f2c(*request); MPI_Request tmp_req = c_req; - *ierr = MPI_Start(&c_req); + *ierr = OMPI_INT_2_FINT(MPI_Start(&c_req)); if (MPI_SUCCESS == *ierr) { /* For a persistent request, the underlying request descriptor could diff --git a/src/mpi/f77/startall_f.c b/src/mpi/f77/startall_f.c index d8a1f3e201..85275e0ac2 100644 --- a/src/mpi/f77/startall_f.c +++ b/src/mpi/f77/startall_f.c @@ -52,7 +52,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_STARTALL, static const char FUNC_NAME[] = "MPI_STARTALL"; -void mpi_startall_f(MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *ierr) +void mpi_startall_f(MPI_Fint *count, MPI_Fint *array_of_requests, + MPI_Fint *ierr) { MPI_Request *c_req; int i; @@ -68,7 +69,6 @@ void mpi_startall_f(MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *ierr c_req[i] = MPI_Request_f2c(array_of_requests[i]); } - *ierr = MPI_Startall(*count, c_req); + *ierr = OMPI_INT_2_FINT(MPI_Startall(OMPI_FINT_2_INT(*count), c_req)); free(c_req); } - diff --git a/src/mpi/f77/status_set_cancelled_f.c b/src/mpi/f77/status_set_cancelled_f.c index 00326c3162..cf0613ba44 100644 --- a/src/mpi/f77/status_set_cancelled_f.c +++ b/src/mpi/f77/status_set_cancelled_f.c @@ -52,7 +52,8 @@ void mpi_status_set_cancelled_f(MPI_Fint *status, MPI_Fint *flag, MPI_Fint *ierr MPI_Status_f2c( status, &c_status ); - *ierr = MPI_Status_set_cancelled(&c_status, *flag); + *ierr = OMPI_INT_2_FINT(MPI_Status_set_cancelled(&c_status, + OMPI_FINT_2_INT(*flag))); if (MPI_SUCCESS == *ierr) { MPI_Status_c2f(&c_status, status); diff --git a/src/mpi/f77/status_set_elements_f.c b/src/mpi/f77/status_set_elements_f.c index 22681affac..8c2cafffc2 100644 --- a/src/mpi/f77/status_set_elements_f.c +++ b/src/mpi/f77/status_set_elements_f.c @@ -46,14 +46,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_STATUS_SET_ELEMENTS, #include "mpi/f77/profile/defines.h" #endif -void mpi_status_set_elements_f(MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, MPI_Fint *ierr) +void mpi_status_set_elements_f(MPI_Fint *status, MPI_Fint *datatype, + MPI_Fint *count, MPI_Fint *ierr) { MPI_Datatype c_type; MPI_Status c_status; MPI_Status_f2c( status, &c_status ); - *ierr = MPI_Status_set_elements(&c_status, c_type, *count); + *ierr = OMPI_INT_2_FINT(MPI_Status_set_elements(&c_status, c_type, + OMPI_FINT_2_INT(*count))); /* If datatype is really being set, then that needs to be converted.... */ if (MPI_SUCCESS == *ierr) {