diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.am b/ompi/mpi/fortran/use-mpi-f08/Makefile.am index 87f4386a4f3..aa3f5e25cfe 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.am @@ -266,11 +266,8 @@ mpi_api_files = \ mprobe_f08.F90 \ neighbor_allgather_init_f08.F90 \ neighbor_allgatherv_init_f08.F90 \ - neighbor_alltoall_f08.F90 \ neighbor_alltoall_init_f08.F90 \ - neighbor_alltoallv_f08.F90 \ neighbor_alltoallv_init_f08.F90 \ - neighbor_alltoallw_f08.F90 \ neighbor_alltoallw_init_f08.F90 \ op_commutative_f08.F90 \ op_create_f08.F90 \ diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.prototype_files b/ompi/mpi/fortran/use-mpi-f08/Makefile.prototype_files index 9ec2bbb256e..7e71d94aebc 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.prototype_files +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.prototype_files @@ -6,9 +6,6 @@ # $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/f_sync_reg_ts.c.in incomplete_prototype_files = \ - $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoall_ts.c.in \ - $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallv_ts.c.in \ - $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallw_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/put_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/raccumulate_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/recv_init_ts.c.in \ @@ -116,6 +113,9 @@ complete_prototype_files = \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/mrecv_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/neighbor_allgather_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/neighbor_allgatherv_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoall_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallv_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallw_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/recv_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/reduce_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/send_ts.c.in \ diff --git a/ompi/mpi/fortran/use-mpi-f08/mod/mpi-f08-interfaces.h.in b/ompi/mpi/fortran/use-mpi-f08/mod/mpi-f08-interfaces.h.in index 117f0618c83..638a0958312 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mod/mpi-f08-interfaces.h.in +++ b/ompi/mpi/fortran/use-mpi-f08/mod/mpi-f08-interfaces.h.in @@ -3207,21 +3207,6 @@ subroutine MPI_Neighbor_allgatherv_init_f08(sendbuf,sendcount,sendtype,recvbuf,r end subroutine MPI_Neighbor_allgatherv_init_f08 end interface MPI_Neighbor_allgatherv_init -interface MPI_Neighbor_alltoall -subroutine MPI_Neighbor_alltoall_f08(sendbuf,sendcount,sendtype,recvbuf,recvcount,recvtype, & - comm,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm - implicit none - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf, recvbuf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, INTENT(IN) :: sendbuf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: recvbuf - INTEGER, INTENT(IN) :: sendcount, recvcount - TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype - TYPE(MPI_Comm), INTENT(IN) :: comm - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_Neighbor_alltoall_f08 -end interface MPI_Neighbor_alltoall - interface MPI_Neighbor_alltoall_init subroutine MPI_Neighbor_alltoall_init_f08(sendbuf,sendcount,sendtype,recvbuf,recvcount,recvtype, & comm,info,request,ierror) @@ -3239,21 +3224,6 @@ subroutine MPI_Neighbor_alltoall_init_f08(sendbuf,sendcount,sendtype,recvbuf,rec end subroutine MPI_Neighbor_alltoall_init_f08 end interface MPI_Neighbor_alltoall_init -interface MPI_Neighbor_alltoallv -subroutine MPI_Neighbor_alltoallv_f08(sendbuf,sendcounts,sdispls,sendtype,recvbuf,recvcounts, & - rdispls,recvtype,comm,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm - implicit none - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf, recvbuf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, INTENT(IN) :: sendbuf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: recvbuf - INTEGER, INTENT(IN) :: sendcounts(*), sdispls(*), recvcounts(*), rdispls(*) - TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype - TYPE(MPI_Comm), INTENT(IN) :: comm - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_Neighbor_alltoallv_f08 -end interface MPI_Neighbor_alltoallv - interface MPI_Neighbor_alltoallv_init subroutine MPI_Neighbor_alltoallv_init_f08(sendbuf,sendcounts,sdispls,sendtype,recvbuf,recvcounts, & rdispls,recvtype,comm,info,request,ierror) @@ -3271,22 +3241,6 @@ subroutine MPI_Neighbor_alltoallv_init_f08(sendbuf,sendcounts,sdispls,sendtype,r end subroutine MPI_Neighbor_alltoallv_init_f08 end interface MPI_Neighbor_alltoallv_init -interface MPI_Neighbor_alltoallw -subroutine MPI_Neighbor_alltoallw_f08(sendbuf,sendcounts,sdispls,sendtypes,recvbuf,recvcounts, & - rdispls,recvtypes,comm,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_ADDRESS_KIND - implicit none - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf, recvbuf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, INTENT(IN) :: sendbuf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: recvbuf - INTEGER, INTENT(IN) :: sendcounts(*), recvcounts(*) - INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: sdispls(*), rdispls(*) - TYPE(MPI_Datatype), INTENT(IN) :: sendtypes(*), recvtypes(*) - TYPE(MPI_Comm), INTENT(IN) :: comm - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_Neighbor_alltoallw_f08 -end interface MPI_Neighbor_alltoallw - interface MPI_Neighbor_alltoallw_init subroutine MPI_Neighbor_alltoallw_init_f08(sendbuf,sendcounts,sdispls,sendtypes,recvbuf,recvcounts, & rdispls,recvtypes,comm,info,request,ierror) diff --git a/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoall_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoall_f08.F90 deleted file mode 100644 index 8bfb42dd83b..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoall_f08.F90 +++ /dev/null @@ -1,33 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. -! Copyright (c) 2009-2013 Los Alamos National Security, LLC. -! All rights reserved. -! Copyright (c) 2018-2020 Research Organization for Information Science -! and Technology (RIST). All rights reserved. -! Copyright (c) 2018 FUJITSU LIMITED. All rights reserved. -! $COPYRIGHT$ - -#include "ompi/mpi/fortran/configure-fortran-output.h" - -#include "mpi-f08-rename.h" - -subroutine MPI_Neighbor_alltoall_f08(sendbuf,sendcount,sendtype,recvbuf,& - recvcount,recvtype,comm,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm - use :: ompi_mpifh_bindings, only : ompi_neighbor_alltoall_f - implicit none - OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf - OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf - INTEGER, INTENT(IN) :: sendcount, recvcount - TYPE(MPI_Datatype), INTENT(IN) :: sendtype - TYPE(MPI_Datatype), INTENT(IN) :: recvtype - TYPE(MPI_Comm), INTENT(IN) :: comm - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_neighbor_alltoall_f(sendbuf,sendcount,sendtype%MPI_VAL,recvbuf,& - recvcount,recvtype%MPI_VAL,comm%MPI_VAL,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_Neighbor_alltoall_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoall_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoall_ts.c.in index d90a81a72df..d9e133aff66 100644 --- a/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoall_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoall_ts.c.in @@ -22,18 +22,9 @@ * $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" - -static const char FUNC_NAME[] = "MPI_Neighbor_alltoall"; - -void ompi_neighbor_alltoall_ts(CFI_cdesc_t *x1, MPI_Fint *sendcount, MPI_Fint *sendtype, - CFI_cdesc_t *x2, MPI_Fint *recvcount, MPI_Fint *recvtype, - MPI_Fint *comm, MPI_Fint *ierr) +PROTOTYPE VOID neighbor_alltoall(BUFFER x1, COUNT sendcount, DATATYPE sendtype, + BUFFER_OUT x2, COUNT recvcount, DATATYPE recvtype, + COMM comm) { int c_ierr; MPI_Comm c_comm = PMPI_Comm_f2c(*comm); @@ -60,11 +51,11 @@ void ompi_neighbor_alltoall_ts(CFI_cdesc_t *x1, MPI_Fint *sendcount, MPI_Fint *s sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - c_ierr = PMPI_Neighbor_alltoall(sendbuf, - OMPI_FINT_2_INT(*sendcount), - c_sendtype, - recvbuf, - OMPI_FINT_2_INT(*recvcount), - c_recvtype, c_comm); + c_ierr = @INNER_CALL@(sendbuf, + (@COUNT_TYPE@) *sendcount, + c_sendtype, + recvbuf, + (@COUNT_TYPE@) *recvcount, + c_recvtype, c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); } diff --git a/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallv_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallv_f08.F90 deleted file mode 100644 index 377ac5b6f1f..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallv_f08.F90 +++ /dev/null @@ -1,34 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. -! Copyright (c) 2009-2013 Los Alamos National Security, LLC. -! All rights reserved. -! Copyright (c) 2018-2020 Research Organization for Information Science -! and Technology (RIST). All rights reserved. -! Copyright (c) 2018 FUJITSU LIMITED. All rights reserved. -! $COPYRIGHT$ - -#include "ompi/mpi/fortran/configure-fortran-output.h" - -#include "mpi-f08-rename.h" - -subroutine MPI_Neighbor_alltoallv_f08(sendbuf,sendcounts,sdispls,sendtype,recvbuf,& - recvcounts,rdispls,recvtype,comm,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm - use :: ompi_mpifh_bindings, only : ompi_neighbor_alltoallv_f - implicit none - OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf - OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf - INTEGER, INTENT(IN) :: sendcounts(*), sdispls(*), recvcounts(*), rdispls(*) - TYPE(MPI_Datatype), INTENT(IN) :: sendtype - TYPE(MPI_Datatype), INTENT(IN) :: recvtype - TYPE(MPI_Comm), INTENT(IN) :: comm - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_neighbor_alltoallv_f(sendbuf,sendcounts,sdispls,sendtype%MPI_VAL,& - recvbuf,recvcounts,rdispls,recvtype%MPI_VAL,& - comm%MPI_VAL,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_Neighbor_alltoallv_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallv_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallv_ts.c.in index 68ee92b4206..d7ff1a992bf 100644 --- a/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallv_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallv_ts.c.in @@ -22,28 +22,19 @@ * $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" - -static const char FUNC_NAME[] = "MPI_Neighbor_alltoallv"; - -void ompi_neighbor_alltoallv_ts(CFI_cdesc_t *x1, MPI_Fint *sendcounts, MPI_Fint *sdispls, - MPI_Fint *sendtype, CFI_cdesc_t *x2, MPI_Fint *recvcounts, - MPI_Fint *rdispls, MPI_Fint *recvtype, - MPI_Fint *comm, MPI_Fint *ierr) +PROTOTYPE VOID neighbor_alltoallv(BUFFER x1, COUNT_ARRAY sendcounts, DISP_ARRAY sdispls, + DATATYPE sendtype, BUFFER_OUT x2, COUNT_ARRAY recvcounts, + DISP_ARRAY rdispls, DATATYPE recvtype, + COMM comm) { MPI_Comm c_comm = PMPI_Comm_f2c(*comm); MPI_Datatype c_sendtype, c_recvtype; int size, c_ierr; char *sendbuf = OMPI_CFI_BASE_ADDR(x1), *recvbuf = OMPI_CFI_BASE_ADDR(x2); - OMPI_ARRAY_NAME_DECL(sendcounts); - OMPI_ARRAY_NAME_DECL(sdispls); - OMPI_ARRAY_NAME_DECL(recvcounts); - OMPI_ARRAY_NAME_DECL(rdispls); + @COUNT_TYPE@ *tmp_sendcounts = NULL; + @DISP_TYPE@ *tmp_sdispls = NULL; + @COUNT_TYPE@ *tmp_recvcounts = NULL; + @DISP_TYPE@ *tmp_rdispls = NULL; OMPI_CFI_CHECK_CONTIGUOUS(x1, c_ierr); if (MPI_SUCCESS != c_ierr) { @@ -61,27 +52,27 @@ void ompi_neighbor_alltoallv_ts(CFI_cdesc_t *x1, MPI_Fint *sendcounts, MPI_Fint c_recvtype = PMPI_Type_f2c(*recvtype); PMPI_Comm_size(c_comm, &size); - OMPI_ARRAY_FINT_2_INT(sendcounts, size); - OMPI_ARRAY_FINT_2_INT(sdispls, size); - OMPI_ARRAY_FINT_2_INT(recvcounts, size); - OMPI_ARRAY_FINT_2_INT(rdispls, size); + OMPI_FORTRAN_BIGCOUNT_ARRAY_SET(sendcounts, tmp_sendcounts, size); + OMPI_FORTRAN_BIGCOUNT_ARRAY_SET(sdispls, tmp_sdispls, size); + OMPI_FORTRAN_BIGCOUNT_ARRAY_SET(recvcounts, tmp_recvcounts, size); + OMPI_FORTRAN_BIGCOUNT_ARRAY_SET(rdispls, tmp_rdispls, size); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - c_ierr = PMPI_Neighbor_alltoallv(sendbuf, - OMPI_ARRAY_NAME_CONVERT(sendcounts), - OMPI_ARRAY_NAME_CONVERT(sdispls), - c_sendtype, - recvbuf, - OMPI_ARRAY_NAME_CONVERT(recvcounts), - OMPI_ARRAY_NAME_CONVERT(rdispls), - c_recvtype, c_comm); + c_ierr = @INNER_CALL@(sendbuf, + tmp_sendcounts, + tmp_sdispls, + c_sendtype, + recvbuf, + tmp_recvcounts, + tmp_rdispls, + c_recvtype, c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - OMPI_ARRAY_FINT_2_INT_CLEANUP(sendcounts); - OMPI_ARRAY_FINT_2_INT_CLEANUP(sdispls); - OMPI_ARRAY_FINT_2_INT_CLEANUP(recvcounts); - OMPI_ARRAY_FINT_2_INT_CLEANUP(rdispls); + OMPI_FORTRAN_BIGCOUNT_ARRAY_CLEANUP(sendcounts, tmp_sendcounts); + OMPI_FORTRAN_BIGCOUNT_ARRAY_CLEANUP(sdispls, tmp_sdispls); + OMPI_FORTRAN_BIGCOUNT_ARRAY_CLEANUP(recvcounts, tmp_recvcounts); + OMPI_FORTRAN_BIGCOUNT_ARRAY_CLEANUP(rdispls, tmp_rdispls); } diff --git a/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallw_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallw_f08.F90 deleted file mode 100644 index e0fd6a68b8e..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallw_f08.F90 +++ /dev/null @@ -1,34 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved. -! Copyright (c) 2009-2013 Los Alamos National Security, LLC. -! All rights reserved. -! Copyright (c) 2018-2020 Research Organization for Information Science -! and Technology (RIST). All rights reserved. -! $COPYRIGHT$ - -#include "ompi/mpi/fortran/configure-fortran-output.h" - -#include "mpi-f08-rename.h" - -subroutine MPI_Neighbor_alltoallw_f08(sendbuf,sendcounts,sdispls,sendtypes,& - recvbuf,recvcounts,rdispls,recvtypes,comm,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_ADDRESS_KIND - use :: ompi_mpifh_bindings, only : ompi_neighbor_alltoallw_f - implicit none - OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf - OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf - INTEGER, INTENT(IN) :: sendcounts(*), recvcounts(*) - INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: sdispls(*), rdispls(*) - TYPE(MPI_Datatype), INTENT(IN) :: sendtypes(*) - TYPE(MPI_Datatype), INTENT(IN) :: recvtypes(*) - TYPE(MPI_Comm), INTENT(IN) :: comm - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_neighbor_alltoallw_f(sendbuf,sendcounts,sdispls,sendtypes(1)%MPI_VAL,& - recvbuf,recvcounts,rdispls,recvtypes(1)%MPI_VAL,& - comm%MPI_VAL,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_Neighbor_alltoallw_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallw_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallw_ts.c.in index ff36fb8b6de..b8057dcd207 100644 --- a/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallw_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/neighbor_alltoallw_ts.c.in @@ -22,27 +22,18 @@ * $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" - -static const char FUNC_NAME[] = "MPI_Neighbor_alltoallw"; - -void ompi_neighbor_alltoallw_ts(CFI_cdesc_t *x1, MPI_Fint *sendcounts, - MPI_Aint *sdispls, MPI_Fint *sendtypes, - CFI_cdesc_t *x2, MPI_Fint *recvcounts, - MPI_Aint *rdispls, MPI_Fint *recvtypes, - MPI_Fint *comm, MPI_Fint *ierr) +PROTOTYPE VOID neighbor_alltoallw(BUFFER x1, COUNT_ARRAY sendcounts, + AINT_ARRAY sdispls, DATATYPE_ARRAY sendtypes, + BUFFER_OUT x2, COUNT_ARRAY recvcounts, + AINT_ARRAY rdispls, DATATYPE_ARRAY recvtypes, + COMM comm) { MPI_Comm c_comm = PMPI_Comm_f2c(*comm); MPI_Datatype *c_sendtypes, *c_recvtypes; int size, c_ierr; char *sendbuf = OMPI_CFI_BASE_ADDR(x1), *recvbuf = OMPI_CFI_BASE_ADDR(x2); - OMPI_ARRAY_NAME_DECL(sendcounts); - OMPI_ARRAY_NAME_DECL(recvcounts); + @COUNT_TYPE@ *tmp_sendcounts = NULL; + @COUNT_TYPE@ *tmp_recvcounts = NULL; OMPI_CFI_CHECK_CONTIGUOUS(x1, c_ierr); if (MPI_SUCCESS != c_ierr) { @@ -61,8 +52,8 @@ void ompi_neighbor_alltoallw_ts(CFI_cdesc_t *x1, MPI_Fint *sendcounts, c_sendtypes = (MPI_Datatype *) malloc(size * sizeof(MPI_Datatype)); c_recvtypes = (MPI_Datatype *) malloc(size * sizeof(MPI_Datatype)); - OMPI_ARRAY_FINT_2_INT(sendcounts, size); - OMPI_ARRAY_FINT_2_INT(recvcounts, size); + OMPI_FORTRAN_BIGCOUNT_ARRAY_SET(sendcounts, tmp_sendcounts, size); + OMPI_FORTRAN_BIGCOUNT_ARRAY_SET(recvcounts, tmp_recvcounts, size); while (size > 0) { c_sendtypes[size - 1] = PMPI_Type_f2c(sendtypes[size - 1]); @@ -74,18 +65,18 @@ void ompi_neighbor_alltoallw_ts(CFI_cdesc_t *x1, MPI_Fint *sendcounts, sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - c_ierr = PMPI_Neighbor_alltoallw(sendbuf, - OMPI_ARRAY_NAME_CONVERT(sendcounts), - sdispls, - c_sendtypes, - recvbuf, - OMPI_ARRAY_NAME_CONVERT(recvcounts), - rdispls, - c_recvtypes, c_comm); + c_ierr = @INNER_CALL@(sendbuf, + tmp_sendcounts, + sdispls, + c_sendtypes, + recvbuf, + tmp_recvcounts, + rdispls, + c_recvtypes, c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - OMPI_ARRAY_FINT_2_INT_CLEANUP(sendcounts); - OMPI_ARRAY_FINT_2_INT_CLEANUP(recvcounts); + OMPI_FORTRAN_BIGCOUNT_ARRAY_CLEANUP(sendcounts, tmp_sendcounts); + OMPI_FORTRAN_BIGCOUNT_ARRAY_CLEANUP(recvcounts, tmp_recvcounts); free(c_sendtypes); free(c_recvtypes); }