Skip to content

Commit

Permalink
mpi_f08: fix Intel OneAPI ifx compiler warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Howard Pritchard <hppritcha@gmail.com>
  • Loading branch information
hppritcha committed Oct 24, 2024
1 parent 89dc982 commit 38c4708
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 3 additions & 4 deletions ompi/mpi/fortran/use-mpi-f08/bcast_init_ts.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@
* $HEADER$
*/


PROTOTYPE VOID bcast_init(BUFFER_ASYNC x, COUNT count, DATATYPE datatype,
RANK root, COMM comm, INFO info, REQUEST_OUT request)
{
int c_ierr;
MPI_Comm c_comm;
MPI_Info c_info;
MPI_Request c_req;
MPI_Datatype c_type, c_datatype;
MPI_Datatype c_type, c_datatype = MPI_DATATYPE_NULL;
void *buffer = OMPI_CFI_BASE_ADDR(x);
@COUNT_TYPE@ c_count = (@COUNT_TYPE@) *count;
int c_root = OMPI_FINT_2_INT(*root);
Expand All @@ -49,12 +48,12 @@ PROTOTYPE VOID bcast_init(BUFFER_ASYNC x, COUNT count, DATATYPE datatype,

c_ierr = @INNER_CALL@(OMPI_F2C_BOTTOM(buffer),
c_count,
c_datatype,
(c_datatype == MPI_DATATYPE_NULL) ? c_type : c_datatype,
c_root,
c_comm,
c_info,
&c_req);
if (c_datatype != c_type) {
if (MPI_DATATYPE_NULL != c_datatype && c_datatype != c_type) {
ompi_datatype_destroy(&c_datatype);
}
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
Expand Down
5 changes: 3 additions & 2 deletions ompi/mpi/fortran/use-mpi-f08/gather_init_ts.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ PROTOTYPE VOID gather_init(BUFFER_ASYNC x1, COUNT sendcount, DATATYPE sendtype,
{
int c_ierr;
MPI_Comm c_comm;
MPI_Datatype c_sendtype, c_senddatatype, c_recvtype;
MPI_Datatype c_sendtype, c_recvtype;
MPI_Datatype c_senddatatype = MPI_DATATYPE_NULL;
MPI_Info c_info;
MPI_Request c_request;
int c_root = OMPI_FINT_2_INT(*root);
Expand Down Expand Up @@ -87,7 +88,7 @@ PROTOTYPE VOID gather_init(BUFFER_ASYNC x1, COUNT sendcount, DATATYPE sendtype,
c_recvtype,
c_root,
c_comm, c_info, &c_request);
if (c_senddatatype != c_sendtype) {
if (MPI_DATATYPE_NULL != c_senddatatype && c_senddatatype != c_sendtype) {
ompi_datatype_destroy(&c_senddatatype);
}
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
Expand Down
5 changes: 3 additions & 2 deletions ompi/mpi/fortran/use-mpi-f08/gatherv_init_ts.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ PROTOTYPE VOID gatherv_init(BUFFER_ASYNC x1, COUNT sendcount, DATATYPE sendtype,
INFO info, REQUEST_OUT request)
{
MPI_Comm c_comm;
MPI_Datatype c_sendtype, c_senddatatype, c_recvtype;
MPI_Datatype c_sendtype, c_recvtype;
MPI_Datatype c_senddatatype = MPI_DATATYPE_NULL;
MPI_Info c_info;
MPI_Request c_request;
int idx = 0, c_ierr;
Expand Down Expand Up @@ -102,7 +103,7 @@ PROTOTYPE VOID gatherv_init(BUFFER_ASYNC x1, COUNT sendcount, DATATYPE sendtype,
c_recvtype,
c_root,
c_comm, c_info, &c_request);
if (c_senddatatype != c_sendtype) {
if (MPI_DATATYPE_NULL != c_senddatatype && c_senddatatype != c_sendtype) {
ompi_datatype_destroy(&c_senddatatype);
}
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
Expand Down

0 comments on commit 38c4708

Please sign in to comment.