[mpich] MPICH primary repository branch, master, updated. v3.1.2-102-gd12700f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "MPICH primary repository". The branch, master has been updated via d12700f614e37299752c7750a73c273fdb6bdfcc (commit) via cf09bff52aa420c1aed6185f6fcfa9cf94b912ff (commit) via f58bd7ad372546cbc83fb67c767b218b1f4fe82a (commit) from c3ab4aee1256f18b7e7e791ba758c08431acc71c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.mpich.org/mpich.git/commitdiff/d12700f614e37299752c7750a73c273fdb... commit d12700f614e37299752c7750a73c273fdb6bdfcc Author: Junchao Zhang <[email protected]> Date: Wed Aug 20 18:58:50 2014 -0500 Added more F08 + TS29113 compiler capability checks Checks whether the compiler supports intrinsic storage_size() and non-bind(C) argument x in C_FUNLOC(x). Added them since IBM XLF 15.1 fails on these two tests. diff --git a/confdb/aclocal_fc.m4 b/confdb/aclocal_fc.m4 index 7b5fee1..870a5be 100644 --- a/confdb/aclocal_fc.m4 +++ b/confdb/aclocal_fc.m4 @@ -1180,11 +1180,21 @@ SUBROUTINE test1(buf, count, ierr) INTEGER, OPTIONAL :: ierr END SUBROUTINE -! Test procedure +! Test procedure type and non-bind(c) x in C_FUNCLOC(x) SUBROUTINE test2(func) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_FUNLOC, C_FUNPTR PROCEDURE(user_func) :: func + TYPE(C_FUNPTR) :: errhandler_fn + errhandler_fn = C_FUNLOC(func) END SUBROUTINE +! Test intrinsic storage_size +SUBROUTINE test3(x, size) + CHARACTER, DIMENSION(..) :: x + INTEGER, INTENT(OUT) :: size + size = storage_size(x)/8 +END SUBROUTINE test3 + END MODULE !============================================== http://git.mpich.org/mpich.git/commitdiff/cf09bff52aa420c1aed6185f6fcfa9cf94... commit cf09bff52aa420c1aed6185f6fcfa9cf94b912ff Author: Junchao Zhang <[email protected]> Date: Wed Aug 20 17:36:53 2014 -0500 Added asynchronous attribute to newcomm of MPI_Comm_idup It is in errata for MPI-3.0 diff --git a/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.F90 b/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.F90 index f5f59b6..306db6f 100644 --- a/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.F90 +++ b/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.F90 @@ -605,7 +605,7 @@ function MPIR_Comm_idup_c(comm, newcomm, request) & use :: mpi_c_interface_types, only : c_Comm, c_Request implicit none integer(c_Comm), value, intent(in) :: comm - integer(c_Comm), intent(out) :: newcomm + integer(c_Comm), intent(out), asynchronous :: newcomm integer(c_Request), intent(out) :: request integer(c_int) :: ierror end function MPIR_Comm_idup_c diff --git a/src/binding/fortran/use_mpi_f08/mpi_f08.F90 b/src/binding/fortran/use_mpi_f08/mpi_f08.F90 index d5029ba..4b3cb9e 100644 --- a/src/binding/fortran/use_mpi_f08/mpi_f08.F90 +++ b/src/binding/fortran/use_mpi_f08/mpi_f08.F90 @@ -1446,7 +1446,7 @@ interface MPI_Comm_idup use :: mpi_f08_types, only : MPI_Comm, MPI_Request implicit none type(MPI_Comm), intent(in) :: comm - type(MPI_Comm), intent(out) :: newcomm + type(MPI_Comm), intent(out), asynchronous :: newcomm type(MPI_Request), intent(out) :: request integer, optional, intent(out) :: ierror end subroutine MPI_Comm_idup_f08 http://git.mpich.org/mpich.git/commitdiff/f58bd7ad372546cbc83fb67c767b218b1f... commit f58bd7ad372546cbc83fb67c767b218b1f4fe82a Author: Junchao Zhang <[email protected]> Date: Tue Aug 19 16:04:13 2014 -0500 Add some missing subroutines in the F08 binding diff --git a/src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.F90 b/src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.F90 index b84aca1..9c4738a 100644 --- a/src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.F90 +++ b/src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.F90 @@ -795,11 +795,45 @@ function MPIR_Accumulate_cdesc(origin_addr, origin_count, origin_datatype, targe integer(c_int) :: ierror end function MPIR_Accumulate_cdesc +function MPIR_Compare_and_swap_cdesc(origin_addr, compare_addr, result_addr, datatype, & + target_rank, target_disp, win) & + bind(C, name="MPIR_Compare_and_swap_cdesc") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + use :: mpi_c_interface_types, only : c_Datatype, c_Win + implicit none + type(*), dimension(..), intent(in), asynchronous :: origin_addr + type(*), dimension(..), intent(in), asynchronous :: compare_addr + type(*), dimension(..), asynchronous :: result_addr + integer(c_Datatype), intent(in) :: datatype + integer(c_int), intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer(c_Win), intent(in) :: win + integer(c_int) :: ierror +end function MPIR_Compare_and_swap_cdesc + +function MPIR_Fetch_and_op_cdesc(origin_addr, result_addr, datatype, target_rank, & + target_disp, op, win) & + bind(C, name="MPIR_Fetch_and_op_cdesc") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Datatype, c_Op, c_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), intent(in), asynchronous :: origin_addr + type(*), dimension(..), asynchronous :: result_addr + integer(c_Datatype), intent(in) :: datatype + integer(c_int), intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer(c_Op), intent(in) :: op + integer(c_Win), intent(in) :: win + integer(c_int) :: ierror +end function MPIR_Fetch_and_op_cdesc + function MPIR_Get_cdesc(origin_addr, origin_count, origin_datatype, target_rank, & target_disp, target_count, target_datatype, win) & bind(C, name="MPIR_Get_cdesc") result(ierror) - use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND use :: mpi_c_interface_types, only : c_Datatype, c_Win implicit none type(*), dimension(..) :: origin_addr @@ -811,6 +845,24 @@ function MPIR_Get_cdesc(origin_addr, origin_count, origin_datatype, target_rank, integer(c_int) :: ierror end function MPIR_Get_cdesc +function MPIR_Get_accumulate_cdesc(origin_addr, origin_count, origin_datatype, result_addr, & + result_count, result_datatype, target_rank, target_disp, & + target_count, target_datatype, op, win) & + bind(C, name="MPIR_Get_accumulate_cdesc") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Datatype, c_Op, c_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), intent(in), asynchronous :: origin_addr + type(*), dimension(..), asynchronous :: result_addr + integer(c_int), intent(in) :: origin_count, result_count, target_rank, target_count + integer(c_Datatype), intent(in) :: origin_datatype, target_datatype, result_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer(c_Op), intent(in) :: op + integer(c_Win), intent(in) :: win + integer(c_int) :: ierror +end function MPIR_Get_accumulate_cdesc + function MPIR_Put_cdesc(origin_addr, origin_count, origin_datatype, target_rank, & target_disp, target_count, target_datatype, win) & bind(C, name="MPIR_Put_cdesc") result(ierror) @@ -827,20 +879,90 @@ function MPIR_Put_cdesc(origin_addr, origin_count, origin_datatype, target_rank, integer(c_int) :: ierror end function MPIR_Put_cdesc -function MPIR_Win_complete_f08(win) & - bind(C, name="MPIR_Win_complete_c") result(ierror) +function MPIR_Raccumulate_cdesc(origin_addr, origin_count, origin_datatype, target_rank, & + target_disp, target_count, target_datatype, op, win, request) & + bind(C, name="MPIR_Raccumulate_cdesc") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Datatype, c_Op, c_Win, c_Request + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), intent(in), asynchronous :: origin_addr + integer, intent(in) :: origin_count, target_rank, target_count + integer(c_Datatype), intent(in) :: origin_datatype, target_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer(c_Op), intent(in) :: op + integer(c_Win), intent(in) :: win + integer(c_Request), intent(out) :: request + integer(c_int) :: ierror +end function MPIR_Raccumulate_cdesc + +function MPIR_Rget_cdesc(origin_addr, origin_count, origin_datatype, target_rank, & + target_disp, target_count, target_datatype, win, request) & + bind(C, name="MPIR_Rget_cdesc") result(ierror) use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Datatype, c_Win, c_Request use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), asynchronous :: origin_addr + integer, intent(in) :: origin_count, target_rank, target_count + integer(c_Datatype), intent(in) :: origin_datatype, target_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer(c_Win), intent(in) :: win + integer(c_Request), intent(out) :: request + integer(c_int) :: ierror +end function MPIR_Rget_cdesc + +function MPIR_Rget_accumulate_cdesc(origin_addr, origin_count, origin_datatype, & + result_addr, result_count, result_datatype, target_rank, & + target_disp, target_count, target_datatype, op, win, request) & + bind(C, name="MPIR_Rget_accumulate_cdesc") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Datatype, c_Op, c_Win, c_Request + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), intent(in), asynchronous :: origin_addr + type(*), dimension(..), asynchronous :: result_addr + integer, intent(in) :: origin_count, result_count, target_rank, target_count + integer(c_Datatype), intent(in) :: origin_datatype, target_datatype, result_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer(c_Op), intent(in) :: op + integer(c_Win), intent(in) :: win + integer(c_Request), intent(out) :: request + integer(c_int) :: ierror +end function MPIR_Rget_accumulate_cdesc + +function MPIR_Rput_cdesc(origin_addr, origin_count, origin_datatype, target_rank, & + target_disp, target_count, target_datatype, win, request) & + bind(C, name="MPIR_Rput_cdesc") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Datatype, c_Win, c_Request + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), intent(in), asynchronous :: origin_addr + integer, intent(in) :: origin_count, target_rank, target_count + integer(c_Datatype), intent(in) :: origin_datatype, target_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer(c_Win), intent(in) :: win + integer(c_Request), intent(out) :: request + integer(c_int) :: ierror +end function MPIR_Rput_cdesc + +function MPIR_Win_attach_cdesc(win, base, size) & + bind(C, name="MPIR_Win_attach_cdesc") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int use :: mpi_c_interface_types, only : c_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND implicit none - integer(c_Win), value, intent(in) :: win + integer(c_Win), intent(in) :: win + type(*), dimension(..), asynchronous :: base + integer(kind=MPI_ADDRESS_KIND), intent(in) :: size integer(c_int) :: ierror -end function MPIR_Win_complete_f08 +end function MPIR_Win_attach_cdesc function MPIR_Win_create_cdesc(base, size, disp_unit, info, comm, win) & bind(C, name="MPIR_Win_create_cdesc") result(ierror) - use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND use :: mpi_c_interface_types, only : c_Info, c_Comm, c_Win implicit none type(*), dimension(..) :: base @@ -852,7 +974,15 @@ function MPIR_Win_create_cdesc(base, size, disp_unit, info, comm, win) & integer(c_int) :: ierror end function MPIR_Win_create_cdesc - +function MPIR_Win_detach_cdesc(win, base) & + bind(C, name="MPIR_Win_detach_cdesc") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Win + implicit none + integer(c_Win), intent(in) :: win + type(*), dimension(..), asynchronous :: base + integer(c_int) :: ierror +end function MPIR_Win_detach_cdesc function MPIR_File_iread_cdesc(fh, buf, count, datatype, request) & bind(C, name="MPIR_File_iread_cdesc") result(ierror) diff --git a/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.F90 b/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.F90 index 11da8bf..f5f59b6 100644 --- a/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.F90 +++ b/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.F90 @@ -750,6 +750,26 @@ function MPIR_Comm_test_inter_c(comm, flag) & integer(c_int) :: ierror end function MPIR_Comm_test_inter_c +function MPIR_Comm_get_info_c(comm, info_used) & + bind(C, name="PMPI_Comm_get_info") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Comm, c_Info + implicit none + integer(c_Comm), intent(in) :: comm + integer(c_Info), intent(out) :: info_used + integer(c_int) :: ierror +end function MPIR_Comm_get_info_c + +function MPIR_Comm_set_info_c(comm, info) & + bind(C, name="PMPI_Comm_set_info") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Comm, c_Info + implicit none + integer(c_Comm), intent(in) :: comm + integer(c_Info), intent(in) :: info + integer(c_int) :: ierror +end function MPIR_Comm_set_info_c + function MPIR_Group_compare_c(group1,group2,result) & bind(C, name="PMPI_Group_compare") result(ierror) use, intrinsic :: iso_c_binding, only : c_int @@ -1761,6 +1781,36 @@ function MPIR_Unpublish_name_c(service_name, info, port_name) & integer(c_int) :: ierror end function MPIR_Unpublish_name_c +function MPIR_Win_allocate_c(size, disp_unit, info, comm, baseptr, win) & + bind(C, name="PMPI_Win_allocate") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int, c_ptr + use :: mpi_c_interface_types, only : c_Info, c_Comm, c_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + integer(kind=MPI_ADDRESS_KIND), intent(in) :: size + integer(c_int), intent(in) :: disp_unit + integer(c_Info), intent(in) :: info + integer(c_Comm), intent(in) :: comm + type(c_ptr), intent(out) :: baseptr + integer(c_Win), intent(out) :: win + integer(c_int) :: ierror +end function MPIR_Win_allocate_c + +function MPIR_Win_allocate_shared_c(size, disp_unit, info, comm, baseptr, win) & + bind(C, name="PMPI_Win_allocate_shared") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int, c_ptr + use :: mpi_c_interface_types, only : c_Info, c_Comm, c_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + integer(kind=MPI_ADDRESS_KIND), intent(in) :: size + integer(c_int), intent(in) :: disp_unit + integer(c_Info), intent(in) :: info + integer(c_Comm), intent(in) :: comm + type(c_ptr), intent(out) :: baseptr + integer(c_Win), intent(out) :: win + integer(c_int) :: ierror +end function MPIR_Win_allocate_shared_c + function MPIR_Win_complete_c(win) & bind(C, name="PMPI_Win_complete") result(ierror) use, intrinsic :: iso_c_binding, only : c_int @@ -1770,6 +1820,17 @@ function MPIR_Win_complete_c(win) & integer(c_int) :: ierror end function MPIR_Win_complete_c +function MPIR_Win_create_dynamic_c(info, comm, win) & + bind(C, name="PMPI_Win_create_dynamic") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Info, c_Comm, c_Win + implicit none + integer(c_Info), intent(in) :: info + integer(c_Comm), intent(in) :: comm + integer(c_Win), intent(out) :: win + integer(c_int) :: ierror +end function MPIR_Win_create_dynamic_c + function MPIR_Win_fence_c(assert, win) & bind(C, name="PMPI_Win_fence") result(ierror) use, intrinsic :: iso_c_binding, only : c_int @@ -1780,6 +1841,44 @@ function MPIR_Win_fence_c(assert, win) & integer(c_int) :: ierror end function MPIR_Win_fence_c +function MPIR_Win_flush_c(rank, win) & + bind(C, name="PMPI_Win_flush") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Win + implicit none + integer(c_int), intent(in) :: rank + integer(c_Win), intent(in) :: win + integer(c_int) :: ierror +end function MPIR_Win_flush_c + +function MPIR_Win_flush_all_c(win) & + bind(C, name="PMPI_Win_flush_all") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Win + implicit none + integer(c_Win), intent(in) :: win + integer(c_int) :: ierror +end function MPIR_Win_flush_all_c + +function MPIR_Win_flush_local_c(rank, win) & + bind(C, name="PMPI_Win_flush_local") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Win + implicit none + integer(c_int), intent(in) :: rank + integer(c_Win), intent(in) :: win + integer(c_int) :: ierror +end function MPIR_Win_flush_local_c + +function MPIR_Win_flush_local_all_c(win) & + bind(C, name="PMPI_Win_flush_local_all") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Win + implicit none + integer(c_Win), intent(in) :: win + integer(c_int) :: ierror +end function MPIR_Win_flush_local_all_c + function MPIR_Win_free_c(win) & bind(C, name="PMPI_Win_free") result(ierror) use, intrinsic :: iso_c_binding, only : c_int @@ -1799,6 +1898,16 @@ function MPIR_Win_get_group_c(win, group) & integer(c_int) :: ierror end function MPIR_Win_get_group_c +function MPIR_Win_get_info_c(win, info_used) & + bind(C, name="PMPI_Win_get_info") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Win, c_Info + implicit none + integer(c_Win), intent(in) :: win + integer(c_Info), intent(out) :: info_used + integer(c_int) :: ierror +end function MPIR_Win_get_info_c + function MPIR_Win_lock_c(lock_type, rank, assert, win) & bind(C, name="PMPI_Win_lock") result(ierror) use, intrinsic :: iso_c_binding, only : c_int @@ -1809,6 +1918,16 @@ function MPIR_Win_lock_c(lock_type, rank, assert, win) & integer(c_int) :: ierror end function MPIR_Win_lock_c +function MPIR_Win_lock_all_c(assert, win) & + bind(C, name="PMPI_Win_lock_all") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Win + implicit none + integer(c_int), intent(in) :: assert + integer(c_Win), intent(in) :: win + integer(c_int) :: ierror +end function MPIR_Win_lock_all_c + function MPIR_Win_post_c(group, assert, win) & bind(C, name="PMPI_Win_post") result(ierror) use, intrinsic :: iso_c_binding, only : c_int @@ -1820,6 +1939,30 @@ function MPIR_Win_post_c(group, assert, win) & integer(c_int) :: ierror end function MPIR_Win_post_c +function MPIR_Win_set_info_c(win, info) & + bind(C, name="PMPI_Win_set_info") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Win, c_Info + implicit none + integer(c_Win), intent(in) :: win + integer(c_Info), intent(in) :: info + integer(c_int) :: ierror +end function MPIR_Win_set_info_c + +function MPIR_Win_shared_query_c(win, rank, size, disp_unit, baseptr) & + bind(C, name="PMPI_Win_shared_query") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int, c_ptr + use :: mpi_c_interface_types, only : c_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + integer(c_Win), intent(in) :: win + integer(c_int), intent(in) :: rank + integer(kind=MPI_ADDRESS_KIND), intent(out) :: size + integer(c_int), intent(out) :: disp_unit + type(c_ptr), intent(out) :: baseptr + integer(c_int) :: ierror +end function MPIR_Win_shared_query_c + function MPIR_Win_start_c(group, assert, win) & bind(C, name="PMPI_Win_start") result(ierror) use, intrinsic :: iso_c_binding, only : c_int @@ -1831,6 +1974,15 @@ function MPIR_Win_start_c(group, assert, win) & integer(c_int) :: ierror end function MPIR_Win_start_c +function MPIR_Win_sync_c(win) & + bind(C, name="PMPI_Win_sync") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Win + implicit none + integer(c_Win), intent(in) :: win + integer(c_int) :: ierror +end function MPIR_Win_sync_c + function MPIR_Win_test_c(win, flag) & bind(C, name="PMPI_Win_test") result(ierror) use, intrinsic :: iso_c_binding, only : c_int @@ -1851,6 +2003,15 @@ function MPIR_Win_unlock_c(rank, win) & integer(c_int) :: ierror end function MPIR_Win_unlock_c +function MPIR_Win_unlock_all_c(win) & + bind(C, name="PMPI_Win_unlock_all") result(ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface_types, only : c_Win + implicit none + integer(c_Win), intent(in) :: win + integer(c_int) :: ierror +end function MPIR_Win_unlock_all_c + function MPIR_Win_wait_c(win) & bind(C, name="PMPI_Win_wait") result(ierror) use, intrinsic :: iso_c_binding, only : c_int diff --git a/src/binding/fortran/use_mpi_f08/mpi_f08.F90 b/src/binding/fortran/use_mpi_f08/mpi_f08.F90 index 2fef1a4..d5029ba 100644 --- a/src/binding/fortran/use_mpi_f08/mpi_f08.F90 +++ b/src/binding/fortran/use_mpi_f08/mpi_f08.F90 @@ -1482,6 +1482,16 @@ interface MPI_Comm_get_attr end subroutine MPI_Comm_get_attr_f08 end interface MPI_Comm_get_attr +interface MPI_Comm_get_info + subroutine MPI_Comm_get_info_f08(comm, info_used, ierror) + use :: mpi_f08_types, only : MPI_Comm, MPI_Info + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(out) :: info_used + integer, optional, intent(out) :: ierror + end subroutine MPI_Comm_get_info_f08 +end interface MPI_Comm_get_info + interface MPI_Comm_get_name subroutine MPI_Comm_get_name_f08(comm, comm_name, resultlen, ierror) use :: mpi_f08_types, only : MPI_Comm @@ -1546,6 +1556,16 @@ interface MPI_Comm_set_attr end subroutine MPI_Comm_set_attr_f08 end interface MPI_Comm_set_attr +interface MPI_Comm_set_info + subroutine MPI_Comm_set_info_f08(comm, info_used, ierror) + use :: mpi_f08_types, only : MPI_Comm, MPI_Info + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info_used + integer, optional, intent(out) :: ierror + end subroutine MPI_Comm_set_info_f08 +end interface MPI_Comm_set_info + interface MPI_Comm_set_name subroutine MPI_Comm_set_name_f08(comm, comm_name, ierror) use :: mpi_f08_types, only : MPI_Comm @@ -2634,6 +2654,40 @@ interface MPI_Accumulate end subroutine MPI_Accumulate_f08ts end interface MPI_Accumulate +interface MPI_Compare_and_swap + subroutine MPI_Compare_and_swap_f08ts(origin_addr, compare_addr, result_addr, datatype, & + target_rank, target_disp, win, ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), intent(in), asynchronous :: origin_addr + type(*), dimension(..), intent(in), asynchronous :: compare_addr + type(*), dimension(..), asynchronous :: result_addr + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + end subroutine MPI_Compare_and_swap_f08ts +end interface MPI_Compare_and_swap + +interface MPI_Fetch_and_op + subroutine MPI_Fetch_and_op_f08ts(origin_addr, result_addr, datatype, target_rank, & + target_disp, op, win, ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), intent(in), asynchronous :: origin_addr + type(*), dimension(..), asynchronous :: result_addr + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: target_rank + integer(kind=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_f08ts +end interface MPI_Fetch_and_op + interface MPI_Get subroutine MPI_Get_f08ts(origin_addr, origin_count, origin_datatype, target_rank, & target_disp, target_count, target_datatype, win, ierror) @@ -2650,6 +2704,24 @@ interface MPI_Get end subroutine MPI_Get_f08ts end interface MPI_Get +interface MPI_Get_accumulate + subroutine MPI_Get_accumulate_f08ts(origin_addr, origin_count, origin_datatype, result_addr, & + result_count, result_datatype, target_rank, target_disp, & + target_count, target_datatype, op, win, ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), intent(in), asynchronous :: origin_addr + type(*), dimension(..), asynchronous :: result_addr + integer, intent(in) :: origin_count, result_count, target_rank, target_count + type(MPI_Datatype), intent(in) :: origin_datatype, target_datatype, result_datatype + integer(kind=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_Get_accumulate_f08ts +end interface MPI_Get_accumulate + interface MPI_Put subroutine MPI_Put_f08ts(origin_addr, origin_count, origin_datatype, target_rank, & target_disp, target_count, target_datatype, win, ierror) @@ -2666,6 +2738,119 @@ interface MPI_Put end subroutine MPI_Put_f08ts end interface MPI_Put +interface MPI_Raccumulate + subroutine MPI_Raccumulate_f08ts(origin_addr, origin_count, origin_datatype, target_rank, & + target_disp, target_count, target_datatype, op, win, request, ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Win, MPI_Request + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), intent(in), asynchronous :: origin_addr + integer, intent(in) :: origin_count, target_rank, target_count + type(MPI_Datatype), intent(in) :: origin_datatype, target_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, optional, intent(out) :: ierror + end subroutine MPI_Raccumulate_f08ts +end interface MPI_Raccumulate + +interface MPI_Rget + subroutine MPI_Rget_f08ts(origin_addr, origin_count, origin_datatype, target_rank, & + target_disp, target_count, target_datatype, win, request, ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Win, MPI_Request + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), asynchronous :: origin_addr + integer, intent(in) :: origin_count, target_rank, target_count + type(MPI_Datatype), intent(in) :: origin_datatype, target_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, optional, intent(out) :: ierror + end subroutine MPI_Rget_f08ts +end interface MPI_Rget + +interface MPI_Rget_accumulate + subroutine MPI_Rget_accumulate_f08ts(origin_addr, origin_count, origin_datatype, & + result_addr, result_count, result_datatype, target_rank, & + target_disp, target_count, target_datatype, op, win, request, ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Win, MPI_Request + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), intent(in), asynchronous :: origin_addr + type(*), dimension(..), asynchronous :: result_addr + integer, intent(in) :: origin_count, result_count, target_rank, target_count + type(MPI_Datatype), intent(in) :: origin_datatype, target_datatype, result_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, optional, intent(out) :: ierror + end subroutine MPI_Rget_accumulate_f08ts +end interface MPI_Rget_accumulate + +interface MPI_Rput + subroutine MPI_Rput_f08ts(origin_addr, origin_count, origin_datatype, target_rank, & + target_disp, target_count, target_datatype, win, request, ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Win, MPI_Request + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(*), dimension(..), intent(in), asynchronous :: origin_addr + integer, intent(in) :: origin_count, target_rank, target_count + type(MPI_Datatype), intent(in) :: origin_datatype, target_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, optional, intent(out) :: ierror + end subroutine MPI_Rput_f08ts +end interface MPI_Rput + +interface MPI_Win_allocate + subroutine MPI_Win_allocate_f08(size, disp_unit, info, comm, baseptr, win, ierror) + use, intrinsic :: iso_c_binding, only : c_ptr + use :: mpi_f08_types, only : MPI_Info, MPI_Comm, MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + integer(kind=MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + type(c_ptr), intent(out) :: baseptr + type(MPI_Win), intent(out) :: win + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_allocate_f08 +end interface MPI_Win_allocate + +interface MPI_Win_allocate_shared + subroutine MPI_Win_allocate_shared_f08(size, disp_unit, info, comm, baseptr, win, ierror) + use, intrinsic :: iso_c_binding, only : c_ptr + use :: mpi_f08_types, only : MPI_Info, MPI_Comm, MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + integer(kind=MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + type(c_ptr), intent(out) :: baseptr + type(MPI_Win), intent(out) :: win + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_allocate_shared_f08 +end interface MPI_Win_allocate_shared + +interface MPI_Win_attach + subroutine MPI_Win_attach_f08ts(win, base, size, ierror) + use :: mpi_f08_types, only : MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(MPI_Win), intent(in) :: win + type(*), dimension(..), asynchronous :: base + integer(kind=MPI_ADDRESS_KIND), intent(in) :: size + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_attach_f08ts +end interface MPI_Win_attach + + interface MPI_Win_complete subroutine MPI_Win_complete_f08(win, ierror) use :: mpi_f08_types, only : MPI_Win @@ -2690,6 +2875,27 @@ interface MPI_Win_create end subroutine MPI_Win_create_f08ts end interface MPI_Win_create +interface MPI_Win_create_dynamic + subroutine MPI_Win_create_dynamic_f08(info, comm, win, ierror) + use :: mpi_f08_types, only : MPI_Info, MPI_Comm, MPI_Win + implicit none + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + type(MPI_Win), intent(out) :: win + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_create_dynamic_f08 +end interface MPI_Win_create_dynamic + +interface MPI_Win_detach + subroutine MPI_Win_detach_f08ts(win, base, ierror) + use :: mpi_f08_types, only : MPI_Win + implicit none + type(MPI_Win), intent(in) :: win + type(*), dimension(..), asynchronous :: base + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_detach_f08ts +end interface MPI_Win_detach + interface MPI_Win_fence subroutine MPI_Win_fence_f08(assert, win, ierror) use :: mpi_f08_types, only : MPI_Win @@ -2700,6 +2906,44 @@ interface MPI_Win_fence end subroutine MPI_Win_fence_f08 end interface MPI_Win_fence +interface MPI_Win_flush + subroutine MPI_Win_flush_f08(rank, win, ierror) + use :: mpi_f08_types, only : MPI_Win + implicit none + integer, intent(in) :: rank + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_flush_f08 +end interface MPI_Win_flush + +interface MPI_Win_flush_all + subroutine MPI_Win_flush_all_f08(win, ierror) + use :: mpi_f08_types, only : MPI_Win + implicit none + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_flush_all_f08 +end interface MPI_Win_flush_all + +interface MPI_Win_flush_local + subroutine MPI_Win_flush_local_f08(rank, win, ierror) + use :: mpi_f08_types, only : MPI_Win + implicit none + integer, intent(in) :: rank + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_flush_local_f08 +end interface MPI_Win_flush_local + +interface MPI_Win_flush_local_all + subroutine MPI_Win_flush_local_all_f08(win, ierror) + use :: mpi_f08_types, only : MPI_Win + implicit none + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_flush_local_all_f08 +end interface MPI_Win_flush_local_all + interface MPI_Win_free subroutine MPI_Win_free_f08(win, ierror) use :: mpi_f08_types, only : MPI_Win @@ -2719,6 +2963,16 @@ interface MPI_Win_get_group end subroutine MPI_Win_get_group_f08 end interface MPI_Win_get_group +interface MPI_Win_get_info + subroutine MPI_Win_get_info_f08(win, info_used, ierror) + use :: mpi_f08_types, only : MPI_Win, MPI_Info + implicit none + type(MPI_Win), intent(in) :: win + type(MPI_Info), intent(out) :: info_used + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_get_info_f08 +end interface MPI_Win_get_info + interface MPI_Win_lock subroutine MPI_Win_lock_f08(lock_type, rank, assert, win, ierror) use :: mpi_f08_types, only : MPI_Win @@ -2729,6 +2983,16 @@ interface MPI_Win_lock end subroutine MPI_Win_lock_f08 end interface MPI_Win_lock +interface MPI_Win_lock_all + subroutine MPI_Win_lock_all_f08(assert, win, ierror) + use :: mpi_f08_types, only : MPI_Win + implicit none + integer, intent(in) :: assert + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_lock_all_f08 +end interface MPI_Win_lock_all + interface MPI_Win_post subroutine MPI_Win_post_f08(group, assert, win, ierror) use :: mpi_f08_types, only : MPI_Group, MPI_Win @@ -2740,6 +3004,31 @@ interface MPI_Win_post end subroutine MPI_Win_post_f08 end interface MPI_Win_post +interface MPI_Win_set_info + subroutine MPI_Win_set_info_f08(win, info, ierror) + use :: mpi_f08_types, only : MPI_Win, MPI_info + implicit none + type(MPI_Win), intent(in) :: win + type(MPI_Info), intent(in) :: info + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_set_info_f08 +end interface MPI_Win_set_info + +interface MPI_Win_shared_query + subroutine MPI_Win_shared_query_f08(win, rank, size, disp_unit, baseptr, ierror) + use, intrinsic :: iso_c_binding, only : c_ptr + use :: mpi_f08_types, only : MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + implicit none + type(MPI_Win), intent(in) :: win + integer, intent(in) :: rank + integer(kind=MPI_ADDRESS_KIND), intent(out) :: size + integer, intent(out) :: disp_unit + type(c_ptr), intent(out) :: baseptr + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_shared_query_f08 +end interface MPI_Win_shared_query + interface MPI_Win_start subroutine MPI_Win_start_f08(group, assert, win, ierror) use :: mpi_f08_types, only : MPI_Group, MPI_Win @@ -2751,6 +3040,15 @@ interface MPI_Win_start end subroutine MPI_Win_start_f08 end interface MPI_Win_start +interface MPI_Win_sync + subroutine MPI_Win_sync_f08(win, ierror) + use :: mpi_f08_types, only : MPI_Win + implicit none + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_sync_f08 +end interface MPI_Win_sync + interface MPI_Win_test subroutine MPI_Win_test_f08(win, flag, ierror) use :: mpi_f08_types, only : MPI_Win @@ -2771,6 +3069,15 @@ interface MPI_Win_unlock end subroutine MPI_Win_unlock_f08 end interface MPI_Win_unlock +interface MPI_Win_unlock_all + subroutine MPI_Win_unlock_all_f08(win, ierror) + use :: mpi_f08_types, only : MPI_Win + implicit none + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + end subroutine MPI_Win_unlock_all_f08 +end interface MPI_Win_unlock_all + interface MPI_Win_wait subroutine MPI_Win_wait_f08(win, ierror) use :: mpi_f08_types, only : MPI_Win diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_info_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_info_f08ts.F90 new file mode 100644 index 0000000..88614c2 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_info_f08ts.F90 @@ -0,0 +1,32 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Comm_get_info_f08(comm, info_used, ierror) + use :: mpi_f08, only : MPI_Comm, MPI_Info + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface, only : c_Comm, c_Info + use :: mpi_c_interface, only : MPIR_Comm_get_info_c + + implicit none + + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(out) :: info_used + integer, optional, intent(out) :: ierror + + integer(c_Comm) :: comm_c + integer(c_Info) :: info_used_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Comm_get_info_c(comm%MPI_VAL, info_used%MPI_VAL) + else + comm_c = comm%MPI_VAL + ierror_c = MPIR_Comm_get_info_c(comm_c, info_used_c) + info_used%MPI_VAL = info_used_c + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Comm_get_info_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_info_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_info_f08ts.F90 new file mode 100644 index 0000000..9e31ff0 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_info_f08ts.F90 @@ -0,0 +1,32 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Comm_set_info_f08(comm, info_used, ierror) + use :: mpi_f08, only : MPI_Comm, MPI_Info + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_c_interface, only : c_Comm, c_Info + use :: mpi_c_interface, only : MPIR_Comm_set_info_c + + implicit none + + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info_used + integer, optional, intent(out) :: ierror + + integer(c_Comm) :: comm_c + integer(c_Info) :: info_used_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Comm_set_info_c(comm%MPI_VAL, info_used%MPI_VAL) + else + comm_c = comm%MPI_VAL + info_used_c = info_used%MPI_VAL + ierror_c = MPIR_Comm_set_info_c(comm_c, info_used_c) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Comm_set_info_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/compare_and_swap_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/compare_and_swap_f08ts.F90 new file mode 100644 index 0000000..3cc06fc --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/compare_and_swap_f08ts.F90 @@ -0,0 +1,43 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Compare_and_swap_f08ts(origin_addr, compare_addr, result_addr, datatype, & + target_rank, target_disp, win, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Datatype, MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + use :: mpi_c_interface, only : c_Datatype, c_Win + use :: mpi_c_interface, only : MPIR_Compare_and_swap_cdesc + + implicit none + + type(*), dimension(..), intent(in), asynchronous :: origin_addr + type(*), dimension(..), intent(in), asynchronous :: compare_addr + type(*), dimension(..), asynchronous :: result_addr + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + + integer(c_Datatype) :: datatype_c + integer(c_int) :: target_rank_c + integer(c_Win) :: win_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Compare_and_swap_cdesc(origin_addr, compare_addr, result_addr, datatype%MPI_VAL, & + target_rank, target_disp, win%MPI_VAL) + else + datatype_c = datatype%MPI_VAL + target_rank_c = target_rank + win_c = win%MPI_VAL + ierror_c = MPIR_Compare_and_swap_cdesc(origin_addr, compare_addr, result_addr, datatype_c, & + target_rank_c, target_disp, win_c) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Compare_and_swap_f08ts diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/fetch_and_op_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/fetch_and_op_f08ts.F90 new file mode 100644 index 0000000..c72abd7 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/fetch_and_op_f08ts.F90 @@ -0,0 +1,45 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Fetch_and_op_f08ts(origin_addr, result_addr, datatype, target_rank, & + target_disp, op, win, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Datatype, MPI_Op, MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + use :: mpi_c_interface, only : c_Datatype, c_Op, c_Win + use :: mpi_c_interface, only : MPIR_Fetch_and_op_cdesc + + implicit none + + type(*), dimension(..), intent(in), asynchronous :: origin_addr + type(*), dimension(..), asynchronous :: result_addr + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: target_rank + integer(kind=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_Datatype) :: datatype_c + integer(c_int) :: target_rank_c + integer(c_Op) :: op_c + integer(c_Win) :: win_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Fetch_and_op_cdesc(origin_addr, result_addr, datatype%MPI_VAL, target_rank, target_disp, & + op%MPI_VAL, win%MPI_VAL) + else + datatype_c = datatype%MPI_VAL + target_rank_c = target_rank + op_c = op%MPI_VAL + win_c = win%MPI_VAL + ierror_c = MPIR_Fetch_and_op_cdesc(origin_addr, result_addr, datatype_c, target_rank_c, target_disp, & + op_c, win_c) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Fetch_and_op_f08ts diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/get_accumulate_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/get_accumulate_f08ts.F90 new file mode 100644 index 0000000..65ce354 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/get_accumulate_f08ts.F90 @@ -0,0 +1,63 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Get_accumulate_f08ts(origin_addr, origin_count, origin_datatype, result_addr, & + result_count, result_datatype, target_rank, target_disp, & + target_count, target_datatype, op, win, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Datatype, MPI_Op, MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + use :: mpi_c_interface, only : c_Datatype, c_Op, c_Win + use :: mpi_c_interface, only : MPIR_Get_accumulate_cdesc + + implicit none + + type(*), dimension(..), intent(in), asynchronous :: origin_addr + type(*), dimension(..), asynchronous :: result_addr + integer, intent(in) :: origin_count + integer, intent(in) :: result_count + integer, intent(in) :: target_rank + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: origin_datatype + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Datatype), intent(in) :: result_datatype + integer(kind=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_int) :: origin_count_c + integer(c_int) :: result_count_c + integer(c_int) :: target_rank_c + integer(c_int) :: target_count_c + integer(c_Datatype) :: origin_datatype_c + integer(c_Datatype) :: target_datatype_c + integer(c_Datatype) :: result_datatype_c + integer(c_Op) :: op_c + integer(c_Win) :: win_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Get_accumulate_cdesc(origin_addr, origin_count, origin_datatype%MPI_VAL, result_addr, & + result_count, result_datatype%MPI_VAL, target_rank, target_disp, target_count, target_datatype%MPI_VAL, & + op%MPI_VAL, win%MPI_VAL) + else + origin_count_c = origin_count + origin_datatype_c = origin_datatype%MPI_VAL + result_count_c = result_count + result_datatype_c = result_datatype%MPI_VAL + target_rank_c = target_rank + target_count_c = target_count + target_datatype_c = target_datatype%MPI_VAL + op_c = op%MPI_VAL + win_c = win%MPI_VAL + ierror_c = MPIR_Get_accumulate_cdesc(origin_addr, origin_count_c, origin_datatype_c, result_addr, & + result_count_c, result_datatype_c, target_rank_c, target_disp, target_count_c, target_datatype_c, & + op_c, win_c) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Get_accumulate_f08ts diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/raccumulate_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/raccumulate_f08ts.F90 new file mode 100644 index 0000000..042f042 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/raccumulate_f08ts.F90 @@ -0,0 +1,56 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Raccumulate_f08ts(origin_addr, origin_count, origin_datatype, target_rank, & + target_disp, target_count, target_datatype, op, win, request, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Datatype, MPI_Op, MPI_Win, MPI_Request + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + use :: mpi_c_interface, only : c_Datatype, c_Op, c_Win, c_Request + use :: mpi_c_interface, only : MPIR_Raccumulate_cdesc + + implicit none + + type(*), dimension(..), intent(in), asynchronous :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: target_rank + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: origin_datatype + type(MPI_Datatype), intent(in) :: target_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, optional, intent(out) :: ierror + + integer :: origin_count_c + integer :: target_rank_c + integer :: target_count_c + integer(c_Datatype) :: origin_datatype_c + integer(c_Datatype) :: target_datatype_c + integer(c_Op) :: op_c + integer(c_Win) :: win_c + integer(c_Request) :: request_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Raccumulate_cdesc(origin_addr, origin_count, origin_datatype%MPI_VAL, target_rank, & + target_disp, target_count, target_datatype%MPI_VAL, op%MPI_VAL, win%MPI_VAL, request%MPI_VAL) + else + origin_count_c = origin_count + origin_datatype_c = origin_datatype%MPI_VAL + target_rank_c = target_rank + target_count_c = target_count + target_datatype_c = target_datatype%MPI_VAL + op_c = op%MPI_VAL + win_c = win%MPI_VAL + ierror_c = MPIR_Raccumulate_cdesc(origin_addr, origin_count_c, origin_datatype_c, target_rank_c, & + target_disp, target_count_c, target_datatype_c, op_c, win_c, request_c) + request%MPI_VAL = request_c + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Raccumulate_f08ts diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/rget_accumulate_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/rget_accumulate_f08ts.F90 new file mode 100644 index 0000000..f041697 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/rget_accumulate_f08ts.F90 @@ -0,0 +1,66 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Rget_accumulate_f08ts(origin_addr, origin_count, origin_datatype, & + result_addr, result_count, result_datatype, target_rank, & + target_disp, target_count, target_datatype, op, win, request, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Datatype, MPI_Op, MPI_Win, MPI_Request + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + use :: mpi_c_interface, only : c_Datatype, c_Op, c_Win, c_Request + use :: mpi_c_interface, only : MPIR_Rget_accumulate_cdesc + + implicit none + + type(*), dimension(..), intent(in), asynchronous :: origin_addr + type(*), dimension(..), asynchronous :: result_addr + integer, intent(in) :: origin_count + integer, intent(in) :: result_count + integer, intent(in) :: target_rank + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: origin_datatype + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Datatype), intent(in) :: result_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, optional, intent(out) :: ierror + + integer :: origin_count_c + integer :: result_count_c + integer :: target_rank_c + integer :: target_count_c + integer(c_Datatype) :: origin_datatype_c + integer(c_Datatype) :: target_datatype_c + integer(c_Datatype) :: result_datatype_c + integer(c_Op) :: op_c + integer(c_Win) :: win_c + integer(c_Request) :: request_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Rget_accumulate_cdesc(origin_addr, origin_count, origin_datatype%MPI_VAL, result_addr, & + result_count, result_datatype%MPI_VAL, target_rank, target_disp, target_count, target_datatype%MPI_VAL, & + op%MPI_VAL, win%MPI_VAL, request%MPI_VAL) + else + origin_count_c = origin_count + origin_datatype_c = origin_datatype%MPI_VAL + result_count_c = result_count + result_datatype_c = result_datatype%MPI_VAL + target_rank_c = target_rank + target_count_c = target_count + target_datatype_c = target_datatype%MPI_VAL + op_c = op%MPI_VAL + win_c = win%MPI_VAL + ierror_c = MPIR_Rget_accumulate_cdesc(origin_addr, origin_count_c, origin_datatype_c, result_addr, & + result_count_c, result_datatype_c, target_rank_c, target_disp, target_count_c, target_datatype_c, & + op_c, win_c, request_c) + request%MPI_VAL = request_c + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Rget_accumulate_f08ts diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/rget_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/rget_f08ts.F90 new file mode 100644 index 0000000..5709e24 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/rget_f08ts.F90 @@ -0,0 +1,53 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Rget_f08ts(origin_addr, origin_count, origin_datatype, target_rank, & + target_disp, target_count, target_datatype, win, request, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Datatype, MPI_Win, MPI_Request + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + use :: mpi_c_interface, only : c_Datatype, c_Win, c_Request + use :: mpi_c_interface, only : MPIR_Rget_cdesc + + implicit none + + type(*), dimension(..), asynchronous :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: target_rank + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: origin_datatype + type(MPI_Datatype), intent(in) :: target_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, optional, intent(out) :: ierror + + integer :: origin_count_c + integer :: target_rank_c + integer :: target_count_c + integer(c_Datatype) :: origin_datatype_c + integer(c_Datatype) :: target_datatype_c + integer(c_Win) :: win_c + integer(c_Request) :: request_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Rget_cdesc(origin_addr, origin_count, origin_datatype%MPI_VAL, target_rank, target_disp, & + target_count, target_datatype%MPI_VAL, win%MPI_VAL, request%MPI_VAL) + else + origin_count_c = origin_count + origin_datatype_c = origin_datatype%MPI_VAL + target_rank_c = target_rank + target_count_c = target_count + target_datatype_c = target_datatype%MPI_VAL + win_c = win%MPI_VAL + ierror_c = MPIR_Rget_cdesc(origin_addr, origin_count_c, origin_datatype_c, target_rank_c, target_disp, & + target_count_c, target_datatype_c, win_c, request_c) + request%MPI_VAL = request_c + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Rget_f08ts diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/rput_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/rput_f08ts.F90 new file mode 100644 index 0000000..547a584 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/rput_f08ts.F90 @@ -0,0 +1,53 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Rput_f08ts(origin_addr, origin_count, origin_datatype, target_rank, & + target_disp, target_count, target_datatype, win, request, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Datatype, MPI_Win, MPI_Request + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + use :: mpi_c_interface, only : c_Datatype, c_Win, c_Request + use :: mpi_c_interface, only : MPIR_Rput_cdesc + + implicit none + + type(*), dimension(..), intent(in), asynchronous :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: target_rank + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: origin_datatype + type(MPI_Datatype), intent(in) :: target_datatype + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, optional, intent(out) :: ierror + + integer :: origin_count_c + integer :: target_rank_c + integer :: target_count_c + integer(c_Datatype) :: origin_datatype_c + integer(c_Datatype) :: target_datatype_c + integer(c_Win) :: win_c + integer(c_Request) :: request_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Rput_cdesc(origin_addr, origin_count, origin_datatype%MPI_VAL, target_rank, target_disp, & + target_count, target_datatype%MPI_VAL, win%MPI_VAL, request%MPI_VAL) + else + origin_count_c = origin_count + origin_datatype_c = origin_datatype%MPI_VAL + target_rank_c = target_rank + target_count_c = target_count + target_datatype_c = target_datatype%MPI_VAL + win_c = win%MPI_VAL + ierror_c = MPIR_Rput_cdesc(origin_addr, origin_count_c, origin_datatype_c, target_rank_c, target_disp, & + target_count_c, target_datatype_c, win_c, request_c) + request%MPI_VAL = request_c + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Rput_f08ts diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_f08ts.F90 new file mode 100644 index 0000000..462e25f --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_f08ts.F90 @@ -0,0 +1,43 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_allocate_f08(size, disp_unit, info, comm, baseptr, win, ierror) + use, intrinsic :: iso_c_binding, only : c_int, c_ptr + use :: mpi_f08, only : MPI_Info, MPI_Comm, MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + use :: mpi_c_interface, only : c_Info, c_Comm, c_Win + use :: mpi_c_interface, only : MPIR_Win_allocate_c + + implicit none + + integer(kind=MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + type(c_ptr), intent(out) :: baseptr + type(MPI_Win), intent(out) :: win + integer, optional, intent(out) :: ierror + + integer(c_int) :: disp_unit_c + integer(c_Info) :: info_c + integer(c_Comm) :: comm_c + type(c_ptr) :: baseptr_c + integer(c_Win) :: win_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_allocate_c(size, disp_unit, info%MPI_VAL, comm%MPI_VAL, baseptr, win%MPI_VAL) + else + disp_unit_c = disp_unit + info_c = info%MPI_VAL + comm_c = comm%MPI_VAL + ierror_c = MPIR_Win_allocate_c(size, disp_unit_c, info_c, comm_c, baseptr_c, win_c) + baseptr = baseptr_c + win%MPI_VAL = win_c + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_allocate_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_shared_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_shared_f08ts.F90 new file mode 100644 index 0000000..29cede7 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_shared_f08ts.F90 @@ -0,0 +1,43 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_allocate_shared_f08(size, disp_unit, info, comm, baseptr, win, ierror) + use, intrinsic :: iso_c_binding, only : c_int, c_ptr + use :: mpi_f08, only : MPI_Info, MPI_Comm, MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + use :: mpi_c_interface, only : c_Info, c_Comm, c_Win + use :: mpi_c_interface, only : MPIR_Win_allocate_shared_c + + implicit none + + integer(kind=MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + type(c_ptr), intent(out) :: baseptr + type(MPI_Win), intent(out) :: win + integer, optional, intent(out) :: ierror + + integer(c_int) :: disp_unit_c + integer(c_Info) :: info_c + integer(c_Comm) :: comm_c + type(c_ptr) :: baseptr_c + integer(c_Win) :: win_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_allocate_shared_c(size, disp_unit, info%MPI_VAL, comm%MPI_VAL, baseptr, win%MPI_VAL) + else + disp_unit_c = disp_unit + info_c = info%MPI_VAL + comm_c = comm%MPI_VAL + ierror_c = MPIR_Win_allocate_shared_c(size, disp_unit_c, info_c, comm_c, baseptr_c, win_c) + baseptr = baseptr_c + win%MPI_VAL = win_c + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_allocate_shared_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_attach_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_attach_f08ts.F90 new file mode 100644 index 0000000..cab6499 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_attach_f08ts.F90 @@ -0,0 +1,33 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_attach_f08ts(win, base, size, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + use :: mpi_c_interface, only : c_Win + use :: mpi_c_interface, only : MPIR_Win_attach_cdesc + + implicit none + + type(MPI_Win), intent(in) :: win + type(*), dimension(..), asynchronous :: base + integer(kind=MPI_ADDRESS_KIND), intent(in) :: size + integer, optional, intent(out) :: ierror + + integer(c_Win) :: win_c + integer(kind=MPI_ADDRESS_KIND) :: size_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_attach_cdesc(win%MPI_VAL, base, size) + else + win_c = win%MPI_VAL + ierror_c = MPIR_Win_attach_cdesc(win_c, base, size) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_attach_f08ts diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_create_dynamic_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_create_dynamic_f08ts.F90 new file mode 100644 index 0000000..34ebfcf --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_create_dynamic_f08ts.F90 @@ -0,0 +1,35 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_create_dynamic_f08(info, comm, win, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Info, MPI_Comm, MPI_Win + use :: mpi_c_interface, only : c_Info, c_Comm, c_Win + use :: mpi_c_interface, only : MPIR_Win_create_dynamic_c + + implicit none + + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + type(MPI_Win), intent(out) :: win + integer, optional, intent(out) :: ierror + + integer(c_Info) :: info_c + integer(c_Comm) :: comm_c + integer(c_Win) :: win_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_create_dynamic_c(info%MPI_VAL, comm%MPI_VAL, win%MPI_VAL) + else + info_c = info%MPI_VAL + comm_c = comm%MPI_VAL + ierror_c = MPIR_Win_create_dynamic_c(info_c, comm_c, win_c) + win%MPI_VAL = win_c + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_create_dynamic_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_detach_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_detach_f08ts.F90 new file mode 100644 index 0000000..f3d0bd0 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_detach_f08ts.F90 @@ -0,0 +1,30 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_detach_f08ts(win, base, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Win + use :: mpi_c_interface, only : c_Win + use :: mpi_c_interface, only : MPIR_Win_detach_cdesc + + implicit none + + type(MPI_Win), intent(in) :: win + type(*), dimension(..), asynchronous :: base + integer, optional, intent(out) :: ierror + + integer(c_Win) :: win_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_detach_cdesc(win%MPI_VAL, base) + else + win_c = win%MPI_VAL + ierror_c = MPIR_Win_detach_cdesc(win_c, base) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_detach_f08ts diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_all_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_all_f08ts.F90 new file mode 100644 index 0000000..ad076a0 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_all_f08ts.F90 @@ -0,0 +1,29 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_flush_all_f08(win, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Win + use :: mpi_c_interface_types, only : c_Win + use :: mpi_c_interface, only : MPIR_Win_flush_all_c + + implicit none + + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + + integer(c_Win) :: win_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_flush_all_c(win%MPI_VAL) + else + win_c = win%MPI_VAL + ierror_c = MPIR_Win_flush_all_c(win_c) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_flush_all_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_f08ts.F90 new file mode 100644 index 0000000..3289677 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_f08ts.F90 @@ -0,0 +1,31 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_flush_f08(rank, win, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Win + use :: mpi_c_interface_types, only : c_Win + use :: mpi_c_interface, only : MPIR_Win_flush_c + + implicit none + + integer, intent(in) :: rank + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + + integer(c_Win) :: win_c + integer(c_int) :: rank_c, ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_flush_c(rank, win%MPI_VAL) + else + rank_c = rank + win_c = win%MPI_VAL + ierror_c = MPIR_Win_flush_c(rank_c, win_c) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_flush_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_all_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_all_f08ts.F90 new file mode 100644 index 0000000..a2764ef --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_all_f08ts.F90 @@ -0,0 +1,29 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_flush_local_all_f08(win, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Win + use :: mpi_c_interface_types, only : c_Win + use :: mpi_c_interface, only : MPIR_Win_flush_local_all_c + + implicit none + + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + + integer(c_Win) :: win_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_flush_local_all_c(win%MPI_VAL) + else + win_c = win%MPI_VAL + ierror_c = MPIR_Win_flush_local_all_c(win_c) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_flush_local_all_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_f08ts.F90 new file mode 100644 index 0000000..cfc9e25 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_f08ts.F90 @@ -0,0 +1,31 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_flush_local_f08(rank, win, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Win + use :: mpi_c_interface_types, only : c_Win + use :: mpi_c_interface, only : MPIR_Win_flush_local_c + + implicit none + + integer, intent(in) :: rank + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + + integer(c_Win) :: win_c + integer(c_int) :: rank_c, ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_flush_local_c(rank, win%MPI_VAL) + else + rank_c = rank + win_c = win%MPI_VAL + ierror_c = MPIR_Win_flush_local_c(rank_c, win_c) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_flush_local_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_get_info_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_get_info_f08ts.F90 new file mode 100644 index 0000000..3f1d61c --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_get_info_f08ts.F90 @@ -0,0 +1,32 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_get_info_f08(win, info_used, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Win, MPI_Info + use :: mpi_c_interface_types, only : c_Win, c_Info + use :: mpi_c_interface, only : MPIR_Win_get_info_c + + implicit none + + type(MPI_Win), intent(in) :: win + type(MPI_Info), intent(out) :: info_used + integer, optional, intent(out) :: ierror + + integer(c_Win) :: win_c + integer(c_Info) :: info_used_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_get_info_c(win%MPI_VAL, info_used%MPI_VAL) + else + win_c = win%MPI_VAL + ierror_c = MPIR_Win_get_info_c(win_c, info_used_c) + info_used%MPI_VAL = info_used_c + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_get_info_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_lock_all_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_lock_all_f08ts.F90 new file mode 100644 index 0000000..b349654 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_lock_all_f08ts.F90 @@ -0,0 +1,32 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_lock_all_f08(assert, win, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Win + use :: mpi_c_interface_types, only : c_Win + use :: mpi_c_interface, only : MPIR_Win_lock_all_c + + implicit none + + integer, intent(in) :: assert + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + + integer(c_int) :: assert_c + integer(c_Win) :: win_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_lock_all_c(assert, win%MPI_VAL) + else + assert_c = assert + win_c = win%MPI_VAL + ierror_c = MPIR_Win_lock_all_c(assert_c, win_c) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_lock_all_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_set_info_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_set_info_f08ts.F90 new file mode 100644 index 0000000..73505fd --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_set_info_f08ts.F90 @@ -0,0 +1,32 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_set_info_f08(win, info, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Win, MPI_info + use :: mpi_c_interface_types, only : c_Win, c_Info + use :: mpi_c_interface, only : MPIR_Win_set_info_c + + implicit none + + type(MPI_Win), intent(in) :: win + type(MPI_Info), intent(in) :: info + integer, optional, intent(out) :: ierror + + integer(c_Win) :: win_c + integer(c_Info) :: info_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_set_info_c(win%MPI_VAL, info%MPI_VAL) + else + win_c = win%MPI_VAL + info_c = info%MPI_VAL + ierror_c = MPIR_Win_set_info_c(win_c, info_c) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_set_info_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_shared_query_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_shared_query_f08ts.F90 new file mode 100644 index 0000000..966364c --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_shared_query_f08ts.F90 @@ -0,0 +1,36 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_shared_query_f08(win, rank, size, disp_unit, baseptr, ierror) + use, intrinsic :: iso_c_binding, only : c_int, c_ptr + use :: mpi_f08, only : MPI_Win + use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND + use :: mpi_c_interface_types, only : c_Win + use :: mpi_c_interface, only : MPIR_Win_shared_query_c + + implicit none + + type(MPI_Win), intent(in) :: win + integer, intent(in) :: rank + integer(kind=MPI_ADDRESS_KIND), intent(out) :: size + integer, intent(out) :: disp_unit + type(c_ptr), intent(out) :: baseptr + integer, optional, intent(out) :: ierror + + integer(c_Win) :: win_c + integer(c_int) :: rank_c, disp_unit_c, ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_shared_query_c(win%MPI_VAL, rank, size, disp_unit, baseptr) + else + win_c = win%MPI_VAL + rank_c = rank + ierror_c = MPIR_Win_shared_query_c(win_c, rank_c, size, disp_unit_c, baseptr) + disp_unit = disp_unit_c + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_shared_query_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_sync_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_sync_f08ts.F90 new file mode 100644 index 0000000..6703130 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_sync_f08ts.F90 @@ -0,0 +1,29 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_sync_f08(win, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Win + use :: mpi_c_interface_types, only : c_Win + use :: mpi_c_interface, only : MPIR_Win_sync_c + + implicit none + + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + + integer(c_Win) :: win_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_sync_c(win%MPI_VAL) + else + win_c = win%MPI_VAL + ierror_c = MPIR_Win_sync_c(win_c) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_sync_f08 diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/win_unlock_all_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/win_unlock_all_f08ts.F90 new file mode 100644 index 0000000..b12cfb9 --- /dev/null +++ b/src/binding/fortran/use_mpi_f08/wrappers_f/win_unlock_all_f08ts.F90 @@ -0,0 +1,29 @@ +! -*- Mode: Fortran; -*- +! +! (C) 2014 by Argonne National Laboratory. +! See COPYRIGHT in top-level directory. +! +subroutine MPI_Win_unlock_all_f08(win, ierror) + use, intrinsic :: iso_c_binding, only : c_int + use :: mpi_f08, only : MPI_Win + use :: mpi_c_interface_types, only : c_Win + use :: mpi_c_interface, only : MPIR_Win_unlock_all_c + + implicit none + + type(MPI_Win), intent(in) :: win + integer, optional, intent(out) :: ierror + + integer(c_Win) :: win_c + integer(c_int) :: ierror_c + + if (c_int == kind(0)) then + ierror_c = MPIR_Win_unlock_all_c(win%MPI_VAL) + else + win_c = win%MPI_VAL + ierror_c = MPIR_Win_unlock_all_c(win_c) + end if + + if (present(ierror)) ierror = ierror_c + +end subroutine MPI_Win_unlock_all_f08 ----------------------------------------------------------------------- Summary of changes: confdb/aclocal_fc.m4 | 12 +- .../fortran/use_mpi_f08/mpi_c_interface_cdesc.F90 | 144 +++++++++- .../fortran/use_mpi_f08/mpi_c_interface_nobuf.F90 | 163 ++++++++++- src/binding/fortran/use_mpi_f08/mpi_f08.F90 | 309 +++++++++++++++++++- .../use_mpi_f08/wrappers_f/comm_get_info_f08ts.F90 | 32 ++ .../use_mpi_f08/wrappers_f/comm_set_info_f08ts.F90 | 32 ++ .../wrappers_f/compare_and_swap_f08ts.F90 | 43 +++ .../use_mpi_f08/wrappers_f/fetch_and_op_f08ts.F90 | 45 +++ .../wrappers_f/get_accumulate_f08ts.F90 | 63 ++++ .../use_mpi_f08/wrappers_f/raccumulate_f08ts.F90 | 56 ++++ .../wrappers_f/rget_accumulate_f08ts.F90 | 66 +++++ .../fortran/use_mpi_f08/wrappers_f/rget_f08ts.F90 | 53 ++++ .../fortran/use_mpi_f08/wrappers_f/rput_f08ts.F90 | 53 ++++ .../use_mpi_f08/wrappers_f/win_allocate_f08ts.F90 | 43 +++ .../wrappers_f/win_allocate_shared_f08ts.F90 | 43 +++ .../use_mpi_f08/wrappers_f/win_attach_f08ts.F90 | 33 ++ .../wrappers_f/win_create_dynamic_f08ts.F90 | 35 +++ .../use_mpi_f08/wrappers_f/win_detach_f08ts.F90 | 30 ++ .../use_mpi_f08/wrappers_f/win_flush_all_f08ts.F90 | 29 ++ .../use_mpi_f08/wrappers_f/win_flush_f08ts.F90 | 31 ++ .../wrappers_f/win_flush_local_all_f08ts.F90 | 29 ++ .../wrappers_f/win_flush_local_f08ts.F90 | 31 ++ .../use_mpi_f08/wrappers_f/win_get_info_f08ts.F90 | 32 ++ .../use_mpi_f08/wrappers_f/win_lock_all_f08ts.F90 | 32 ++ .../use_mpi_f08/wrappers_f/win_set_info_f08ts.F90 | 32 ++ .../wrappers_f/win_shared_query_f08ts.F90 | 36 +++ .../use_mpi_f08/wrappers_f/win_sync_f08ts.F90 | 29 ++ .../wrappers_f/win_unlock_all_f08ts.F90 | 29 ++ 28 files changed, 1555 insertions(+), 10 deletions(-) create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_info_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_info_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/compare_and_swap_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/fetch_and_op_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/get_accumulate_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/raccumulate_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/rget_accumulate_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/rget_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/rput_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_shared_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_attach_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_create_dynamic_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_detach_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_all_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_all_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_get_info_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_lock_all_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_set_info_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_shared_query_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_sync_f08ts.F90 create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/win_unlock_all_f08ts.F90 hooks/post-receive -- MPICH primary repository
participants (1)
-
noreply@mpich.org