Skip to content

Commit

Permalink
mpif08: finish converting *_init functions
Browse files Browse the repository at this point in the history
Signed-off-by: Jake Tronge <[email protected]>
  • Loading branch information
jtronge committed Oct 10, 2024
1 parent 594c4f4 commit 8204150
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 212 deletions.
4 changes: 0 additions & 4 deletions ompi/mpi/fortran/use-mpi-f08/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ mpi_api_files = \
alloc_mem_f08.F90 \
barrier_f08.F90 \
barrier_init_f08.F90 \
bcast_init_f08.F90 \
cancel_f08.F90 \
cart_coords_f08.F90 \
cart_create_f08.F90 \
Expand Down Expand Up @@ -176,7 +175,6 @@ mpi_api_files = \
errhandler_free_f08.F90 \
error_class_f08.F90 \
error_string_f08.F90 \
exscan_init_f08.F90 \
f_sync_reg_f08.F90 \
file_call_errhandler_f08.F90 \
file_close_f08.F90 \
Expand Down Expand Up @@ -205,8 +203,6 @@ mpi_api_files = \
file_sync_f08.F90 \
finalized_f08.F90 \
finalize_f08.F90 \
gather_init_f08.F90 \
gatherv_init_f08.F90 \
get_elements_x_f08.F90 \
get_library_version_f08.F90 \
get_processor_name_f08.F90 \
Expand Down
8 changes: 8 additions & 0 deletions ompi/mpi/fortran/use-mpi-f08/Makefile.prototype_files
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ prototype_files = \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/alltoallw_ts.c.in \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/alltoallw_init_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/bcast_init_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/bsend_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/buffer_detach.c.in \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/compare_and_swap_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/exscan_init_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/file_iread_all_ts.c.in \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_ts.c.in \
Expand Down Expand Up @@ -63,7 +65,9 @@ prototype_files = \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/file_write_ts.c.in \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/free_mem_ts.c.in \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/gather_ts.c.in \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/gather_init_ts.c.in \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/gatherv_ts.c.in \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/gatherv_init_ts.c.in \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/get_address_ts.c.in \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/get_accumulate_ts.c.in \
$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/get_count.c.in \
Expand Down Expand Up @@ -254,6 +258,7 @@ extra_dist_prototype_files = \
file_read_all_end_ts.c.in \
isend_ts.c.in \
gather_ts.c.in \
gather_init_ts.c.in \
igatherv_ts.c.in \
ialltoallw_ts.c.in \
ialltoallv_ts.c.in \
Expand Down Expand Up @@ -289,6 +294,7 @@ extra_dist_prototype_files = \
iallreduce_ts.c.in \
imrecv_ts.c.in \
exscan_ts.c.in \
exscan_init_ts.c.in \
rsend_init_ts.c.in \
file_iread_ts.c.in \
file_read_at_all_ts.c.in \
Expand All @@ -303,13 +309,15 @@ extra_dist_prototype_files = \
unpack_external_ts.c.in \
ibcast_ts.c.in \
bcast_ts.c.in \
bcast_init_ts.c.in \
bsend_ts.c.in \
buffer_attach_ts.c.in \
buffer_detach.c.in \
irecv_ts.c.in \
neighbor_allgather_ts.c.in \
neighbor_allgather_init_ts.c.in \
gatherv_ts.c.in \
gatherv_init_ts.c.in \
file_read_ordered_end_ts.c.in \
file_iread_at_ts.c.in \
rget_ts.c.in \
Expand Down
31 changes: 0 additions & 31 deletions ompi/mpi/fortran/use-mpi-f08/bcast_init_f08.F90

This file was deleted.

