Skip to content

Commit

Permalink
mpif08: set s_count to right type in a few funcs
Browse files Browse the repository at this point in the history
Signed-off-by: Howard Pritchard <[email protected]>
  • Loading branch information
hppritcha committed Oct 10, 2024
1 parent 4194223 commit faaed64
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion ompi/mpi/fortran/use-mpi-f08/allreduce_ts.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ PROTOTYPE VOID allreduce(BUFFER x1, BUFFER_OUT x2, COUNT count,
DATATYPE datatype, OP op, COMM comm)
{
int c_ierr;
int c_count = OMPI_FINT_2_INT(*count);
@COUNT_TYPE@ c_count = (@COUNT_TYPE@) *count;
MPI_Comm c_comm = PMPI_Comm_f2c(*comm);
MPI_Datatype c_type;
MPI_Op c_op;
Expand Down
2 changes: 1 addition & 1 deletion ompi/mpi/fortran/use-mpi-f08/irecv_ts.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ PROTOTYPE void irecv(BUFFER_OUT x, COUNT count, DATATYPE datatype,
MPI_Request c_req;
MPI_Comm c_comm = PMPI_Comm_f2c (*comm);
void *buf = OMPI_CFI_BASE_ADDR(x);
int c_count = OMPI_FINT_2_INT(*count);
@COUNT_TYPE@ c_count = (@COUNT_TYPE@) *count;

OMPI_CFI_2_C(x, c_count, c_type, c_datatype, c_ierr);
if (MPI_SUCCESS != c_ierr) {
Expand Down
2 changes: 1 addition & 1 deletion ompi/mpi/fortran/use-mpi-f08/isend_ts.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ PROTOTYPE VOID isend(BUFFER x, COUNT count, DATATYPE datatype, RANK dest,
MPI_Comm c_comm = PMPI_Comm_f2c (*comm);

void *buf = OMPI_CFI_BASE_ADDR(x);
int c_count = OMPI_FINT_2_INT(*count);
@COUNT_TYPE@ c_count = (@COUNT_TYPE@) *count;

OMPI_CFI_2_C(x, c_count, c_type, c_datatype, c_ierr);
if (MPI_SUCCESS != c_ierr) {
Expand Down
11 changes: 1 addition & 10 deletions ompi/mpi/fortran/use-mpi-f08/recv_ts.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@
* $HEADER$
*/

/*
#include "ompi_config.h"

#include "ompi/communicator/communicator.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/mpi/fortran/use-mpi-f08/ts/bindings.h"
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
#include "ompi/mpi/fortran/base/constants.h"
*/

PROTOTYPE VOID recv(BUFFER_OUT x, COUNT count, DATATYPE datatype,
RANK source, TAG tag, COMM comm, STATUS_OUT status)
Expand All @@ -38,7 +29,7 @@ PROTOTYPE VOID recv(BUFFER_OUT x, COUNT count, DATATYPE datatype,
MPI_Datatype c_datatype, c_type = PMPI_Type_f2c(*datatype);
int c_ierr;
void *buf = OMPI_CFI_BASE_ADDR(x);
int c_count = OMPI_FINT_2_INT(*count);
@COUNT_TYPE@ c_count = (@COUNT_TYPE@) *count;

OMPI_CFI_2_C(x, c_count, c_type, c_datatype, c_ierr);
if (MPI_SUCCESS != c_ierr) {
Expand Down
11 changes: 1 addition & 10 deletions ompi/mpi/fortran/use-mpi-f08/send_ts.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/communicator/communicator.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/mpi/fortran/use-mpi-f08/ts/bindings.h"
#include "ompi/mpi/fortran/base/constants.h"

/* void ompi_send_ts(CFI_cdesc_t* x, MPI_Fint *count, MPI_Fint *datatype,
MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr) */
PROTOTYPE VOID send(BUFFER x, COUNT count, DATATYPE datatype, RANK dest,
TAG tag, COMM comm)
{
Expand All @@ -36,7 +27,7 @@ PROTOTYPE VOID send(BUFFER x, COUNT count, DATATYPE datatype, RANK dest,
MPI_Comm c_comm = PMPI_Comm_f2c(*comm);
MPI_Datatype c_datatype, c_type = PMPI_Type_f2c(*datatype);
void *buf = OMPI_CFI_BASE_ADDR(x);
int c_count = OMPI_FINT_2_INT(*count);
@COUNT_TYPE@ c_count = (@COUNT_TYPE@) *count;

OMPI_CFI_2_C(x, c_count, c_type, c_datatype, c_ierr);
if (MPI_SUCCESS != c_ierr) {
Expand Down

0 comments on commit faaed64

Please sign in to comment.