diff --git a/src/mpi/f77/get_count_f.c b/src/mpi/f77/get_count_f.c index a7a3360d3d..be49d0a58d 100644 --- a/src/mpi/f77/get_count_f.c +++ b/src/mpi/f77/get_count_f.c @@ -48,5 +48,11 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GET_COUNT, void mpi_get_count_f(MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, MPI_Fint *ierr) { + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + MPI_Status c_status; + *ierr = MPI_Status_f2c(status, &c_status); + + if (*ierr == MPI_SUCCESS) + *ierr = MPI_Get_count(&c_status, c_type, count); } diff --git a/src/mpi/f77/get_elements_f.c b/src/mpi/f77/get_elements_f.c index 4217a1daf9..08ae9f9c98 100644 --- a/src/mpi/f77/get_elements_f.c +++ b/src/mpi/f77/get_elements_f.c @@ -48,5 +48,12 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GET_ELEMENTS, void mpi_get_elements_f(MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, MPI_Fint *ierr) { + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + MPI_Status c_status; + + *ierr = MPI_Status_f2c(status, &c_status); + + if (*ierr == MPI_SUCCESS) + *ierr = MPI_Get_elements(&c_status, c_type, count); } diff --git a/src/mpi/f77/pack_external_f.c b/src/mpi/f77/pack_external_f.c index 6ffa896fb1..b2c5055e2e 100644 --- a/src/mpi/f77/pack_external_f.c +++ b/src/mpi/f77/pack_external_f.c @@ -48,5 +48,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PACK_EXTERNAL, 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); } diff --git a/src/mpi/f77/pack_external_size_f.c b/src/mpi/f77/pack_external_size_f.c index 69547d0b3a..344bd666f4 100644 --- a/src/mpi/f77/pack_external_size_f.c +++ b/src/mpi/f77/pack_external_size_f.c @@ -48,5 +48,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PACK_EXTERNAL_SIZE, 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); } diff --git a/src/mpi/f77/unpack_external_f.c b/src/mpi/f77/unpack_external_f.c index 155068f563..21918b146a 100644 --- a/src/mpi/f77/unpack_external_f.c +++ b/src/mpi/f77/unpack_external_f.c @@ -48,5 +48,10 @@ OMPI_GENERATE_F77_BINDINGS (MPI_UNPACK_EXTERNAL, void mpi_unpack_external_f (char *datarep, char *inbuf, MPI_Fint *insize, MPI_Fint *position, char *outbuf, MPI_Fint *outcount, MPI_Fint *datatype, MPI_Fint *ierr) { + MPI_Datatype c_type; + c_type = MPI_Type_f2c(*datatype); + + *ierr = MPI_Unpack_external(datarep, inbuf, *insize, (MPI_Aint *)*position, + outbuf, *outcount, c_type); }