diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.am b/ompi/mpi/fortran/use-mpi-f08/Makefile.am index 06921e352e2..0978233319c 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.am @@ -200,10 +200,6 @@ mpi_api_files = \ file_get_size_f08.F90 \ file_get_type_extent_f08.F90 \ file_get_view_f08.F90 \ - file_iwrite_at_f08.F90 \ - file_iwrite_f08.F90 \ - file_iwrite_at_all_f08.F90 \ - file_iwrite_shared_f08.F90 \ file_open_f08.F90 \ file_preallocate_f08.F90 \ file_read_all_begin_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 aed428449f7..c5c55d22310 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.prototype_files +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.prototype_files @@ -153,6 +153,10 @@ ready_prototype_files = \ $(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_iwrite_at_all_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/file_iwrite_shared_ts.c.in \ + $(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/file_iwrite_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/file_iwrite_at_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_f08.F90 deleted file mode 100644 index 149c7ba6d5b..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_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_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 - use :: ompi_mpifh_bindings, only : ompi_file_iwrite_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, 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_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_iwrite_at_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_ts.c.in index 94f7efc2fa0..6c96299dc5a 100644 --- a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_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_iwrite_at_all"; - -void ompi_file_iwrite_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_iwrite_at_all(FILE fh, OFFSET offset, 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); @@ -46,11 +37,11 @@ void ompi_file_iwrite_at_all_ts(MPI_Fint *fh, MPI_Offset *offset, CFI_cdesc_t *x return; } - c_ierr = PMPI_File_iwrite_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_iwrite_at_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_f08.F90 deleted file mode 100644 index 08135a0bd2b..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_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_File_iwrite_at_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_iwrite_at_f - implicit none - TYPE(MPI_File), INTENT(IN) :: fh - INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset - 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_at_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_iwrite_at_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_ts.c.in index 2fe3b3493eb..d46c05f1d50 100644 --- a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_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_iwrite_at"; - -void ompi_file_iwrite_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_iwrite_at(FILE fh, OFFSET offset, 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); @@ -46,11 +37,11 @@ void ompi_file_iwrite_at_ts(MPI_Fint *fh, MPI_Offset *offset, CFI_cdesc_t *x, return; } - c_ierr = PMPI_File_iwrite_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_iwrite_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_f08.F90 deleted file mode 100644 index e6e17ad77f3..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_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_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_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_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_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_shared_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_shared_f08.F90 deleted file mode 100644 index de15107a306..00000000000 --- a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_shared_f08.F90 +++ /dev/null @@ -1,30 +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_File_iwrite_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_iwrite_shared_f - implicit none - OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS, INTENT(IN) :: buf - TYPE(MPI_File), INTENT(IN) :: fh - 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_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_iwrite_shared_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_shared_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_shared_ts.c.in index bbcd085b8ed..d4a201d1453 100644 --- a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_shared_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_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_iwrite_shared"; - -void ompi_file_iwrite_shared_ts(MPI_Fint *fh, CFI_cdesc_t *x, MPI_Fint *count, - MPI_Fint *datatype, MPI_Fint *request, - MPI_Fint *ierr) +PROTOTYPE VOID file_iwrite_shared(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); @@ -46,11 +36,8 @@ void ompi_file_iwrite_shared_ts(MPI_Fint *fh, CFI_cdesc_t *x, MPI_Fint *count, return; } - c_ierr = PMPI_File_iwrite_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_iwrite_ts.c.in b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_ts.c.in index 662168e95e6..51cb65c21e3 100644 --- a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_ts.c.in +++ b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_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"; - -void ompi_file_iwrite_ts(MPI_Fint *fh, CFI_cdesc_t *x, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) +PROTOTYPE VOID file_iwrite(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,8 @@ void ompi_file_iwrite_ts(MPI_Fint *fh, CFI_cdesc_t *x, MPI_Fint *count, MPI_Fint return; } - c_ierr = PMPI_File_iwrite(c_fh, OMPI_F2C_BOTTOM(buf), - c_count, - c_datatype, - &c_request); + c_ierr = @INNER_CODE@(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 cf434c619d5..c5743a3a104 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 @@ -3595,64 +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_iwrite -subroutine MPI_File_iwrite_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_f08 -end interface MPI_File_iwrite - -interface MPI_File_iwrite_at -subroutine MPI_File_iwrite_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@, 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_at_f08 -end interface MPI_File_iwrite_at - -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 - 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@, 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_at_all_f08 -end interface MPI_File_iwrite_at_all - -interface MPI_File_iwrite_shared -subroutine MPI_File_iwrite_shared_f08(fh,buf,count,datatype,request,ierror) - use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request - implicit none - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, INTENT(IN) OMPI_ASYNCHRONOUS :: buf - TYPE(MPI_File), INTENT(IN) :: fh - 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_shared_f08 -end interface MPI_File_iwrite_shared - interface MPI_File_open subroutine MPI_File_open_f08(comm,filename,amode,info,fh,ierror) use :: mpi_f08_types, only : MPI_Comm, MPI_Info, MPI_File