1 change: 0 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/bcast_ts.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ PROTOTYPE VOID bcast(BUFFER_OUT x, COUNT count, DATATYPE datatype,

if (OMPI_COMM_IS_INTRA(c_comm) || MPI_PROC_NULL != c_root) {
c_type = PMPI_Type_f2c(*datatype);
c_count = (@COUNT_TYPE@) *count;
OMPI_CFI_2_C(x, c_count, c_type, c_datatype, c_ierr);
if (MPI_SUCCESS != c_ierr) {
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
Expand Down
34 changes: 0 additions & 34 deletions ompi/mpi/fortran/use-mpi-f08/exscan_init_f08.F90

This file was deleted.

35 changes: 0 additions & 35 deletions ompi/mpi/fortran/use-mpi-f08/gather_init_f08.F90

This file was deleted.

36 changes: 0 additions & 36 deletions ompi/mpi/fortran/use-mpi-f08/gatherv_init_f08.F90

This file was deleted.

4 changes: 1 addition & 3 deletions ompi/mpi/fortran/use-mpi-f08/gatherv_ts.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PROTOTYPE VOID gatherv(BUFFER x1, COUNT sendcount, DATATYPE sendtype,
MPI_Comm c_comm = PMPI_Comm_f2c(*comm);
int c_root = OMPI_FINT_2_INT(*root);
MPI_Datatype c_senddatatype = NULL, c_sendtype = NULL, c_recvtype = NULL;
int c_sendcount = 0;
@COUNT_TYPE@ c_sendcount = (@COUNT_TYPE@) *sendcount;
char *sendbuf = OMPI_CFI_BASE_ADDR(x1), *recvbuf = OMPI_CFI_BASE_ADDR(x2);
@COUNT_TYPE@ *tmp_recvcounts = NULL;
@DISP_TYPE@ *tmp_displs = NULL;
Expand All @@ -46,7 +46,6 @@ PROTOTYPE VOID gatherv(BUFFER x1, COUNT sendcount, DATATYPE sendtype,
OMPI_FORTRAN_BIGCOUNT_ARRAY_SET(displs, tmp_displs, size);
} else if (MPI_PROC_NULL != c_root) {
c_sendtype = PMPI_Type_f2c(*sendtype);
c_sendcount = OMPI_FINT_2_INT(*sendcount);
OMPI_CFI_2_C(x1, c_sendcount, c_sendtype, c_senddatatype, c_ierr);
if (MPI_SUCCESS != c_ierr) {
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
Expand All @@ -71,7 +70,6 @@ PROTOTYPE VOID gatherv(BUFFER x1, COUNT sendcount, DATATYPE sendtype,
sendbuf = MPI_IN_PLACE;
} else {
c_sendtype = PMPI_Type_f2c(*sendtype);
c_sendcount = OMPI_FINT_2_INT(*sendcount);
OMPI_CFI_2_C(x1, c_sendcount, c_sendtype, c_senddatatype, c_ierr);
if (MPI_SUCCESS != c_ierr) {
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
Expand Down
1 change: 0 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/isendrecv_replace_ts.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ PROTOTYPE VOID isendrecv_replace(BUFFER_ASYNC_OUT x, COUNT count, DATATYPE datat
MPI_Datatype c_datatype, c_type = PMPI_Type_f2c(*datatype);
MPI_Comm c_comm = PMPI_Comm_f2c (*comm);

MPI_Status c_status;
void *buf = OMPI_CFI_BASE_ADDR(x);
@COUNT_TYPE@ c_count = (@COUNT_TYPE@) *count;

Expand Down
67 changes: 0 additions & 67 deletions ompi/mpi/fortran/use-mpi-f08/mod/mpi-f08-interfaces.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -488,73 +488,6 @@ subroutine MPI_Barrier_init_f08(comm,info,request,ierror)
end subroutine MPI_Barrier_init_f08
end interface MPI_Barrier_init

interface MPI_Bcast_init
subroutine MPI_Bcast_init_f08(buffer,count,datatype,root,comm,info,request,ierror)
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Info, MPI_Request
implicit none
@OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buffer
@OMPI_FORTRAN_IGNORE_TKR_TYPE@ OMPI_ASYNCHRONOUS :: buffer
INTEGER, INTENT(IN) :: count, root
TYPE(MPI_Datatype), INTENT(IN) :: datatype
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Info), INTENT(IN) :: info
TYPE(MPI_Request), INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Bcast_init_f08
end interface MPI_Bcast_init

interface MPI_Exscan_init
subroutine MPI_Exscan_init_f08(sendbuf,recvbuf,count,datatype,op,comm,info,request,ierror)
use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, MPI_Request
implicit none
@OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf, recvbuf
@OMPI_FORTRAN_IGNORE_TKR_TYPE@, INTENT(IN) OMPI_ASYNCHRONOUS :: sendbuf
@OMPI_FORTRAN_IGNORE_TKR_TYPE@ OMPI_ASYNCHRONOUS :: recvbuf
INTEGER, INTENT(IN) :: count
TYPE(MPI_Datatype), INTENT(IN) :: datatype
TYPE(MPI_Op), INTENT(IN) :: op
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Info), INTENT(IN) :: info
TYPE(MPI_Request), INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Exscan_init_f08
end interface MPI_Exscan_init

interface MPI_Gather_init
subroutine MPI_Gather_init_f08(sendbuf,sendcount,sendtype,recvbuf,recvcount,recvtype, &
root,comm,info,request,ierror)
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Info, MPI_Request
implicit none
@OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf, recvbuf
@OMPI_FORTRAN_IGNORE_TKR_TYPE@, INTENT(IN) OMPI_ASYNCHRONOUS :: sendbuf
@OMPI_FORTRAN_IGNORE_TKR_TYPE@ OMPI_ASYNCHRONOUS :: recvbuf
INTEGER, INTENT(IN) :: sendcount, recvcount, root
TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Info), INTENT(IN) :: info
TYPE(MPI_Request), INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Gather_init_f08
end interface MPI_Gather_init

interface MPI_Gatherv_init
subroutine MPI_Gatherv_init_f08(sendbuf,sendcount,sendtype,recvbuf,recvcounts,displs, &
recvtype,root,comm,info,request,ierror)
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Info, MPI_Request
implicit none
@OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf, recvbuf
@OMPI_FORTRAN_IGNORE_TKR_TYPE@, INTENT(IN) OMPI_ASYNCHRONOUS :: sendbuf
@OMPI_FORTRAN_IGNORE_TKR_TYPE@ OMPI_ASYNCHRONOUS :: recvbuf
INTEGER, INTENT(IN) :: sendcount, root
INTEGER, INTENT(IN) OMPI_ASYNCHRONOUS :: recvcounts(*), displs(*)
TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Info), INTENT(IN) :: info
TYPE(MPI_Request), INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Gatherv_init_f08
end interface MPI_Gatherv_init

interface MPI_Op_commutative
subroutine MPI_Op_commutative_f08(op,commute,ierror)
use :: mpi_f08_types, only : MPI_Op
Expand Down

0 comments on commit 8204150

Please sign in to comment.