From ced48f8c4149bb014481b94e3854f27bb0084aef Mon Sep 17 00:00:00 2001 From: Jake Tronge Date: Tue, 13 Aug 2024 06:43:08 -0600 Subject: [PATCH] Add more generated fortran functions Signed-off-by: Jake Tronge --- .../bindings/ompi_bindings/fortran_type.py | 14 ++ ompi/mpi/bindings/ompi_bindings/parser.py | 2 +- ompi/mpi/fortran/use-mpi-f08/Makefile.am | 11 -- .../use-mpi-f08/Makefile.prototype_files | 10 ++ .../fortran/use-mpi-f08/bsend_init_f08.F90 | 32 ---- .../fortran/use-mpi-f08/bsend_init_ts.c.in | 24 +-- .../fortran/use-mpi-f08/buffer_attach_f08.F90 | 26 --- .../fortran/use-mpi-f08/buffer_attach_ts.c.in | 10 +- .../use-mpi-f08/compare_and_swap_f08.F90 | 33 ---- .../use-mpi-f08/compare_and_swap_ts.c.in | 15 +- ompi/mpi/fortran/use-mpi-f08/exscan_f08.F90 | 31 ---- ompi/mpi/fortran/use-mpi-f08/exscan_ts.c.in | 20 +-- .../fortran/use-mpi-f08/fetch_and_op_f08.F90 | 33 ---- .../fortran/use-mpi-f08/fetch_and_op_ts.c.in | 15 +- .../use-mpi-f08/file_iread_all_f08.F90 | 29 ---- .../use-mpi-f08/file_iread_all_ts.c.in | 21 +-- .../use-mpi-f08/file_iread_at_all_f08.F90 | 31 ---- .../use-mpi-f08/file_iread_at_all_ts.c.in | 27 +-- .../fortran/use-mpi-f08/file_iread_at_ts.c.in | 27 +-- .../fortran/use-mpi-f08/file_iread_f08.F90 | 29 ---- .../use-mpi-f08/file_iread_shared_f08.F90 | 30 ---- .../use-mpi-f08/file_iread_shared_ts.c.in | 26 +-- .../fortran/use-mpi-f08/file_iread_ts.c.in | 21 +-- .../use-mpi-f08/file_iwrite_all_f08.F90 | 30 ---- .../use-mpi-f08/file_iwrite_all_ts.c.in | 22 +-- .../use-mpi-f08/mod/mpi-f08-interfaces.h.in | 158 ------------------ 26 files changed, 90 insertions(+), 637 deletions(-) delete mode 100644 ompi/mpi/fortran/use-mpi-f08/bsend_init_f08.F90 delete mode 100644 ompi/mpi/fortran/use-mpi-f08/buffer_attach_f08.F90 delete mode 100644 ompi/mpi/fortran/use-mpi-f08/compare_and_swap_f08.F90 delete mode 100644 ompi/mpi/fortran/use-mpi-f08/exscan_f08.F90 delete mode 100644 ompi/mpi/fortran/use-mpi-f08/fetch_and_op_f08.F90 delete mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iread_all_f08.F90 delete mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_f08.F90 delete mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iread_f08.F90 delete mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iread_shared_f08.F90 delete mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_f08.F90 diff --git a/ompi/mpi/bindings/ompi_bindings/fortran_type.py b/ompi/mpi/bindings/ompi_bindings/fortran_type.py index 7a841f988ed..0800f36e7e6 100644 --- a/ompi/mpi/bindings/ompi_bindings/fortran_type.py +++ b/ompi/mpi/bindings/ompi_bindings/fortran_type.py @@ -473,3 +473,17 @@ def use(self): def c_parameter(self): return f'MPI_Fint *{self.name}' + + +@FortranType.add('OFFSET') +class Offset(FortranType): + """MPI_Offset type.""" + + def declare(self): + return f'INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: {self.name}' + + def use(self): + return [('mpi_f08_types', 'MPI_OFFSET_KIND')] + + def c_parameter(self): + return f'MPI_Offset *{self.name}' diff --git a/ompi/mpi/bindings/ompi_bindings/parser.py b/ompi/mpi/bindings/ompi_bindings/parser.py index c8ace55e049..a62e46a15b9 100644 --- a/ompi/mpi/bindings/ompi_bindings/parser.py +++ b/ompi/mpi/bindings/ompi_bindings/parser.py @@ -105,7 +105,7 @@ def load(fname, prefix=None, type_constructor=None): header.append(line) if not prototype: - raise RuntimeError('missing prototype') + raise RuntimeError(f'missing prototype for {fname}') # Parse the prototype prototype = ''.join(prototype) prototype = prototype[len('PROTOTYPE'):] diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.am b/ompi/mpi/fortran/use-mpi-f08/Makefile.am index 2b41b5c8796..06921e352e2 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.am @@ -127,8 +127,6 @@ mpi_api_files = \ barrier_f08.F90 \ barrier_init_f08.F90 \ bcast_init_f08.F90 \ - bsend_init_f08.F90 \ - buffer_attach_f08.F90 \ buffer_detach_f08.F90 \ cancel_f08.F90 \ cart_coords_f08.F90 \ @@ -177,7 +175,6 @@ mpi_api_files = \ comm_split_f08.F90 \ comm_split_type_f08.F90 \ comm_test_inter_f08.F90 \ - compare_and_swap_f08.F90 \ dist_graph_create_adjacent_f08.F90 \ dist_graph_create_f08.F90 \ dist_graph_neighbors_count_f08.F90 \ @@ -186,10 +183,8 @@ mpi_api_files = \ errhandler_free_f08.F90 \ error_class_f08.F90 \ error_string_f08.F90 \ - exscan_f08.F90 \ exscan_init_f08.F90 \ f_sync_reg_f08.F90 \ - fetch_and_op_f08.F90 \ file_call_errhandler_f08.F90 \ file_close_f08.F90 \ file_create_errhandler_f08.F90 \ @@ -205,15 +200,9 @@ mpi_api_files = \ file_get_size_f08.F90 \ file_get_type_extent_f08.F90 \ file_get_view_f08.F90 \ - file_iread_at_f08.F90 \ - file_iread_f08.F90 \ - file_iread_at_all_f08.F90 \ - file_iread_all_f08.F90 \ - file_iread_shared_f08.F90 \ file_iwrite_at_f08.F90 \ file_iwrite_f08.F90 \ file_iwrite_at_all_f08.F90 \ - file_iwrite_all_f08.F90 \ file_iwrite_shared_f08.F90 \ file_open_f08.F90 \ file_preallocate_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 d2eab254506..aed428449f7 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.prototype_files +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.prototype_files @@ -139,10 +139,20 @@ ready_prototype_files = \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/alltoallw_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/bcast_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/bsend_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/bsend_init_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/buffer_attach_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/exscan_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/fetch_and_op_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/send_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/isend_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/irecv_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/file_iread_all_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/file_iread_at_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/file_iread_shared_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/file_iread_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_ts.c.in \ $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/file_write_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/waitall.c.in \ diff --git a/ompi/mpi/fortran/use-mpi-f08/bsend_init_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/bsend_init_f08.F90 deleted file mode 100644 index 78e48fc1240..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/bsend_init_f08.F90 +++ /dev/null @@ -1,32 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2009-2022 Cisco Systems, Inc. All rights reserved -! Copyright (c) 2009-2012 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" - -#include "mpi-f08-rename.h" - -subroutine MPI_Bsend_init_f08(buf,count,datatype,dest,tag,comm,request,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Request - use :: ompi_mpifh_bindings, only : ompi_bsend_init_f - implicit none - OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) OMPI_ASYNCHRONOUS :: buf - INTEGER, INTENT(IN) :: count, dest, tag - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Comm), INTENT(IN) :: comm - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_bsend_init_f(buf,count,datatype%MPI_VAL,dest,tag,comm%MPI_VAL, & - request%MPI_VAL,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_Bsend_init_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/bsend_init_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/bsend_init_ts.c.in index a0e740a318a..0c4c288f75b 100644 --- a/ompi/mpi/fortran/use-mpi-f08/bsend_init_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/bsend_init_ts.c.in @@ -19,16 +19,8 @@ * $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_Bsend_init"; - -void ompi_bsend_init_ts(CFI_cdesc_t* x, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) +PROTOTYPE VOID bsend_init(BUFFER x, COUNT count, DATATYPE datatype, RANK dest, + TAG tag, COMM comm, REQUEST_OUT request) { int c_ierr; MPI_Datatype c_datatype, c_type = PMPI_Type_f2c(*datatype); @@ -36,7 +28,7 @@ void ompi_bsend_init_ts(CFI_cdesc_t* x, MPI_Fint *count, MPI_Fint *datatype, MPI 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) { @@ -45,11 +37,11 @@ void ompi_bsend_init_ts(CFI_cdesc_t* x, MPI_Fint *count, MPI_Fint *datatype, MPI return; } - c_ierr = PMPI_Bsend_init(OMPI_F2C_BOTTOM(buf), c_count, - c_datatype, - OMPI_FINT_2_INT(*dest), - OMPI_FINT_2_INT(*tag), - c_comm, &c_req); + c_ierr = @INNER_CALL@(OMPI_F2C_BOTTOM(buf), c_count, + c_datatype, + OMPI_FINT_2_INT(*dest), + OMPI_FINT_2_INT(*tag), + c_comm, &c_req); if (c_datatype != c_type) { ompi_datatype_destroy(&c_datatype); } diff --git a/ompi/mpi/fortran/use-mpi-f08/buffer_attach_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/buffer_attach_f08.F90 deleted file mode 100644 index d5491bc753e..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/buffer_attach_f08.F90 +++ /dev/null @@ -1,26 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. -! Copyright (c) 2009-2012 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_Buffer_attach_f08(buffer,size,ierror) - use :: ompi_mpifh_bindings, only : ompi_buffer_attach_f - implicit none - OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS:: buffer - INTEGER, INTENT(IN) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_buffer_attach_f(buffer,size,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_Buffer_attach_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/buffer_attach_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/buffer_attach_ts.c.in index 207566b66cb..ba640f2ebef 100644 --- a/ompi/mpi/fortran/use-mpi-f08/buffer_attach_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/buffer_attach_ts.c.in @@ -19,15 +19,7 @@ * $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" - -static const char FUNC_NAME[] = "MPI_Buffer_attach"; - -void ompi_buffer_attach_ts(CFI_cdesc_t *x, MPI_Fint *size, MPI_Fint *ierr) +PROTOTYPE VOID buffer_attach(BUFFER_ASYNC x, COUNT size) { int c_ierr; if (OMPI_CFI_IS_CONTIGUOUS(x)) { diff --git a/ompi/mpi/fortran/use-mpi-f08/compare_and_swap_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/compare_and_swap_f08.F90 deleted file mode 100644 index 07f9080087b..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/compare_and_swap_f08.F90 +++ /dev/null @@ -1,33 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2010-2022 Cisco Systems, Inc. All rights reserved -! Copyright (c) 2009-2014 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_Compare_and_swap_f08(origin_addr,compare_addr,result_addr,& - datatype,target_rank,target_disp,win,& - ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Win, MPI_ADDRESS_KIND - use :: ompi_mpifh_bindings, only : ompi_compare_and_swap_f - implicit none - OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) OMPI_ASYNCHRONOUS :: origin_addr, compare_addr - OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS :: result_addr - TYPE(MPI_Datatype), INTENT(IN) :: datatype - INTEGER, INTENT(IN) :: target_rank - INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp - TYPE(MPI_Win), INTENT(IN) :: win - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_compare_and_swap_f(origin_addr,compare_addr,result_addr,datatype%MPI_VAL,& - target_rank,target_disp,win%MPI_VAL,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_Compare_and_swap_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/compare_and_swap_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/compare_and_swap_ts.c.in index 3047e3b678a..fb151c8cb0f 100644 --- a/ompi/mpi/fortran/use-mpi-f08/compare_and_swap_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/compare_and_swap_ts.c.in @@ -22,18 +22,9 @@ * $HEADER$ */ -#include "ompi_config.h" - -#include "ompi/win/win.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_Compare_and_swap"; - -void ompi_compare_and_swap_ts(CFI_cdesc_t *x1, CFI_cdesc_t *x2, CFI_cdesc_t *x3, - MPI_Fint *datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, - MPI_Fint *win, MPI_Fint *ierr) +PROTOTYPE VOID compare_and_swap(BUFFER x1, BUFFER x2, BUFFER_ASYNC x3, + DATATYPE datatype, RANK target_rank, AINT target_disp, + WIN win) { int c_ierr; MPI_Datatype c_datatype = PMPI_Type_f2c(*datatype); diff --git a/ompi/mpi/fortran/use-mpi-f08/exscan_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/exscan_f08.F90 deleted file mode 100644 index cf78dc016c5..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/exscan_f08.F90 +++ /dev/null @@ -1,31 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. -! Copyright (c) 2009-2012 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_Exscan_f08(sendbuf,recvbuf,count,datatype,op,comm,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Comm - use :: ompi_mpifh_bindings, only : ompi_exscan_f - implicit none - OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf - OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf - INTEGER, INTENT(IN) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Op), INTENT(IN) :: op - TYPE(MPI_Comm), INTENT(IN) :: comm - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_exscan_f(sendbuf,recvbuf,count,datatype%MPI_VAL,& - op%MPI_VAL,comm%MPI_VAL,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_Exscan_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/exscan_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/exscan_ts.c.in index 6081fd6e5cc..c81fe07e45a 100644 --- a/ompi/mpi/fortran/use-mpi-f08/exscan_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/exscan_ts.c.in @@ -19,18 +19,8 @@ * $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_Exscan"; - -void ompi_exscan_ts(CFI_cdesc_t *x1, CFI_cdesc_t *x2, MPI_Fint *count, - MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, - MPI_Fint *ierr) +PROTOTYPE VOID exscan(BUFFER x1, BUFFER_OUT x2, COUNT count, + DATATYPE datatype, OP op, COMM comm) { int c_ierr; MPI_Comm c_comm = PMPI_Comm_f2c(*comm); @@ -57,8 +47,8 @@ void ompi_exscan_ts(CFI_cdesc_t *x1, CFI_cdesc_t *x2, MPI_Fint *count, sendbuf = (char *) OMPI_F2C_BOTTOM (sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM (recvbuf); - c_ierr = PMPI_Exscan(sendbuf, recvbuf, - OMPI_FINT_2_INT(*count), - c_type, c_op, c_comm); + c_ierr = @INNER_CALL@(sendbuf, recvbuf, + (@COUNT_TYPE@) *count, + c_type, c_op, c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); } diff --git a/ompi/mpi/fortran/use-mpi-f08/fetch_and_op_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/fetch_and_op_f08.F90 deleted file mode 100644 index 4958a4019ac..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/fetch_and_op_f08.F90 +++ /dev/null @@ -1,33 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2010-2022 Cisco Systems, Inc. All rights reserved -! Copyright (c) 2009-2014 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_Fetch_and_op_f08(origin_addr,result_addr,datatype,target_rank, & - target_disp,op,win,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Win, MPI_ADDRESS_KIND - use :: ompi_mpifh_bindings, only : ompi_fetch_and_op_f - implicit none - OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) OMPI_ASYNCHRONOUS :: origin_addr - OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS :: result_addr - TYPE(MPI_Datatype), INTENT(IN) :: datatype - INTEGER, INTENT(IN) :: target_rank - INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp - TYPE(MPI_Op), INTENT(IN) :: op - TYPE(MPI_Win), INTENT(IN) :: win - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_fetch_and_op_f(origin_addr,result_addr,datatype%MPI_VAL,target_rank,& - target_disp,op%MPI_VAL,win%MPI_VAL,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_Fetch_and_op_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/fetch_and_op_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/fetch_and_op_ts.c.in index 1cb0b28659d..f2f9ff6f6fb 100644 --- a/ompi/mpi/fortran/use-mpi-f08/fetch_and_op_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/fetch_and_op_ts.c.in @@ -22,18 +22,9 @@ * $HEADER$ */ -#include "ompi_config.h" - -#include "ompi/win/win.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_Fetch_and_op"; - -void ompi_fetch_and_op_ts(CFI_cdesc_t *x1, CFI_cdesc_t *x2, MPI_Fint *datatype, - MPI_Fint *target_rank, MPI_Aint *target_disp, - MPI_Fint *op, MPI_Fint *win, MPI_Fint *ierr) +PROTOTYPE VOID fetch_and_op(BUFFER x1, BUFFER_OUT x2, DATATYPE datatype, + RANK target_rank, AINT target_disp, + OP op, WIN win) { int c_ierr; MPI_Datatype c_datatype = PMPI_Type_f2c(*datatype); diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iread_all_f08.F90 deleted file mode 100644 index 88a2f714bef..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/file_iread_all_f08.F90 +++ /dev/null @@ -1,29 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. -! Copyright (c) 2009-2012 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_File_iread_all_f08(fh,buf,count,datatype,request,ierror) - use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request - use :: ompi_mpifh_bindings, only : ompi_file_iread_all_f - implicit none - TYPE(MPI_File), INTENT(IN) :: fh - OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS :: buf - INTEGER, INTENT(IN) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_file_iread_all_f(fh%MPI_VAL,buf,count,datatype%MPI_VAL,request%MPI_VAL,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_File_iread_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_all_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/file_iread_all_ts.c.in index bf253f304d9..a64ead33171 100644 --- a/ompi/mpi/fortran/use-mpi-f08/file_iread_all_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/file_iread_all_ts.c.in @@ -19,23 +19,14 @@ * $HEADER$ */ -#include "ompi_config.h" - -#include "ompi/file/file.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_File_iread_all"; - -void ompi_file_iread_all_ts(MPI_Fint *fh, CFI_cdesc_t *x, MPI_Fint *count, - MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) +PROTOTYPE VOID file_iread_all(FILE fh, BUFFER_ASYNC x, COUNT count, + DATATYPE datatype, REQUEST_OUT request) { int c_ierr; MPI_File c_fh = PMPI_File_f2c(*fh); 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; MPI_Request c_request; OMPI_CFI_2_C(x, c_count, c_type, c_datatype, c_ierr); @@ -45,9 +36,9 @@ void ompi_file_iread_all_ts(MPI_Fint *fh, CFI_cdesc_t *x, MPI_Fint *count, return; } - c_ierr = PMPI_File_iread_all(c_fh, OMPI_F2C_BOTTOM(buf), - c_count, - c_datatype, &c_request); + c_ierr = @INNER_CALL@(c_fh, OMPI_F2C_BOTTOM(buf), + c_count, + c_datatype, &c_request); if (c_datatype != c_type) { ompi_datatype_destroy(&c_datatype); diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_f08.F90 deleted file mode 100644 index b62a3de3ce4..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_f08.F90 +++ /dev/null @@ -1,31 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. -! Copyright (c) 2009-2012 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_File_iread_at_all_f08(fh,offset,buf,count,datatype,request,ierror) - use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND - use :: ompi_mpifh_bindings, only : ompi_file_iread_at_all_f - implicit none - TYPE(MPI_File), INTENT(IN) :: fh - INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset - OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS :: buf - INTEGER, INTENT(IN) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_file_iread_at_all_f(fh%MPI_VAL,offset,buf,count,& - datatype%MPI_VAL,request%MPI_VAL,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_File_iread_at_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_ts.c.in index 3a5fea11386..06f0c26cb7e 100644 --- a/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_ts.c.in @@ -19,24 +19,15 @@ * $HEADER$ */ -#include "ompi_config.h" - -#include "ompi/file/file.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_File_iread_at_all"; - -void ompi_file_iread_at_all_ts(MPI_Fint *fh, MPI_Offset *offset, - CFI_cdesc_t *x, MPI_Fint *count, - MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) +PROTOTYPE VOID file_iread_at_all(FILE fh, OFFSET offset, + BUFFER_ASYNC x, COUNT count, + DATATYPE datatype, REQUEST_OUT request) { int c_ierr; MPI_File c_fh = PMPI_File_f2c(*fh); 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; MPI_Request c_request; OMPI_CFI_2_C(x, c_count, c_type, c_datatype, c_ierr); @@ -46,11 +37,11 @@ void ompi_file_iread_at_all_ts(MPI_Fint *fh, MPI_Offset *offset, return; } - c_ierr = PMPI_File_iread_at_all(c_fh, (MPI_Offset) *offset, - OMPI_F2C_BOTTOM(buf), - c_count, - c_datatype, - &c_request); + c_ierr = @INNER_CALL@(c_fh, (MPI_Offset) *offset, + OMPI_F2C_BOTTOM(buf), + c_count, + c_datatype, + &c_request); if (c_datatype != c_type) { ompi_datatype_destroy(&c_datatype); } diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_at_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/file_iread_at_ts.c.in index c5c3a7d6912..8da4ce544ef 100644 --- a/ompi/mpi/fortran/use-mpi-f08/file_iread_at_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/file_iread_at_ts.c.in @@ -19,24 +19,15 @@ * $HEADER$ */ -#include "ompi_config.h" - -#include "ompi/file/file.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_File_iread_at"; - -void ompi_file_iread_at_ts(MPI_Fint *fh, MPI_Offset *offset, - CFI_cdesc_t *x, MPI_Fint *count, - MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) +PROTOTYPE VOID file_iread_at(FILE fh, OFFSET offset, + BUFFER_ASYNC x, COUNT count, + DATATYPE datatype, REQUEST_OUT request) { int c_ierr; MPI_File c_fh = PMPI_File_f2c(*fh); 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; MPI_Request c_request; OMPI_CFI_2_C(x, c_count, c_type, c_datatype, c_ierr); @@ -46,11 +37,11 @@ void ompi_file_iread_at_ts(MPI_Fint *fh, MPI_Offset *offset, return; } - c_ierr = PMPI_File_iread_at(c_fh, (MPI_Offset) *offset, - OMPI_F2C_BOTTOM(buf), - c_count, - c_datatype, - &c_request); + c_ierr = @INNER_CALL@(c_fh, (MPI_Offset) *offset, + OMPI_F2C_BOTTOM(buf), + c_count, + c_datatype, + &c_request); if (c_datatype != c_type) { ompi_datatype_destroy(&c_datatype); } diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iread_f08.F90 deleted file mode 100644 index 4b403188c9d..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/file_iread_f08.F90 +++ /dev/null @@ -1,29 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. -! Copyright (c) 2009-2012 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_File_iread_f08(fh,buf,count,datatype,request,ierror) - use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request - use :: ompi_mpifh_bindings, only : ompi_file_iread_f - implicit none - TYPE(MPI_File), INTENT(IN) :: fh - OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS :: buf - INTEGER, INTENT(IN) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_file_iread_f(fh%MPI_VAL,buf,count,datatype%MPI_VAL,request%MPI_VAL,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_File_iread_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_shared_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iread_shared_f08.F90 deleted file mode 100644 index 91e40cc4e52..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/file_iread_shared_f08.F90 +++ /dev/null @@ -1,30 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. -! Copyright (c) 2009-2012 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_File_iread_shared_f08(fh,buf,count,datatype,request,ierror) - use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request - use :: ompi_mpifh_bindings, only : ompi_file_iread_shared_f - implicit none - TYPE(MPI_File), INTENT(IN) :: fh - OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS :: buf - INTEGER, INTENT(IN) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_file_iread_shared_f(fh%MPI_VAL,buf,count,& - datatype%MPI_VAL,request%MPI_VAL,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_File_iread_shared_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_shared_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/file_iread_shared_ts.c.in index f371a1a2817..a60e413083c 100644 --- a/ompi/mpi/fortran/use-mpi-f08/file_iread_shared_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/file_iread_shared_ts.c.in @@ -19,24 +19,14 @@ * $HEADER$ */ -#include "ompi_config.h" - -#include "ompi/file/file.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_File_iread_shared"; - -void ompi_file_iread_shared_ts(MPI_Fint *fh, CFI_cdesc_t *x, MPI_Fint *count, - MPI_Fint *datatype, MPI_Fint *request, - MPI_Fint *ierr) +PROTOTYPE VOID file_iread_shared(FILE fh, BUFFER_ASYNC x, COUNT count, + DATATYPE datatype, REQUEST_OUT request) { int c_ierr; MPI_File c_fh = PMPI_File_f2c(*fh); 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; MPI_Request c_request; OMPI_CFI_2_C(x, c_count, c_type, c_datatype, c_ierr); @@ -46,11 +36,11 @@ void ompi_file_iread_shared_ts(MPI_Fint *fh, CFI_cdesc_t *x, MPI_Fint *count, return; } - c_ierr = PMPI_File_iread_shared(c_fh, - OMPI_F2C_BOTTOM(buf), - c_count, - c_datatype, - &c_request); + c_ierr = @INNER_CALL@(c_fh, + OMPI_F2C_BOTTOM(buf), + c_count, + c_datatype, + &c_request); if (c_datatype != c_type) { ompi_datatype_destroy(&c_datatype); } diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/file_iread_ts.c.in index 64c688128fc..a87193b3cd5 100644 --- a/ompi/mpi/fortran/use-mpi-f08/file_iread_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/file_iread_ts.c.in @@ -19,23 +19,14 @@ * $HEADER$ */ -#include "ompi_config.h" - -#include "ompi/file/file.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_File_iread"; - -void ompi_file_iread_ts(MPI_Fint *fh, CFI_cdesc_t *x, MPI_Fint *count, - MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) +PROTOTYPE VOID file_iread(FILE fh, BUFFER_ASYNC x, COUNT count, + DATATYPE datatype, REQUEST_OUT request) { int c_ierr; MPI_File c_fh = PMPI_File_f2c(*fh); 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; MPI_Request c_request; OMPI_CFI_2_C(x, c_count, c_type, c_datatype, c_ierr); @@ -45,9 +36,9 @@ void ompi_file_iread_ts(MPI_Fint *fh, CFI_cdesc_t *x, MPI_Fint *count, return; } - c_ierr = PMPI_File_iread(c_fh, OMPI_F2C_BOTTOM(buf), - c_count, - c_datatype, &c_request); + c_ierr = @INNER_CALL@(c_fh, OMPI_F2C_BOTTOM(buf), + c_count, + c_datatype, &c_request); if (c_datatype != c_type) { ompi_datatype_destroy(&c_datatype); diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_f08.F90 deleted file mode 100644 index e42f494ab10..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_f08.F90 +++ /dev/null @@ -1,30 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. -! Copyright (c) 2009-2012 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_File_iwrite_all_f08(fh,buf,count,datatype,request,ierror) - use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request - use :: ompi_mpifh_bindings, only : ompi_file_iwrite_all_f - implicit none - TYPE(MPI_File), INTENT(IN) :: fh - OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS, INTENT(IN) :: buf - INTEGER, INTENT(IN) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - integer :: c_ierror - - call ompi_file_iwrite_all_f(fh%MPI_VAL,buf,count,& - datatype%MPI_VAL,request%MPI_VAL,c_ierror) - if (present(ierror)) ierror = c_ierror - -end subroutine MPI_File_iwrite_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_ts.c.in index 16bc37dda93..a8fc977e5fb 100644 --- a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_ts.c.in @@ -19,22 +19,14 @@ * $HEADER$ */ -#include "ompi_config.h" - -#include "ompi/file/file.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_File_iwrite_all"; - -void ompi_file_iwrite_all_ts(MPI_Fint *fh, CFI_cdesc_t *x, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) +PROTOTYPE VOID file_iwrite_all(FILE fh, BUFFER x, COUNT count, + DATATYPE datatype, REQUEST_OUT request) { int c_ierr; MPI_File c_fh = PMPI_File_f2c(*fh); 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; MPI_Request c_request; OMPI_CFI_2_C(x, c_count, c_type, c_datatype, c_ierr); @@ -44,10 +36,10 @@ void ompi_file_iwrite_all_ts(MPI_Fint *fh, CFI_cdesc_t *x, MPI_Fint *count, MPI_ return; } - c_ierr = PMPI_File_iwrite_all(c_fh, OMPI_F2C_BOTTOM(buf), - c_count, - c_datatype, - &c_request); + c_ierr = @INNER_CALL@(c_fh, OMPI_F2C_BOTTOM(buf), + c_count, + c_datatype, + &c_request); if (c_datatype != c_type) { ompi_datatype_destroy(&c_datatype); } 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 530bf30b41a..cf434c619d5 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 @@ -19,30 +19,6 @@ ! and the name for tools ("MPI_Init_f08") and the back-end implementation ! name (e.g., "MPI_Init_f08"). -interface MPI_Bsend_init -subroutine MPI_Bsend_init_f08(buf,count,datatype,dest,tag,comm,request,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Request - implicit none - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, INTENT(IN) OMPI_ASYNCHRONOUS :: buf - INTEGER, INTENT(IN) :: count, dest, tag - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Comm), INTENT(IN) :: comm - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_Bsend_init_f08 -end interface MPI_Bsend_init - -interface MPI_Buffer_attach -subroutine MPI_Buffer_attach_f08(buffer,size,ierror) - implicit none - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buffer - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ OMPI_ASYNCHRONOUS :: buffer - INTEGER, INTENT(IN) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_Buffer_attach_f08 -end interface MPI_Buffer_attach - interface MPI_Buffer_detach subroutine MPI_Buffer_detach_f08(buffer_addr,size,ierror) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR @@ -1218,21 +1194,6 @@ subroutine MPI_Bcast_init_f08(buffer,count,datatype,root,comm,info,request,ierro end subroutine MPI_Bcast_init_f08 end interface MPI_Bcast_init -interface MPI_Exscan -subroutine MPI_Exscan_f08(sendbuf,recvbuf,count,datatype,op,comm,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, 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) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Op), INTENT(IN) :: op - TYPE(MPI_Comm), INTENT(IN) :: comm - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_Exscan_f08 -end interface MPI_Exscan - interface MPI_Iexscan subroutine MPI_Iexscan_f08(sendbuf,recvbuf,count,datatype,op,comm,request,ierror) use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Comm, MPI_Request @@ -3211,39 +3172,6 @@ subroutine MPI_Rput_f08(origin_addr,origin_count,origin_datatype,target_rank, & end subroutine MPI_Rput_f08 end interface MPI_Rput -interface MPI_Fetch_and_op -subroutine MPI_Fetch_and_op_f08(origin_addr,result_addr,datatype,target_rank, & - target_disp,op,win,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Win, MPI_ADDRESS_KIND - implicit none - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr,result_addr - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, INTENT(IN) OMPI_ASYNCHRONOUS :: origin_addr - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ OMPI_ASYNCHRONOUS :: result_addr - TYPE(MPI_Datatype), INTENT(IN) :: datatype - INTEGER, INTENT(IN) :: target_rank - INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp - TYPE(MPI_Op), INTENT(IN) :: op - TYPE(MPI_Win), INTENT(IN) :: win - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_Fetch_and_op_f08 -end interface MPI_Fetch_and_op - -interface MPI_Compare_and_swap -subroutine MPI_Compare_and_swap_f08(origin_addr,compare_addr,result_addr,datatype, & - target_rank,target_disp,win,ierror) - use :: mpi_f08_types, only : MPI_Datatype, MPI_Win, MPI_ADDRESS_KIND - implicit none - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr,compare_addr,result_addr - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, INTENT(IN) OMPI_ASYNCHRONOUS :: origin_addr,compare_addr - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ OMPI_ASYNCHRONOUS :: result_addr - TYPE(MPI_Datatype), INTENT(IN) :: datatype - INTEGER, INTENT(IN) :: target_rank - INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp - TYPE(MPI_Win), INTENT(IN) :: win - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_Compare_and_swap_f08 -end interface MPI_Compare_and_swap - interface MPI_Win_complete subroutine MPI_Win_complete_f08(win,ierror) use :: mpi_f08_types, only : MPI_Info, MPI_Comm, MPI_Win, MPI_ADDRESS_KIND @@ -3667,78 +3595,6 @@ subroutine MPI_File_get_view_f08(fh,disp,etype,filetype,datarep,ierror) end subroutine MPI_File_get_view_f08 end interface MPI_File_get_view -interface MPI_File_iread -subroutine MPI_File_iread_f08(fh,buf,count,datatype,request,ierror) - use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request - implicit none - TYPE(MPI_File), INTENT(IN) :: fh - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ OMPI_ASYNCHRONOUS :: buf - INTEGER, INTENT(IN) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_File_iread_f08 -end interface MPI_File_iread - -interface MPI_File_iread_at -subroutine MPI_File_iread_at_f08(fh,offset,buf,count,datatype,request,ierror) - use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND - implicit none - TYPE(MPI_File), INTENT(IN) :: fh - INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ OMPI_ASYNCHRONOUS :: buf - INTEGER, INTENT(IN) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_File_iread_at_f08 -end interface MPI_File_iread_at - -interface MPI_File_iread_all -subroutine MPI_File_iread_all_f08(fh,buf,count,datatype,request,ierror) - use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request - implicit none - TYPE(MPI_File), INTENT(IN) :: fh - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ OMPI_ASYNCHRONOUS :: buf - INTEGER, INTENT(IN) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_File_iread_all_f08 -end interface MPI_File_iread_all - -interface MPI_File_iread_at_all -subroutine MPI_File_iread_at_all_f08(fh,offset,buf,count,datatype,request,ierror) - use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND - implicit none - TYPE(MPI_File), INTENT(IN) :: fh - INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ OMPI_ASYNCHRONOUS :: buf - INTEGER, INTENT(IN) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_File_iread_at_all_f08 -end interface MPI_File_iread_at_all - -interface MPI_File_iread_shared -subroutine MPI_File_iread_shared_f08(fh,buf,count,datatype,request,ierror) - use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request - implicit none - TYPE(MPI_File), INTENT(IN) :: fh - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ OMPI_ASYNCHRONOUS :: buf - INTEGER, INTENT(IN) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_File_iread_shared_f08 -end interface MPI_File_iread_shared - interface MPI_File_iwrite subroutine MPI_File_iwrite_f08(fh,buf,count,datatype,request,ierror) use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request @@ -3768,20 +3624,6 @@ subroutine MPI_File_iwrite_at_f08(fh,offset,buf,count,datatype,request,ierror) end subroutine MPI_File_iwrite_at_f08 end interface MPI_File_iwrite_at -interface MPI_File_iwrite_all -subroutine MPI_File_iwrite_all_f08(fh,buf,count,datatype,request,ierror) - use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request - implicit none - TYPE(MPI_File), INTENT(IN) :: fh - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, INTENT(IN) OMPI_ASYNCHRONOUS :: buf - INTEGER, INTENT(IN) :: count - TYPE(MPI_Datatype), INTENT(IN) :: datatype - TYPE(MPI_Request), INTENT(OUT) :: request - INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_File_iwrite_all_f08 -end interface MPI_File_iwrite_all - interface MPI_File_iwrite_at_all subroutine MPI_File_iwrite_at_all_f08(fh,offset,buf,count,datatype,request,ierror) use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND