diff --git a/ompi/mpi/fortran/base/mpi-f08-interfaces.F90 b/ompi/mpi/fortran/base/mpi-f08-interfaces.F90 index 34fa7e101b..e6e4a2fb4d 100644 --- a/ompi/mpi/fortran/base/mpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/base/mpi-f08-interfaces.F90 @@ -2930,6 +2930,29 @@ subroutine MPI_Accumulate_f08(origin_addr,origin_count,origin_datatype,target_ra end subroutine MPI_Accumulate_f08 end interface MPI_Accumulate +interface MPI_Raccumulate +subroutine MPI_Raccumulate_f08(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, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr + !$PRAGMA IGNORE_TKR origin_addr + !DIR$ IGNORE_TKR origin_addr + !IBM* IGNORE_TKR origin_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + 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_f08 +end interface MPI_Raccumulate + interface MPI_Get subroutine MPI_Get_f08(origin_addr,origin_count,origin_datatype,target_rank, & target_disp,target_count,target_datatype,win,ierror) @@ -2950,6 +2973,76 @@ subroutine MPI_Get_f08(origin_addr,origin_count,origin_datatype,target_rank, & end subroutine MPI_Get_f08 end interface MPI_Get +interface MPI_Rget +subroutine MPI_Rget_f08(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_Request, MPI_Win, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr + !$PRAGMA IGNORE_TKR origin_addr + !DIR$ IGNORE_TKR origin_addr + !IBM* IGNORE_TKR origin_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Win), INTENT(IN) :: win + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_Rget_f08 +end interface MPI_Rget + +interface MPI_Get_accumulate +subroutine MPI_Get_accumulate_f08(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, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,target_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,target_addr + !$PRAGMA IGNORE_TKR origin_addr,target_addr + !DIR$ IGNORE_TKR origin_addr,target_addr + !IBM* IGNORE_TKR origin_addr,target_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE :: origin_addr + INTEGER, INTENT(IN) :: origin_count, result_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: result_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Op), INTENT(IN) :: op + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_Get_accumulate_f08 +end interface MPI_Get_accumulate + +interface MPI_Rget_accumulate +subroutine MPI_Rget_accumulate_f08(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_Request, MPI_Win, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,target_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,target_addr + !$PRAGMA IGNORE_TKR origin_addr,target_addr + !DIR$ IGNORE_TKR origin_addr,target_addr + !IBM* IGNORE_TKR origin_addr,target_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE :: origin_addr + INTEGER, INTENT(IN) :: origin_count, result_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: result_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + 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_f08 +end interface MPI_Rget_accumulate + interface MPI_Put subroutine MPI_Put_f08(origin_addr,origin_count,origin_datatype,target_rank, & target_disp,target_count,target_datatype,win,ierror) @@ -2970,6 +3063,68 @@ subroutine MPI_Put_f08(origin_addr,origin_count,origin_datatype,target_rank, & end subroutine MPI_Put_f08 end interface MPI_Put +interface MPI_Rput +subroutine MPI_Rput_f08(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, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr + !$PRAGMA IGNORE_TKR origin_addr + !DIR$ IGNORE_TKR origin_addr + !IBM* IGNORE_TKR origin_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Win), INTENT(IN) :: win + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_Rput_f08 +end interface MPI_Rput + +interface MPI_Fetch_and_op +subroutine MPI_Fetch_and_op_f08(origin_addr,result_addr,datatype,target_rank, & + target_disp,op,win,ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Win, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,result_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,result_addr + !$PRAGMA IGNORE_TKR origin_addr,result_addr + !DIR$ IGNORE_TKR origin_addr,result_addr + !IBM* IGNORE_TKR origin_addr,result_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER, INTENT(IN) :: target_rank + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Op), INTENT(IN) :: op + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_Fetch_and_op_f08 +end interface MPI_Fetch_and_op + +interface MPI_Compare_and_swap +subroutine MPI_Compare_and_swap_f08(origin_addr,compare_addr,result_addr,datatype, & + target_rank,target_disp,win,ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Win, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,compare_addr,result_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,compare_addr,result_addr + !$PRAGMA IGNORE_TKR origin_addr,compare_addr,result_addr + !DIR$ IGNORE_TKR origin_addr,compare_addr,result_addr + !IBM* IGNORE_TKR origin_addr,compare_addr,result_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr,compare_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER, INTENT(IN) :: target_rank + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_Compare_and_swap_f08 +end interface MPI_Compare_and_swap + interface MPI_Win_complete subroutine MPI_Win_complete_f08(win,ierror) use :: mpi_f08_types, only : MPI_Info, MPI_Comm, MPI_Win, MPI_ADDRESS_KIND @@ -3088,6 +3243,44 @@ subroutine MPI_Win_wait_f08(win,ierror) end subroutine MPI_Win_wait_f08 end interface MPI_Win_wait +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_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_all_local +subroutine MPI_Win_flush_all_local_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_local_f08 +end interface MPI_Win_flush_all_local + +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_Grequest_complete subroutine MPI_Grequest_complete_f08(request,ierror) use :: mpi_f08_types, only : MPI_Request diff --git a/ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 b/ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 index c154444e36..a743f177ba 100644 --- a/ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 @@ -2931,6 +2931,29 @@ subroutine PMPI_Accumulate_f08(origin_addr,origin_count,origin_datatype,target_r end subroutine PMPI_Accumulate_f08 end interface PMPI_Accumulate +interface PMPI_Raccumulate +subroutine PMPI_Raccumulate_f08(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, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr + !$PRAGMA IGNORE_TKR origin_addr + !DIR$ IGNORE_TKR origin_addr + !IBM* IGNORE_TKR origin_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + 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 PMPI_Raccumulate_f08 +end interface PMPI_Raccumulate + interface PMPI_Get subroutine PMPI_Get_f08(origin_addr,origin_count,origin_datatype,target_rank, & target_disp,target_count,target_datatype,win,ierror) @@ -2951,6 +2974,76 @@ subroutine PMPI_Get_f08(origin_addr,origin_count,origin_datatype,target_rank, & end subroutine PMPI_Get_f08 end interface PMPI_Get +interface PMPI_Rget +subroutine PMPI_Rget_f08(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_Request, MPI_Win, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr + !$PRAGMA IGNORE_TKR origin_addr + !DIR$ IGNORE_TKR origin_addr + !IBM* IGNORE_TKR origin_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Win), INTENT(IN) :: win + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_Rget_f08 +end interface PMPI_Rget + +interface PMPI_Get_accumulate +subroutine PMPI_Get_accumulate_f08(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, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,target_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,target_addr + !$PRAGMA IGNORE_TKR origin_addr,target_addr + !DIR$ IGNORE_TKR origin_addr,target_addr + !IBM* IGNORE_TKR origin_addr,target_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE :: origin_addr + INTEGER, INTENT(IN) :: origin_count, result_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: result_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Op), INTENT(IN) :: op + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_Get_accumulate_f08 +end interface PMPI_Get_accumulate + +interface PMPI_Rget_accumulate +subroutine PMPI_Rget_accumulate_f08(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_Request, MPI_Win, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,target_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,target_addr + !$PRAGMA IGNORE_TKR origin_addr,target_addr + !DIR$ IGNORE_TKR origin_addr,target_addr + !IBM* IGNORE_TKR origin_addr,target_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE :: origin_addr + INTEGER, INTENT(IN) :: origin_count, result_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: result_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + 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 PMPI_Rget_accumulate_f08 +end interface PMPI_Rget_accumulate + interface PMPI_Put subroutine PMPI_Put_f08(origin_addr,origin_count,origin_datatype,target_rank, & target_disp,target_count,target_datatype,win,ierror) @@ -2971,6 +3064,68 @@ subroutine PMPI_Put_f08(origin_addr,origin_count,origin_datatype,target_rank, & end subroutine PMPI_Put_f08 end interface PMPI_Put +interface PMPI_Rput +subroutine PMPI_Rput_f08(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, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr + !$PRAGMA IGNORE_TKR origin_addr + !DIR$ IGNORE_TKR origin_addr + !IBM* IGNORE_TKR origin_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Win), INTENT(IN) :: win + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_Rput_f08 +end interface PMPI_Rput + +interface PMPI_Fetch_and_op +subroutine PMPI_Fetch_and_op_f08(origin_addr,result_addr,datatype,target_rank, & + target_disp,op,win,ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Win, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,result_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,result_addr + !$PRAGMA IGNORE_TKR origin_addr,result_addr + !DIR$ IGNORE_TKR origin_addr,result_addr + !IBM* IGNORE_TKR origin_addr,result_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER, INTENT(IN) :: target_rank + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Op), INTENT(IN) :: op + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_Fetch_and_op_f08 +end interface PMPI_Fetch_and_op + +interface PMPI_Compare_and_swap +subroutine PMPI_Compare_and_swap_f08(origin_addr,compare_addr,result_addr,datatype, & + target_rank,target_disp,win,ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Win, MPI_ADDRESS_KIND + implicit none + !DEC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,compare_addr,result_addr + !GCC$ ATTRIBUTES NO_ARG_CHECK :: origin_addr,compare_addr,result_addr + !$PRAGMA IGNORE_TKR origin_addr,compare_addr,result_addr + !DIR$ IGNORE_TKR origin_addr,compare_addr,result_addr + !IBM* IGNORE_TKR origin_addr,compare_addr,result_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr,compare_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER, INTENT(IN) :: target_rank + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_Compare_and_swap_f08 +end interface PMPI_Compare_and_swap + interface PMPI_Win_complete subroutine PMPI_Win_complete_f08(win,ierror) use :: mpi_f08_types, only : MPI_Info, MPI_Comm, MPI_Win, MPI_ADDRESS_KIND @@ -3089,6 +3244,44 @@ subroutine PMPI_Win_wait_f08(win,ierror) end subroutine PMPI_Win_wait_f08 end interface PMPI_Win_wait +interface PMPI_Win_flush +subroutine PMPI_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 PMPI_Win_flush_f08 +end interface PMPI_Win_flush + +interface PMPI_Win_flush_local +subroutine PMPI_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 PMPI_Win_flush_local_f08 +end interface PMPI_Win_flush_local + +interface PMPI_Win_flush_all_local +subroutine PMPI_Win_flush_all_local_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 PMPI_Win_flush_all_local_f08 +end interface PMPI_Win_flush_all_local + +interface PMPI_Win_flush_all +subroutine PMPI_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 PMPI_Win_flush_all_f08 +end interface PMPI_Win_flush_all + interface PMPI_Grequest_complete subroutine PMPI_Grequest_complete_f08(request,ierror) use :: mpi_f08_types, only : MPI_Request diff --git a/ompi/mpi/fortran/mpif-h/Makefile.am b/ompi/mpi/fortran/mpif-h/Makefile.am index b695415905..6fb9189994 100644 --- a/ompi/mpi/fortran/mpif-h/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/Makefile.am @@ -12,7 +12,7 @@ # Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011-2012 Inria. All rights reserved. # Copyright (c) 2011-2012 Universite Bordeaux 1 -# Copyright (c) 2013 Los Alamos National Security, LLC. All rights +# Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ # @@ -332,8 +332,15 @@ libmpi_mpifh_la_SOURCES += \ wtick_f.c \ wtime_f.c \ accumulate_f.c \ + raccumulate_f.c \ get_f.c \ + rget_f.c \ + get_accumulate_f.c \ + rget_accumulate_f.c \ put_f.c \ + rput_f.c \ + compare_and_swap_f.c \ + fetch_and_op_f.c \ win_call_errhandler_f.c \ win_complete_f.c \ win_create_errhandler_f.c \ @@ -355,7 +362,11 @@ libmpi_mpifh_la_SOURCES += \ win_start_f.c \ win_test_f.c \ win_unlock_f.c \ - win_wait_f.c + win_wait_f.c \ + win_flush_f.c \ + win_flush_all_f.c \ + win_flush_local_f.c \ + win_flush_local_all_f.c if OMPI_PROVIDE_MPI_FILE_INTERFACE libmpi_mpifh_la_SOURCES += \ diff --git a/ompi/mpi/fortran/mpif-h/compare_and_swap_f.c b/ompi/mpi/fortran/mpif-h/compare_and_swap_f.c new file mode 100644 index 0000000000..db899d8fc7 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/compare_and_swap_f.c @@ -0,0 +1,87 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_COMPARE_AND_SWAP = ompi_compare_and_swap_f +#pragma weak pmpi_compare_and_swap = ompi_compare_and_swap_f +#pragma weak pmpi_compare_and_swap_ = ompi_compare_and_swap_f +#pragma weak pmpi_compare_and_swap__ = ompi_compare_and_swap_f + +#pragma weak PMPI_Compare_and_swap_f = ompi_compare_and_swap_f +#pragma weak PMPI_Compare_and_swap_f08 = ompi_compare_and_swap_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_COMPARE_AND_SWAP, + pmpi_compare_and_swap, + pmpi_compare_and_swap_, + pmpi_compare_and_swap__, + pompi_compare_and_swap_f, + (char *origin_addr, char *compare_addr, char *result_addr, MPI_Fint *datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *win, MPI_Fint *ierr), + (origin_addr, compare_addr, result_addr, datatype, target_rank, target_disp, win, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_COMPARE_AND_SWAP = ompi_compare_and_swap_f +#pragma weak mpi_compare_and_swap = ompi_compare_and_swap_f +#pragma weak mpi_compare_and_swap_ = ompi_compare_and_swap_f +#pragma weak mpi_compare_and_swap__ = ompi_compare_and_swap_f + +#pragma weak MPI_Compare_and_swap_f = ompi_compare_and_swap_f +#pragma weak MPI_Compare_and_swap_f08 = ompi_compare_and_swap_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_COMPARE_AND_SWAP, + mpi_compare_and_swap, + mpi_compare_and_swap_, + mpi_compare_and_swap__, + ompi_compare_and_swap_f, + (char *origin_addr, char *compare_addr, char *result_addr, MPI_Fint *datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *win, MPI_Fint *ierr), + (origin_addr, compare_addr, result_addr, datatype, target_rank, target_disp, win, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_compare_and_swap_f(char *origin_addr, char *compare_addr, char *result_addr, + MPI_Fint *datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, + MPI_Fint *win, MPI_Fint *ierr) +{ + int c_ierr; + MPI_Datatype c_datatype = MPI_Type_f2c(*datatype); + MPI_Win c_win = MPI_Win_f2c(*win); + + c_ierr = MPI_Compare_and_swap(OMPI_F2C_BOTTOM(origin_addr), + OMPI_F2C_BOTTOM(compare_addr), + OMPI_F2C_BOTTOM(result_addr), + c_datatype, + OMPI_FINT_2_INT(*target_rank), + *target_disp, c_win); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); +} diff --git a/ompi/mpi/fortran/mpif-h/fetch_and_op_f.c b/ompi/mpi/fortran/mpif-h/fetch_and_op_f.c new file mode 100644 index 0000000000..e1f0657dde --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/fetch_and_op_f.c @@ -0,0 +1,87 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_FETCH_AND_OP = ompi_fetch_and_op_f +#pragma weak pmpi_fetch_and_op = ompi_fetch_and_op_f +#pragma weak pmpi_fetch_and_op_ = ompi_fetch_and_op_f +#pragma weak pmpi_fetch_and_op__ = ompi_fetch_and_op_f + +#pragma weak PMPI_Fetch_and_op_f = ompi_fetch_and_op_f +#pragma weak PMPI_Fetch_and_op_f08 = ompi_fetch_and_op_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_FETCH_AND_OP, + pmpi_fetch_and_op, + pmpi_fetch_and_op_, + pmpi_fetch_and_op__, + pompi_fetch_and_op_f, + (char *origin_addr, char *result_addr, MPI_Fint *datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *op, MPI_Fint *win, MPI_Fint *ierr), + (origin_addr, result_addr, datatype, target_rank, target_disp, op, win, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_FETCH_AND_OP = ompi_fetch_and_op_f +#pragma weak mpi_fetch_and_op = ompi_fetch_and_op_f +#pragma weak mpi_fetch_and_op_ = ompi_fetch_and_op_f +#pragma weak mpi_fetch_and_op__ = ompi_fetch_and_op_f + +#pragma weak MPI_Fetch_and_op_f = ompi_fetch_and_op_f +#pragma weak MPI_Fetch_and_op_f08 = ompi_fetch_and_op_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_FETCH_AND_OP, + mpi_fetch_and_op, + mpi_fetch_and_op_, + mpi_fetch_and_op__, + ompi_fetch_and_op_f, + (char *origin_addr, char *result_addr, MPI_Fint *datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *op, MPI_Fint *win, MPI_Fint *ierr), + (origin_addr, result_addr, datatype, target_rank, target_disp, op, win, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_fetch_and_op_f(char *origin_addr, char *result_addr, MPI_Fint *datatype, + MPI_Fint *target_rank, MPI_Aint *target_disp, + MPI_Fint *op, MPI_Fint *win, MPI_Fint *ierr) +{ + int c_ierr; + MPI_Datatype c_datatype = MPI_Type_f2c(*datatype); + MPI_Win c_win = MPI_Win_f2c(*win); + MPI_Op c_op = MPI_Op_f2c(*op); + + c_ierr = MPI_Fetch_and_op(OMPI_F2C_BOTTOM(origin_addr), + OMPI_F2C_BOTTOM(result_addr), + c_datatype, + OMPI_FINT_2_INT(*target_rank), + *target_disp, c_op, c_win); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); +} diff --git a/ompi/mpi/fortran/mpif-h/get_accumulate_f.c b/ompi/mpi/fortran/mpif-h/get_accumulate_f.c new file mode 100644 index 0000000000..c46c48db9b --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/get_accumulate_f.c @@ -0,0 +1,97 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_GET_ACCUMULATE = ompi_get_accumulate_f +#pragma weak pmpi_get_accumulate = ompi_get_accumulate_f +#pragma weak pmpi_get_accumulate_ = ompi_get_accumulate_f +#pragma weak pmpi_get_accumulate__ = ompi_get_accumulate_f + +#pragma weak PMPI_Get_accumulate_f = ompi_get_accumulate_f +#pragma weak PMPI_Get_accumulate_f08 = ompi_get_accumulate_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_GET_ACCUMULATE, + pmpi_get_accumulate, + pmpi_get_accumulate_, + pmpi_get_accumulate__, + pompi_get_accumulate_f, + (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, char *result_addr, MPI_Fint *result_count, MPI_Fint *result_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *ierr), + (origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_GET_ACCUMULATE = ompi_get_accumulate_f +#pragma weak mpi_get_accumulate = ompi_get_accumulate_f +#pragma weak mpi_get_accumulate_ = ompi_get_accumulate_f +#pragma weak mpi_get_accumulate__ = ompi_get_accumulate_f + +#pragma weak MPI_Get_accumulate_f = ompi_get_accumulate_f +#pragma weak MPI_Get_accumulate_f08 = ompi_get_accumulate_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_GET_ACCUMULATE, + mpi_get_accumulate, + mpi_get_accumulate_, + mpi_get_accumulate__, + ompi_get_accumulate_f, + (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, char *result_addr, MPI_Fint *result_count, MPI_Fint *result_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *ierr), + (origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_get_accumulate_f(char *origin_addr, MPI_Fint *origin_count, + MPI_Fint *origin_datatype, char *result_addr, + MPI_Fint *result_count, MPI_Fint *result_datatype, + MPI_Fint *target_rank, MPI_Aint *target_disp, + MPI_Fint *target_count, MPI_Fint *target_datatype, + MPI_Fint *op, MPI_Fint *win, MPI_Fint *ierr) +{ + int c_ierr; + MPI_Datatype c_origin_datatype = MPI_Type_f2c(*origin_datatype); + MPI_Datatype c_result_datatype = MPI_Type_f2c(*result_datatype); + MPI_Datatype c_target_datatype = MPI_Type_f2c(*target_datatype); + MPI_Win c_win = MPI_Win_f2c(*win); + MPI_Op c_op = MPI_Op_f2c(*op); + + c_ierr = MPI_Get_accumulate(OMPI_F2C_BOTTOM(origin_addr), + OMPI_FINT_2_INT(*origin_count), + c_origin_datatype, + OMPI_F2C_BOTTOM(result_addr), + OMPI_FINT_2_INT(*result_count), + c_result_datatype, + OMPI_FINT_2_INT(*target_rank), + *target_disp, + OMPI_FINT_2_INT(*target_count), + c_target_datatype, c_op, c_win); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); +} diff --git a/ompi/mpi/fortran/mpif-h/profile/Makefile.am b/ompi/mpi/fortran/mpif-h/profile/Makefile.am index 1c59a966f7..9c8d6b9c48 100644 --- a/ompi/mpi/fortran/mpif-h/profile/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/profile/Makefile.am @@ -13,7 +13,7 @@ # Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011-2012 Inria. All rights reserved. # Copyright (c) 2011-2012 Universite Bordeaux 1 -# Copyright (c) 2013 Los Alamos National Security, LLC. All rights +# Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ # @@ -302,8 +302,15 @@ nodist_libmpi_mpifh_pmpi_la_SOURCES = \ pwtick_f.c \ pwtime_f.c \ paccumulate_f.c \ + praccumulate_f.c \ pget_f.c \ + prget_f.c \ + pget_accumulate_f.c \ + prget_accumulate_f.c \ pput_f.c \ + prput_f.c \ + pcompare_and_swap_f.c \ + pfetch_and_op_f.c \ pwin_call_errhandler_f.c \ pwin_complete_f.c \ pwin_create_errhandler_f.c \ @@ -325,7 +332,12 @@ nodist_libmpi_mpifh_pmpi_la_SOURCES = \ pwin_start_f.c \ pwin_test_f.c \ pwin_unlock_f.c \ - pwin_wait_f.c + pwin_wait_f.c \ + pwin_flush_f.c \ + pwin_flush_all_f.c \ + pwin_flush_local_f.c \ + pwin_flush_local_all_f.c + if OMPI_PROVIDE_MPI_FILE_INTERFACE nodist_libmpi_mpifh_pmpi_la_SOURCES += \ diff --git a/ompi/mpi/fortran/mpif-h/profile/defines.h b/ompi/mpi/fortran/mpif-h/profile/defines.h index f3d35e2cad..f91e2decf7 100644 --- a/ompi/mpi/fortran/mpif-h/profile/defines.h +++ b/ompi/mpi/fortran/mpif-h/profile/defines.h @@ -12,7 +12,7 @@ * Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011-2012 Inria. All rights reserved. * Copyright (c) 2011 Universite Bordeaux 1 - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights + * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ * @@ -88,6 +88,7 @@ #define ompi_comm_split_f pompi_comm_split_f #define ompi_comm_split_type_f pompi_comm_split_type_f #define ompi_comm_test_inter_f pompi_comm_test_inter_f +#define ompi_compare_and_swap_f pompi_compare_and_swap_f #define ompi_dims_create_f pompi_dims_create_f #define ompi_dist_graph_create_f pompi_dist_graph_create_f #define ompi_dist_graph_create_adjacent_f pompi_dist_graph_create_adjacent_f @@ -101,6 +102,7 @@ #define ompi_error_string_f pompi_error_string_f #define ompi_exscan_f pompi_exscan_f #define ompi_f_sync_reg_f pompi_f_sync_reg_f +#define ompi_fetch_and_op_f pompi_fetch_and_op_f #define ompi_file_call_errhandler_f pompi_file_call_errhandler_f #define ompi_file_create_errhandler_f pompi_file_create_errhandler_f #define ompi_file_set_errhandler_f pompi_file_set_errhandler_f @@ -166,6 +168,7 @@ #define ompi_get_elements_f pompi_get_elements_f #define ompi_get_elements_x_f pompi_get_elements_x_f #define ompi_get_f pompi_get_f +#define ompi_get_accumulate_f pompi_get_accumulate_f #define ompi_get_library_version_f pompi_get_library_version_f #define ompi_get_processor_name_f pompi_get_processor_name_f #define ompi_get_version_f pompi_get_version_f @@ -258,6 +261,7 @@ #define ompi_publish_name_f pompi_publish_name_f #define ompi_put_f pompi_put_f #define ompi_query_thread_f pompi_query_thread_f +#define ompi_raccumulate_f pompi_raccumulate_f #define ompi_recv_init_f pompi_recv_init_f #define ompi_recv_f pompi_recv_f #define ompi_reduce_f pompi_reduce_f @@ -267,6 +271,9 @@ #define ompi_register_datarep_f pompi_register_datarep_f #define ompi_request_free_f pompi_request_free_f #define ompi_request_get_status_f pompi_request_get_status_f +#define ompi_rget_f pompi_rget_f +#define ompi_rget_accumulate_f pompi_rget_accumulate_f +#define ompi_rput_f pompi_rput_f #define ompi_rsend_f pompi_rsend_f #define ompi_rsend_init_f pompi_rsend_init_f #define ompi_scan_f pompi_scan_f @@ -342,6 +349,10 @@ #define ompi_win_create_keyval_f pompi_win_create_keyval_f #define ompi_win_delete_attr_f pompi_win_delete_attr_f #define ompi_win_fence_f pompi_win_fence_f +#define ompi_win_flush_f pompi_win_flush_f +#define ompi_win_flush_all_f pompi_win_flush_all_f +#define ompi_win_flush_local_f pompi_win_flush_local_f +#define ompi_win_flush_local_all_f pompi_win_flush_local_all_f #define ompi_win_free_f pompi_win_free_f #define ompi_win_free_keyval_f pompi_win_free_keyval_f #define ompi_win_get_attr_f pompi_win_get_attr_f diff --git a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h index 677582e4c4..204df55b9f 100644 --- a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h +++ b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h @@ -146,6 +146,7 @@ PN2(void, MPI_Comm_spawn_multiple, mpi_comm_spawn_multiple, MPI_COMM_SPAWN_MULTI PN2(void, MPI_Comm_split, mpi_comm_split, MPI_COMM_SPLIT, (MPI_Fint *comm, MPI_Fint *color, MPI_Fint *key, MPI_Fint *newcomm, MPI_Fint *ierr)); PN2(void, MPI_Comm_split_type, mpi_comm_split_type, MPI_COMM_SPLIT_TYPE, (MPI_Fint *comm, MPI_Fint *split_type, MPI_Fint *key, MPI_Fint *info, MPI_Fint *newcomm, MPI_Fint *ierr)); PN2(void, MPI_Comm_test_inter, mpi_comm_test_inter, MPI_COMM_TEST_INTER, (MPI_Fint *comm, ompi_fortran_logical_t *flag, MPI_Fint *ierr)); +PN2(void, MPI_Compare_and_swap, mpi_compare_and_swap, MPI_COMPARE_AND_SWAP, (char *origin_addr, char *compare_addr, char *result_addr, MPI_Fint *datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *win, MPI_Fint *ierr)); PN2(void, MPI_Dims_create, mpi_dims_create, MPI_DIMS_CREATE, (MPI_Fint *nnodes, MPI_Fint *ndims, MPI_Fint *dims, MPI_Fint *ierr)); PN2(void, MPI_Dist_graph_create, mpi_dist_graph_create, MPI_DIST_GRAPH_CREATE, (MPI_Fint *comm_old, MPI_Fint *n, MPI_Fint *sources, MPI_Fint *degrees, MPI_Fint *destinations, MPI_Fint *weights, MPI_Fint *info, ompi_fortran_logical_t *reorder, MPI_Fint *comm_graph, MPI_Fint *ierr)); PN2(void, MPI_Dist_graph_create_adjacent, mpi_dist_graph_create_adjacent, MPI_DIST_GRAPH_CREATE_ADJACENT, (MPI_Fint *comm_old, MPI_Fint *indegree, MPI_Fint *sources, MPI_Fint *sourceweights, MPI_Fint *outdegree, MPI_Fint *destinations, MPI_Fint *destweights, MPI_Fint *info, ompi_fortran_logical_t *reorder, MPI_Fint *comm_graph, MPI_Fint *ierr)); @@ -159,6 +160,7 @@ PN2(void, MPI_Error_class, mpi_error_class, MPI_ERROR_CLASS, (MPI_Fint *errorcod PN2(void, MPI_Error_string, mpi_error_string, MPI_ERROR_STRING, (MPI_Fint *errorcode, char *string, MPI_Fint *resultlen, MPI_Fint *ierr, int string_len)); PN2(void, MPI_Exscan, mpi_exscan, MPI_EXSCAN, (char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *ierr)); PN2(void, MPI_F_sync_reg, mpi_f_sync_reg, MPI_F_SYNC_REG, (char *buf)); +PN2(void, MPI_Fetch_and_op, mpi_fetch_and_op, MPI_FETCH_AND_OP, (char *origin_addr, char *result_addr, MPI_Fint *datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *op, MPI_Fint *win, MPI_Fint *ierr)); PN2(void, MPI_File_call_errhandler, mpi_file_call_errhandler, MPI_FILE_CALL_ERRHANDLER, (MPI_Fint *fh, MPI_Fint *errorcode, MPI_Fint *ierr)); PN2(void, MPI_File_create_errhandler, mpi_file_create_errhandler, MPI_FILE_CREATE_ERRHANDLER, (ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr)); PN2(void, MPI_File_set_errhandler, mpi_file_set_errhandler, MPI_FILE_SET_ERRHANDLER, (MPI_Fint *file, MPI_Fint *errhandler, MPI_Fint *ierr)); @@ -219,6 +221,7 @@ PN2(void, MPI_Finalized, mpi_finalized, MPI_FINALIZED, (ompi_fortran_logical_t * PN2(void, MPI_Free_mem, mpi_free_mem, MPI_FREE_MEM, (char *base, MPI_Fint *ierr)); PN2(void, MPI_Gather, mpi_gather, MPI_GATHER, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr)); PN2(void, MPI_Gatherv, mpi_gatherv, MPI_GATHERV, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr)); +PN2(void, MPI_Get_accumulate, mpi_get_accumulate, MPI_GET_ACCUMULATE, (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, char *result_addr, MPI_Fint *result_count, MPI_Fint *result_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *ierr)); PN2(void, MPI_Get_address, mpi_get_address, MPI_GET_ADDRESS, (char *location, MPI_Aint *address, MPI_Fint *ierr)); PN2(void, MPI_Get_count, mpi_get_count, MPI_GET_COUNT, (MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, MPI_Fint *ierr)); PN2(void, MPI_Get_elements, mpi_get_elements, MPI_GET_ELEMENTS, (MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, MPI_Fint *ierr)); @@ -315,6 +318,7 @@ PN2(void, MPI_Probe, mpi_probe, MPI_PROBE, (MPI_Fint *source, MPI_Fint *tag, MPI PN2(void, MPI_Publish_name, mpi_publish_name, MPI_PUBLISH_NAME, (char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len)); PN2(void, MPI_Put, mpi_put, MPI_PUT, (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *ierr)); PN2(void, MPI_Query_thread, mpi_query_thread, MPI_QUERY_THREAD, (MPI_Fint *provided, MPI_Fint *ierr)); +PN2(void, MPI_Raccumulate, mpi_raccumulate, MPI_RACCUMULATE, (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_Recv_init, mpi_recv_init, MPI_RECV_INIT, (char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_Recv, mpi_recv, MPI_RECV, (char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr)); PN2(void, MPI_Reduce, mpi_reduce, MPI_REDUCE, (char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr)); @@ -324,6 +328,9 @@ PN2(void, MPI_Reduce_scatter_block, mpi_reduce_scatter_block, MPI_REDUCE_SCATTER PN2(void, MPI_Register_datarep, mpi_register_datarep, MPI_REGISTER_DATAREP, (char *datarep, ompi_mpi2_fortran_datarep_conversion_fn_t *read_conversion_fn, ompi_mpi2_fortran_datarep_conversion_fn_t *write_conversion_fn, ompi_mpi2_fortran_datarep_extent_fn_t *dtype_file_extent_fn, MPI_Aint *extra_state, MPI_Fint *ierr, int datarep_len)); PN2(void, MPI_Request_free, mpi_request_free, MPI_REQUEST_FREE, (MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_Request_get_status, mpi_request_get_status, MPI_REQUEST_GET_STATUS, (MPI_Fint *request, ompi_fortran_logical_t *flag, MPI_Fint *status, MPI_Fint *ierr)); +PN2(void, MPI_Rget, mpi_rget, MPI_RGET, (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr)); +PN2(void, MPI_Rget_accumulate, mpi_rget_accumulate, MPI_RGET_ACCUMULATE, (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, char *result_addr, MPI_Fint *result_count, MPI_Fint *result_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr)); +PN2(void, MPI_Rput, mpi_rput, MPI_RPUT, (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_Rsend, mpi_rsend, MPI_RSEND, (char *ibuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr)); PN2(void, MPI_Rsend_init, mpi_rsend_init, MPI_RSEND_INIT, (char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_Scan, mpi_scan, MPI_SCAN, (char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *ierr)); @@ -399,6 +406,10 @@ PN2(void, MPI_Win_create_errhandler, mpi_win_create_errhandler, MPI_WIN_CREATE_E PN2(void, MPI_Win_create_keyval, mpi_win_create_keyval, MPI_WIN_CREATE_KEYVAL, (ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Aint *extra_state, MPI_Fint *ierr)); PN2(void, MPI_Win_delete_attr, mpi_win_delete_attr, MPI_WIN_DELETE_ATTR, (MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr)); PN2(void, MPI_Win_fence, mpi_win_fence, MPI_WIN_FENCE, (MPI_Fint *assert, MPI_Fint *win, MPI_Fint *ierr)); +PN2(void, MPI_Win_flush, mpi_win_flush, MPI_WIN_FLUSH, (MPI_Fint *rank, MPI_Fint *win, MPI_Fint *ierr)); +PN2(void, MPI_Win_flush_all, mpi_win_flush_all, MPI_WIN_FLUSH_ALL, (MPI_Fint *win, MPI_Fint *ierr)); +PN2(void, MPI_Win_flush_local, mpi_win_flush_local, MPI_WIN_FLUSH_LOCAL, (MPI_Fint *rank, MPI_Fint *win, MPI_Fint *ierr)); +PN2(void, MPI_Win_flush_local_all, mpi_win_flush_local_all, MPI_WIN_FLUSH_LOCAL_ALL, (MPI_Fint *win, MPI_Fint *ierr)); PN2(void, MPI_Win_free, mpi_win_free, MPI_WIN_FREE, (MPI_Fint *win, MPI_Fint *ierr)); PN2(void, MPI_Win_free_keyval, mpi_win_free_keyval, MPI_WIN_FREE_KEYVAL, (MPI_Fint *win_keyval, MPI_Fint *ierr)); PN2(void, MPI_Win_get_attr, mpi_win_get_attr, MPI_WIN_GET_ATTR, (MPI_Fint *win, MPI_Fint *win_keyval, MPI_Aint *attribute_val, ompi_fortran_logical_t *flag, MPI_Fint *ierr)); diff --git a/ompi/mpi/fortran/mpif-h/raccumulate_f.c b/ompi/mpi/fortran/mpif-h/raccumulate_f.c new file mode 100644 index 0000000000..0595d06bf5 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/raccumulate_f.c @@ -0,0 +1,100 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_RACCUMULATE = ompi_raccumulate_f +#pragma weak pmpi_raccumulate = ompi_raccumulate_f +#pragma weak pmpi_raccumulate_ = ompi_raccumulate_f +#pragma weak pmpi_raccumulate__ = ompi_raccumulate_f + +#pragma weak PMPI_Raccumulate_f = ompi_raccumulate_f +#pragma weak PMPI_Raccumulate_f08 = ompi_raccumulate_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_RACCUMULATE, + pmpi_raccumulate, + pmpi_raccumulate_, + pmpi_raccumulate__, + pompi_raccumulate_f, + (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr), + (origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_RACCUMULATE = ompi_raccumulate_f +#pragma weak mpi_raccumulate = ompi_raccumulate_f +#pragma weak mpi_raccumulate_ = ompi_raccumulate_f +#pragma weak mpi_raccumulate__ = ompi_raccumulate_f + +#pragma weak MPI_Raccumulate_f = ompi_raccumulate_f +#pragma weak MPI_Raccumulate_f08 = ompi_raccumulate_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_RACCUMULATE, + mpi_raccumulate, + mpi_raccumulate_, + mpi_raccumulate__, + ompi_raccumulate_f, + (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr), + (origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_raccumulate_f(char *origin_addr, MPI_Fint *origin_count, + MPI_Fint *origin_datatype, MPI_Fint *target_rank, + MPI_Aint *target_disp, MPI_Fint *target_count, + MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, + MPI_Fint *request, MPI_Fint *ierr) +{ + int ierr_c; + + MPI_Datatype c_origin_datatype = MPI_Type_f2c(*origin_datatype); + MPI_Datatype c_target_datatype = MPI_Type_f2c(*target_datatype); + MPI_Win c_win = MPI_Win_f2c(*win); + MPI_Op c_op = MPI_Op_f2c(*op); + MPI_Request c_req; + + ierr_c = MPI_Raccumulate(OMPI_F2C_BOTTOM(origin_addr), + OMPI_FINT_2_INT(*origin_count), + c_origin_datatype, + OMPI_FINT_2_INT(*target_rank), + *target_disp, + OMPI_FINT_2_INT(*target_count), + c_target_datatype, c_op, c_win, + &c_req); + + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c); + + if (MPI_SUCCESS != ierr_c) { + *request = MPI_Request_c2f(c_req); + } +} diff --git a/ompi/mpi/fortran/mpif-h/rget_accumulate_f.c b/ompi/mpi/fortran/mpif-h/rget_accumulate_f.c new file mode 100644 index 0000000000..53e0cb7ebf --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/rget_accumulate_f.c @@ -0,0 +1,103 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_RGET_ACCUMULATE = ompi_rget_accumulate_f +#pragma weak pmpi_rget_accumulate = ompi_rget_accumulate_f +#pragma weak pmpi_rget_accumulate_ = ompi_rget_accumulate_f +#pragma weak pmpi_rget_accumulate__ = ompi_rget_accumulate_f + +#pragma weak PMPI_Get_accumulate_f = ompi_rget_accumulate_f +#pragma weak PMPI_Get_accumulate_f08 = ompi_rget_accumulate_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_RGET_ACCUMULATE, + pmpi_rget_accumulate, + pmpi_rget_accumulate_, + pmpi_rget_accumulate__, + pompi_rget_accumulate_f, + (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, char *result_addr, MPI_Fint *result_count, MPI_Fint *result_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr), + (origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_RGET_ACCUMULATE = ompi_rget_accumulate_f +#pragma weak mpi_rget_accumulate = ompi_rget_accumulate_f +#pragma weak mpi_rget_accumulate_ = ompi_rget_accumulate_f +#pragma weak mpi_rget_accumulate__ = ompi_rget_accumulate_f + +#pragma weak MPI_Get_accumulate_f = ompi_rget_accumulate_f +#pragma weak MPI_Get_accumulate_f08 = ompi_rget_accumulate_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_RGET_ACCUMULATE, + mpi_rget_accumulate, + mpi_rget_accumulate_, + mpi_rget_accumulate__, + ompi_rget_accumulate_f, + (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, char *result_addr, MPI_Fint *result_count, MPI_Fint *result_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr), + (origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_rget_accumulate_f(char *origin_addr, MPI_Fint *origin_count, + MPI_Fint *origin_datatype, char *result_addr, + MPI_Fint *result_count, MPI_Fint *result_datatype, + MPI_Fint *target_rank, MPI_Aint *target_disp, + MPI_Fint *target_count, MPI_Fint *target_datatype, + MPI_Fint *op, MPI_Fint *win, MPI_Fint *request, + MPI_Fint *ierr) +{ + int c_ierr; + MPI_Datatype c_origin_datatype = MPI_Type_f2c(*origin_datatype); + MPI_Datatype c_result_datatype = MPI_Type_f2c(*result_datatype); + MPI_Datatype c_target_datatype = MPI_Type_f2c(*target_datatype); + MPI_Win c_win = MPI_Win_f2c(*win); + MPI_Op c_op = MPI_Op_f2c(*op); + MPI_Request c_req; + + c_ierr = MPI_Rget_accumulate(OMPI_F2C_BOTTOM(origin_addr), + OMPI_FINT_2_INT(*origin_count), + c_origin_datatype, + OMPI_F2C_BOTTOM(result_addr), + OMPI_FINT_2_INT(*result_count), + c_result_datatype, + OMPI_FINT_2_INT(*target_rank), + *target_disp, + OMPI_FINT_2_INT(*target_count), + c_target_datatype, c_op, c_win, &c_req); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); + + if (MPI_SUCCESS != c_ierr) { + *request = MPI_Request_c2f(c_req); + } +} diff --git a/ompi/mpi/fortran/mpif-h/rget_f.c b/ompi/mpi/fortran/mpif-h/rget_f.c new file mode 100644 index 0000000000..833986117a --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/rget_f.c @@ -0,0 +1,96 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_RGET = ompi_rget_f +#pragma weak pmpi_rget = ompi_rget_f +#pragma weak pmpi_rget_ = ompi_rget_f +#pragma weak pmpi_rget__ = ompi_rget_f + +#pragma weak PMPI_Rget_f = ompi_rget_f +#pragma weak PMPI_Rget_f08 = ompi_rget_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_RGET, + pmpi_rget, + pmpi_rget_, + pmpi_rget__, + pompi_rget_f, + (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr), + (origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_RGET = ompi_rget_f +#pragma weak mpi_rget = ompi_rget_f +#pragma weak mpi_rget_ = ompi_rget_f +#pragma weak mpi_rget__ = ompi_rget_f + +#pragma weak MPI_Rget_f = ompi_rget_f +#pragma weak MPI_Rget_f08 = ompi_rget_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_RGET, + mpi_rget, + mpi_rget_, + mpi_rget__, + ompi_rget_f, + (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr), + (origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_rget_f(char *origin_addr, MPI_Fint *origin_count, + MPI_Fint *origin_datatype, MPI_Fint *target_rank, + MPI_Aint *target_disp, MPI_Fint *target_count, + MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *request, + MPI_Fint *ierr) +{ + int c_ierr; + MPI_Datatype c_origin_datatype = MPI_Type_f2c(*origin_datatype); + MPI_Datatype c_target_datatype = MPI_Type_f2c(*target_datatype); + MPI_Win c_win = MPI_Win_f2c(*win); + MPI_Request c_req; + + c_ierr = MPI_Rget(OMPI_F2C_BOTTOM(origin_addr), + OMPI_FINT_2_INT(*origin_count), + c_origin_datatype, + OMPI_FINT_2_INT(*target_rank), + *target_disp, + OMPI_FINT_2_INT(*target_count), + c_target_datatype, c_win, &c_req); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); + + if (MPI_SUCCESS != c_ierr) { + *request = MPI_Request_c2f(c_req); + } +} diff --git a/ompi/mpi/fortran/mpif-h/rput_f.c b/ompi/mpi/fortran/mpif-h/rput_f.c new file mode 100644 index 0000000000..395486c15b --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/rput_f.c @@ -0,0 +1,96 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_RPUT = ompi_rput_f +#pragma weak pmpi_rput = ompi_rput_f +#pragma weak pmpi_rput_ = ompi_rput_f +#pragma weak pmpi_rput__ = ompi_rput_f + +#pragma weak PMPI_Rput_f = ompi_rput_f +#pragma weak PMPI_Rput_f08 = ompi_rput_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_RPUT, + pmpi_rput, + pmpi_rput_, + pmpi_rput__, + pompi_rput_f, + (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr), + (origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_RPUT = ompi_rput_f +#pragma weak mpi_rput = ompi_rput_f +#pragma weak mpi_rput_ = ompi_rput_f +#pragma weak mpi_rput__ = ompi_rput_f + +#pragma weak MPI_Rput_f = ompi_rput_f +#pragma weak MPI_Rput_f08 = ompi_rput_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_RPUT, + mpi_rput, + mpi_rput_, + mpi_rput__, + ompi_rput_f, + (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr), + (origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_rput_f(char *origin_addr, MPI_Fint *origin_count, + MPI_Fint *origin_datatype, MPI_Fint *target_rank, + MPI_Aint *target_disp, MPI_Fint *target_count, + MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *request, + MPI_Fint *ierr) +{ + int c_ierr; + MPI_Datatype c_origin_datatype = MPI_Type_f2c(*origin_datatype); + MPI_Datatype c_target_datatype = MPI_Type_f2c(*target_datatype); + MPI_Win c_win = MPI_Win_f2c(*win); + MPI_Request c_req; + + c_ierr = MPI_Rput(OMPI_F2C_BOTTOM(origin_addr), + OMPI_FINT_2_INT(*origin_count), + c_origin_datatype, + OMPI_FINT_2_INT(*target_rank), + *target_disp, + OMPI_FINT_2_INT(*target_count), + c_target_datatype, c_win, &c_req); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); + + if (MPI_SUCCESS != c_ierr) { + *request = MPI_Request_c2f(c_req); + } +} diff --git a/ompi/mpi/fortran/mpif-h/win_flush_all_f.c b/ompi/mpi/fortran/mpif-h/win_flush_all_f.c new file mode 100644 index 0000000000..945d4abfa8 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/win_flush_all_f.c @@ -0,0 +1,77 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_WIN_FLUSH_ALL = ompi_win_flush_all_f +#pragma weak pmpi_win_flush_all = ompi_win_flush_all_f +#pragma weak pmpi_win_flush_all_ = ompi_win_flush_all_f +#pragma weak pmpi_win_flush_all__ = ompi_win_flush_all_f + +#pragma weak PMPI_Win_flush_all_f = ompi_win_flush_all_f +#pragma weak PMPI_Win_flush_all_f08 = ompi_win_flush_all_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_FLUSH_ALL, + pmpi_win_flush_all, + pmpi_win_flush_all_, + pmpi_win_flush_all__, + pompi_win_flush_all_f, + (MPI_Fint *win, MPI_Fint *ierr), + (win, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_WIN_FLUSH_ALL = ompi_win_flush_all_f +#pragma weak mpi_win_flush_all = ompi_win_flush_all_f +#pragma weak mpi_win_flush_all_ = ompi_win_flush_all_f +#pragma weak mpi_win_flush_all__ = ompi_win_flush_all_f + +#pragma weak MPI_Win_flush_all_f = ompi_win_flush_all_f +#pragma weak MPI_Win_flush_all_f08 = ompi_win_flush_all_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_WIN_FLUSH_ALL, + mpi_win_flush_all, + mpi_win_flush_all_, + mpi_win_flush_all__, + ompi_win_flush_all_f, + (MPI_Fint *win, MPI_Fint *ierr), + (win, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_win_flush_all_f(MPI_Fint *win, MPI_Fint *ierr) +{ + int c_ierr; + MPI_Win c_win = MPI_Win_f2c(*win); + + c_ierr = MPI_Win_flush_all(c_win); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); +} diff --git a/ompi/mpi/fortran/mpif-h/win_flush_f.c b/ompi/mpi/fortran/mpif-h/win_flush_f.c new file mode 100644 index 0000000000..a31ed2bc6b --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/win_flush_f.c @@ -0,0 +1,77 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_WIN_FLUSH = ompi_win_flush_f +#pragma weak pmpi_win_flush = ompi_win_flush_f +#pragma weak pmpi_win_flush_ = ompi_win_flush_f +#pragma weak pmpi_win_flush__ = ompi_win_flush_f + +#pragma weak PMPI_Win_flush_f = ompi_win_flush_f +#pragma weak PMPI_Win_flush_f08 = ompi_win_flush_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_FLUSH, + pmpi_win_flush, + pmpi_win_flush_, + pmpi_win_flush__, + pompi_win_flush_f, + (MPI_Fint *rank, MPI_Fint *win, MPI_Fint *ierr), + (rank, win, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_WIN_FLUSH = ompi_win_flush_f +#pragma weak mpi_win_flush = ompi_win_flush_f +#pragma weak mpi_win_flush_ = ompi_win_flush_f +#pragma weak mpi_win_flush__ = ompi_win_flush_f + +#pragma weak MPI_Win_flush_f = ompi_win_flush_f +#pragma weak MPI_Win_flush_f08 = ompi_win_flush_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_WIN_FLUSH, + mpi_win_flush, + mpi_win_flush_, + mpi_win_flush__, + ompi_win_flush_f, + (MPI_Fint *rank, MPI_Fint *win, MPI_Fint *ierr), + (rank, win, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_win_flush_f(MPI_Fint *rank, MPI_Fint *win, MPI_Fint *ierr) +{ + int c_ierr; + MPI_Win c_win = MPI_Win_f2c(*win); + + c_ierr = MPI_Win_flush(OMPI_FINT_2_INT(*rank), c_win); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); +} diff --git a/ompi/mpi/fortran/mpif-h/win_flush_local_all_f.c b/ompi/mpi/fortran/mpif-h/win_flush_local_all_f.c new file mode 100644 index 0000000000..3a6ec66b67 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/win_flush_local_all_f.c @@ -0,0 +1,77 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_WIN_FLUSH_LOCAL_ALL = ompi_win_flush_local_all_f +#pragma weak pmpi_win_flush_local_all = ompi_win_flush_local_all_f +#pragma weak pmpi_win_flush_local_all_ = ompi_win_flush_local_all_f +#pragma weak pmpi_win_flush_local_all__ = ompi_win_flush_local_all_f + +#pragma weak PMPI_Win_flush_local_all_f = ompi_win_flush_local_all_f +#pragma weak PMPI_Win_flush_local_all_f08 = ompi_win_flush_local_all_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_FLUSH_LOCAL_ALL, + pmpi_win_flush_local_all, + pmpi_win_flush_local_all_, + pmpi_win_flush_local_all__, + pompi_win_flush_local_all_f, + (MPI_Fint *win, MPI_Fint *ierr), + (win, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_WIN_FLUSH_LOCAL_ALL = ompi_win_flush_local_all_f +#pragma weak mpi_win_flush_local_all = ompi_win_flush_local_all_f +#pragma weak mpi_win_flush_local_all_ = ompi_win_flush_local_all_f +#pragma weak mpi_win_flush_local_all__ = ompi_win_flush_local_all_f + +#pragma weak MPI_Win_flush_local_all_f = ompi_win_flush_local_all_f +#pragma weak MPI_Win_flush_local_all_f08 = ompi_win_flush_local_all_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_WIN_FLUSH_LOCAL_ALL, + mpi_win_flush_local_all, + mpi_win_flush_local_all_, + mpi_win_flush_local_all__, + ompi_win_flush_local_all_f, + (MPI_Fint *win, MPI_Fint *ierr), + (win, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_win_flush_local_all_f(MPI_Fint *win, MPI_Fint *ierr) +{ + int c_ierr; + MPI_Win c_win = MPI_Win_f2c(*win); + + c_ierr = MPI_Win_flush_local_all(c_win); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); +} diff --git a/ompi/mpi/fortran/mpif-h/win_flush_local_f.c b/ompi/mpi/fortran/mpif-h/win_flush_local_f.c new file mode 100644 index 0000000000..52dc116ed3 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/win_flush_local_f.c @@ -0,0 +1,77 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_WIN_FLUSH_LOCAL = ompi_win_flush_local_f +#pragma weak pmpi_win_flush_local = ompi_win_flush_local_f +#pragma weak pmpi_win_flush_local_ = ompi_win_flush_local_f +#pragma weak pmpi_win_flush_local__ = ompi_win_flush_local_f + +#pragma weak PMPI_Win_flush_local_f = ompi_win_flush_local_f +#pragma weak PMPI_Win_flush_local_f08 = ompi_win_flush_local_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_FLUSH_LOCAL, + pmpi_win_flush_local, + pmpi_win_flush_local_, + pmpi_win_flush_local__, + pompi_win_flush_local_f, + (MPI_Fint *rank, MPI_Fint *win, MPI_Fint *ierr), + (rank, win, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_WIN_FLUSH_LOCAL = ompi_win_flush_local_f +#pragma weak mpi_win_flush_local = ompi_win_flush_local_f +#pragma weak mpi_win_flush_local_ = ompi_win_flush_local_f +#pragma weak mpi_win_flush_local__ = ompi_win_flush_local_f + +#pragma weak MPI_Win_flush_local_f = ompi_win_flush_local_f +#pragma weak MPI_Win_flush_local_f08 = ompi_win_flush_local_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_WIN_FLUSH_LOCAL, + mpi_win_flush_local, + mpi_win_flush_local_, + mpi_win_flush_local__, + ompi_win_flush_local_f, + (MPI_Fint *rank, MPI_Fint *win, MPI_Fint *ierr), + (rank, win, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_win_flush_local_f(MPI_Fint *rank, MPI_Fint *win, MPI_Fint *ierr) +{ + int c_ierr; + MPI_Win c_win = MPI_Win_f2c(*win); + + c_ierr = MPI_Win_flush_local(OMPI_FINT_2_INT(*rank), c_win); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); +} diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.am b/ompi/mpi/fortran/use-mpi-f08/Makefile.am index 1906ed10ba..86f783668a 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.am @@ -88,6 +88,7 @@ mpi_api_files = \ comm_spawn_multiple_f08.F90 \ comm_split_f08.F90 \ comm_test_inter_f08.F90 \ + compare_and_swap_f08.F90 \ dist_graph_create_adjacent_f08.F90 \ dist_graph_create_f08.F90 \ dist_graph_neighbors_count_f08.F90 \ @@ -98,11 +99,13 @@ mpi_api_files = \ error_string_f08.F90 \ exscan_f08.F90 \ f_sync_reg_f08.F90 \ + fetch_and_op_f08.F90 \ finalized_f08.F90 \ finalize_f08.F90 \ free_mem_f08.F90 \ gather_f08.F90 \ gatherv_f08.F90 \ + get_accumulate_f08.F90 \ get_address_f08.F90 \ get_count_f08.F90 \ get_elements_f08.F90 \ @@ -205,6 +208,9 @@ mpi_api_files = \ reduce_scatter_block_f08.F90 \ request_free_f08.F90 \ request_get_status_f08.F90 \ + rget_f08.F90 \ + rget_accumulate_f08.F90 \ + rput_f08.F90 \ rsend_f08.F90 \ rsend_init_f08.F90 \ scan_f08.F90 \ @@ -273,6 +279,10 @@ mpi_api_files = \ win_create_keyval_f08.F90 \ win_delete_attr_f08.F90 \ win_fence_f08.F90 \ + win_flush_f08.F90 \ + win_flush_all_f08.F90 \ + win_flush_local_f08.F90 \ + win_flush_local_all_f08.F90 \ win_free_f08.F90 \ win_free_keyval_f08.F90 \ win_get_attr_f08.F90 \ @@ -415,6 +425,7 @@ pmpi_api_files = \ profile/pcomm_spawn_multiple_f08.F90 \ profile/pcomm_split_f08.F90 \ profile/pcomm_test_inter_f08.F90 \ + profile/pcompare_and_swap_f08.F90 \ profile/pdims_create_f08.F90 \ profile/pdist_graph_create_adjacent_f08.F90 \ profile/pdist_graph_create_f08.F90 \ @@ -425,11 +436,13 @@ pmpi_api_files = \ profile/perror_string_f08.F90 \ profile/pexscan_f08.F90 \ profile/pf_sync_reg_f08.F90 \ + profile/pfetch_and_op_f08.F90 \ profile/pfinalized_f08.F90 \ profile/pfinalize_f08.F90 \ profile/pfree_mem_f08.F90 \ profile/pgather_f08.F90 \ profile/pgatherv_f08.F90 \ + profile/pget_accumulate_f08.F90 \ profile/pget_address_f08.F90 \ profile/pget_count_f08.F90 \ profile/pget_elements_f08.F90 \ @@ -531,6 +544,9 @@ pmpi_api_files = \ profile/preduce_scatter_block_f08.F90 \ profile/prequest_free_f08.F90 \ profile/prequest_get_status_f08.F90 \ + profile/prget_f08.F90 \ + profile/prget_accumulate_f08.F90 \ + profile/prput_f08.F90 \ profile/prsend_f08.F90 \ profile/prsend_init_f08.F90 \ profile/pscan_f08.F90 \ @@ -600,6 +616,10 @@ pmpi_api_files = \ profile/pwin_create_keyval_f08.F90 \ profile/pwin_delete_attr_f08.F90 \ profile/pwin_fence_f08.F90 \ + profile/pwin_flush_f08.F90 \ + profile/pwin_flush_all_f08.F90 \ + profile/pwin_flush_local_f08.F90 \ + profile/pwin_flush_local_all_f08.F90 \ profile/pwin_free_f08.F90 \ profile/pwin_free_keyval_f08.F90 \ profile/pwin_get_attr_f08.F90 \ diff --git a/ompi/mpi/fortran/use-mpi-f08/compare_and_swap_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/compare_and_swap_f08.F90 new file mode 100644 index 0000000000..e692ebd8b6 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/compare_and_swap_f08.F90 @@ -0,0 +1,29 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_Compare_and_swap_f08(origin_addr,compare_addr,result_addr,& + datatype,target_rank,target_disp,win,& + ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Win, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_compare_and_swap_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr, compare_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER, INTENT(IN) :: target_rank + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_compare_and_swap_f(origin_addr,compare_addr,result_addr,datatype%MPI_VAL,& + target_rank,target_disp,win%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Compare_and_swap_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/fetch_and_op_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/fetch_and_op_f08.F90 new file mode 100644 index 0000000000..e8c653c0ca --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/fetch_and_op_f08.F90 @@ -0,0 +1,29 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_Fetch_and_op_f08(origin_addr,result_addr,datatype,target_rank, & + target_disp,op,win,ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Win, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_fetch_and_op_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER, INTENT(IN) :: target_rank + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Op), INTENT(IN) :: op + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_fetch_and_op_f(origin_addr,result_addr,datatype%MPI_VAL,target_rank,& + target_disp,op%MPI_VAL,win%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Fetch_and_op_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/get_accumulate_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/get_accumulate_f08.F90 new file mode 100644 index 0000000000..90aa3946c6 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/get_accumulate_f08.F90 @@ -0,0 +1,35 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_Get_accumulate_f08(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, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_get_accumulate_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, result_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: result_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Op), INTENT(IN) :: op + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_get_accumulate_f(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,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Get_accumulate_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h index 2b2f8302b0..4c0e196959 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h @@ -2161,6 +2161,24 @@ subroutine ompi_accumulate_f(origin_addr,origin_count,origin_datatype, & INTEGER, INTENT(OUT) :: ierror end subroutine ompi_accumulate_f +subroutine ompi_raccumulate_f(origin_addr,origin_count,origin_datatype, & + target_rank,target_disp, & + target_count,target_datatype,op,win, & + request,ierror) & + BIND(C, name="ompi_raccumulate_f") + use :: mpi_f08_types, only : MPI_ADDRESS_KIND + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + INTEGER, INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + INTEGER, INTENT(IN) :: target_datatype + INTEGER, INTENT(IN) :: op + INTEGER, INTENT(IN) :: win + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_raccumulate_f + subroutine ompi_get_f(origin_addr,origin_count,origin_datatype,target_rank, & target_disp,target_count,target_datatype,win,ierror) & BIND(C, name="ompi_get_f") @@ -2175,6 +2193,63 @@ subroutine ompi_get_f(origin_addr,origin_count,origin_datatype,target_rank, & INTEGER, INTENT(OUT) :: ierror end subroutine ompi_get_f +subroutine ompi_rget_f(origin_addr,origin_count,origin_datatype,target_rank, & + target_disp,target_count,target_datatype,win,request, & + ierror) & + BIND(C, name="ompi_rget_f") + use :: mpi_f08_types, only : MPI_ADDRESS_KIND + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + INTEGER, INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + INTEGER, INTENT(IN) :: target_datatype + INTEGER, INTENT(IN) :: win + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_rget_f + +subroutine ompi_get_accumulate_f(origin_addr,origin_count,origin_datatype, & + result_addr,result_count,result_datatype, & + target_rank,target_disp, & + target_count,target_datatype,op,win, & + ierror) & + BIND(C, name="ompi_get_accumulate_f") + use :: mpi_f08_types, only : MPI_ADDRESS_KIND + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, result_count, target_rank, target_count + INTEGER, INTENT(IN) :: origin_datatype + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + INTEGER, INTENT(IN) :: result_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + INTEGER, INTENT(IN) :: target_datatype + INTEGER, INTENT(IN) :: op + INTEGER, INTENT(IN) :: win + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_get_accumulate_f + +subroutine ompi_rget_accumulate_f(origin_addr,origin_count,origin_datatype, & + result_addr,result_count,result_datatype, & + target_rank,target_disp, & + target_count,target_datatype,op,win, & + request,ierror) & + BIND(C, name="ompi_rget_accumulate_f") + use :: mpi_f08_types, only : MPI_ADDRESS_KIND + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, result_count, target_rank, target_count + INTEGER, INTENT(IN) :: origin_datatype + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + INTEGER, INTENT(IN) :: result_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + INTEGER, INTENT(IN) :: target_datatype + INTEGER, INTENT(IN) :: op + INTEGER, INTENT(IN) :: win + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_rget_accumulate_f + subroutine ompi_put_f(origin_addr,origin_count,origin_datatype,target_rank, & target_disp,target_count,target_datatype,win,ierror) & BIND(C, name="ompi_put_f") @@ -2189,6 +2264,22 @@ subroutine ompi_put_f(origin_addr,origin_count,origin_datatype,target_rank, & INTEGER, INTENT(OUT) :: ierror end subroutine ompi_put_f +subroutine ompi_rput_f(origin_addr,origin_count,origin_datatype,target_rank, & + target_disp,target_count,target_datatype,win,request, & + ierror) & + BIND(C, name="ompi_rput_f") + use :: mpi_f08_types, only : MPI_ADDRESS_KIND + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + INTEGER, INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + INTEGER, INTENT(IN) :: target_datatype + INTEGER, INTENT(IN) :: win + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_rput_f + subroutine ompi_win_complete_f(win,ierror) & BIND(C, name="ompi_win_complete_f") implicit none @@ -2196,6 +2287,36 @@ subroutine ompi_win_complete_f(win,ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine ompi_win_complete_f +subroutine ompi_compare_and_swap_f(origin_addr,compare_addr,result_addr, & + target_rank,target_disp,datatype, win, & + ierror) & + BIND(C, name="ompi_compare_and_swap_f") + use :: mpi_f08_types, only : MPI_ADDRESS_KIND + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr, compare_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(IN) :: target_rank + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + INTEGER, INTENT(IN) :: win + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_compare_and_swap_f + +subroutine ompi_fetch_and_op_f(origin_addr,result_addr,datatype,target_rank, & + target_disp,op,win,ierror) & + BIND(C, name="ompi_fetch_and_op_f") + use :: mpi_f08_types, only : MPI_ADDRESS_KIND + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(IN) :: target_rank + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + INTEGER, INTENT(IN) :: op + INTEGER, INTENT(IN) :: win + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_fetch_and_op_f + subroutine ompi_win_create_f(base,size,disp_unit,info,comm,win,ierror) & BIND(C, name="ompi_win_create_f") use :: mpi_f08_types, only : MPI_ADDRESS_KIND @@ -2209,6 +2330,36 @@ subroutine ompi_win_create_f(base,size,disp_unit,info,comm,win,ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine ompi_win_create_f +subroutine ompi_win_flush_f(rank,win,ierror) & + BIND(C, name="ompi_win_flush_f") + implicit none + INTEGER, INTENT(IN) :: rank + INTEGER, INTENT(IN) :: win + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_win_flush_f + +subroutine ompi_win_flush_all_f(win,ierror) & + BIND(C, name="ompi_win_flush_all_f") + implicit none + INTEGER, INTENT(IN) :: win + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_win_flush_all_f + +subroutine ompi_win_flush_local_f(rank,win,ierror) & + BIND(C, name="ompi_win_flush_local_f") + implicit none + INTEGER, INTENT(IN) :: rank + INTEGER, INTENT(IN) :: win + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_win_flush_local_f + +subroutine ompi_win_flush_local_all_f(win,ierror) & + BIND(C, name="ompi_win_flush_local_all_f") + implicit none + INTEGER, INTENT(IN) :: win + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_win_flush_local_all_f + subroutine ompi_win_fence_f(assert,win,ierror) & BIND(C, name="ompi_win_fence_f") implicit none diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pcompare_and_swap_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pcompare_and_swap_f08.F90 new file mode 100644 index 0000000000..aa3a4da4ac --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pcompare_and_swap_f08.F90 @@ -0,0 +1,29 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine PMPI_Compare_and_swap_f08(origin_addr,compare_addr,result_addr,& + datatype,target_rank,target_disp,win,& + ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Win, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_compare_and_swap_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr, compare_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER, INTENT(IN) :: target_rank + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_compare_and_swap_f(origin_addr,compare_addr,result_addr,datatype%MPI_VAL,& + target_rank,target_disp,win%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Compare_and_swap_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pfetch_and_op_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pfetch_and_op_f08.F90 new file mode 100644 index 0000000000..a28799acb8 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pfetch_and_op_f08.F90 @@ -0,0 +1,29 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine PMPI_Fetch_and_op_f08(origin_addr,result_addr,datatype,target_rank, & + target_disp,op,win,ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_Op, MPI_Win, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_fetch_and_op_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER, INTENT(IN) :: target_rank + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Op), INTENT(IN) :: op + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_fetch_and_op_f(origin_addr,result_addr,datatype%MPI_VAL,target_rank,& + target_disp,op%MPI_VAL,win%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Fetch_and_op_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pget_accumulate_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pget_accumulate_f08.F90 new file mode 100644 index 0000000000..41ef44d04a --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pget_accumulate_f08.F90 @@ -0,0 +1,35 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine PMPI_Get_accumulate_f08(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, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_get_accumulate_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, result_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: result_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Op), INTENT(IN) :: op + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_get_accumulate_f(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,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Get_accumulate_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/praccumulate_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/praccumulate_f08.F90 new file mode 100644 index 0000000000..6c54f8b19a --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/praccumulate_f08.F90 @@ -0,0 +1,32 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine PMPI_Raccumulate_f08(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, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_raccumulate_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Op), INTENT(IN) :: op + TYPE(MPI_Win), INTENT(IN) :: win + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_raccumulate_f(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,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Raccumulate_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/prget_accumulate_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/prget_accumulate_f08.F90 new file mode 100644 index 0000000000..1814578c7d --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/prget_accumulate_f08.F90 @@ -0,0 +1,36 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine PMPI_Rget_accumulate_f08(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, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_rget_accumulate_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, result_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: result_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Op), INTENT(IN) :: op + TYPE(MPI_Win), INTENT(IN) :: win + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_rget_accumulate_f(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,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Rget_accumulate_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/prget_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/prget_f08.F90 new file mode 100644 index 0000000000..89f76323ec --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/prget_f08.F90 @@ -0,0 +1,30 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine PMPI_Rget_f08(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, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_rget_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Win), INTENT(IN) :: win + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_rget_f(origin_addr,origin_count,origin_datatype%MPI_VAL,target_rank,& + target_disp,target_count,target_datatype%MPI_VAL,win%MPI_VAL,& + request%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Rget_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/prput_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/prput_f08.F90 new file mode 100644 index 0000000000..d95742816c --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/prput_f08.F90 @@ -0,0 +1,30 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine PMPI_Rput_f08(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, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_rput_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Win), INTENT(IN) :: win + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_rput_f(origin_addr,origin_count,origin_datatype%MPI_VAL,target_rank,& + target_disp,target_count,target_datatype%MPI_VAL,win%MPI_VAL,& + request%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Rput_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pwin_flush_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pwin_flush_all_f08.F90 new file mode 100644 index 0000000000..2a4ea7304e --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pwin_flush_all_f08.F90 @@ -0,0 +1,19 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +subroutine PMPI_Win_flush_all_f08(win,ierror) + use :: mpi_f08_types, only : MPI_Win + use :: mpi_f08, only : ompi_win_flush_all_f + implicit none + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_win_flush_all_f(win%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Win_flush_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pwin_flush_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pwin_flush_f08.F90 new file mode 100644 index 0000000000..e78448821f --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pwin_flush_f08.F90 @@ -0,0 +1,20 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +subroutine PMPI_Win_flush_f08(rank,win,ierror) + use :: mpi_f08_types, only : MPI_Win + use :: mpi_f08, only : ompi_win_flush_f + implicit none + INTEGER, INTENT(IN) :: rank + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_win_flush_f(rank,win%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Win_flush_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pwin_flush_local_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pwin_flush_local_all_f08.F90 new file mode 100644 index 0000000000..5e2819dc66 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pwin_flush_local_all_f08.F90 @@ -0,0 +1,19 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +subroutine PMPI_Win_flush_local_all_f08(win,ierror) + use :: mpi_f08_types, only : MPI_Win + use :: mpi_f08, only : ompi_win_flush_local_all_f + implicit none + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_win_flush_local_all_f(win%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Win_flush_local_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pwin_flush_local_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pwin_flush_local_f08.F90 new file mode 100644 index 0000000000..4b215a75be --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pwin_flush_local_f08.F90 @@ -0,0 +1,20 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +subroutine PMPI_Win_flush_local_f08(rank,win,ierror) + use :: mpi_f08_types, only : MPI_Win + use :: mpi_f08, only : ompi_win_flush_local_f + implicit none + INTEGER, INTENT(IN) :: rank + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_win_flush_local_f(rank,win%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Win_flush_local_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/raccumulate_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/raccumulate_f08.F90 new file mode 100644 index 0000000000..5749437681 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/raccumulate_f08.F90 @@ -0,0 +1,32 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_Raccumulate_f08(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, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_raccumulate_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Op), INTENT(IN) :: op + TYPE(MPI_Win), INTENT(IN) :: win + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_raccumulate_f(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,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Raccumulate_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/rget_accumulate_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/rget_accumulate_f08.F90 new file mode 100644 index 0000000000..9c2ddee851 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/rget_accumulate_f08.F90 @@ -0,0 +1,36 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_Rget_accumulate_f08(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, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_rget_accumulate_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, result_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(OUT) :: result_addr + TYPE(MPI_Datatype), INTENT(IN) :: result_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Op), INTENT(IN) :: op + TYPE(MPI_Win), INTENT(IN) :: win + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_rget_accumulate_f(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,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Rget_accumulate_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/rget_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/rget_f08.F90 new file mode 100644 index 0000000000..167fe8d2ef --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/rget_f08.F90 @@ -0,0 +1,30 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_Rget_f08(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, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_rget_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Win), INTENT(IN) :: win + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_rget_f(origin_addr,origin_count,origin_datatype%MPI_VAL,target_rank,& + target_disp,target_count,target_datatype%MPI_VAL,win%MPI_VAL,& + request%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Rget_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/rput_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/rput_f08.F90 new file mode 100644 index 0000000000..6012f95eab --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/rput_f08.F90 @@ -0,0 +1,30 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_Rput_f08(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, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_rput_f + implicit none + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: origin_addr + INTEGER, INTENT(IN) :: origin_count, target_rank, target_count + TYPE(MPI_Datatype), INTENT(IN) :: origin_datatype + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: target_disp + TYPE(MPI_Datatype), INTENT(IN) :: target_datatype + TYPE(MPI_Win), INTENT(IN) :: win + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_rput_f(origin_addr,origin_count,origin_datatype%MPI_VAL,target_rank,& + target_disp,target_count,target_datatype%MPI_VAL,win%MPI_VAL,& + request%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Rput_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/win_flush_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/win_flush_all_f08.F90 new file mode 100644 index 0000000000..6c54f8a4f5 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/win_flush_all_f08.F90 @@ -0,0 +1,19 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +subroutine MPI_Win_flush_all_f08(win,ierror) + use :: mpi_f08_types, only : MPI_Win + use :: mpi_f08, only : ompi_win_flush_all_f + implicit none + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_win_flush_all_f(win%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Win_flush_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/win_flush_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/win_flush_f08.F90 new file mode 100644 index 0000000000..890783481e --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/win_flush_f08.F90 @@ -0,0 +1,20 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +subroutine MPI_Win_flush_f08(rank,win,ierror) + use :: mpi_f08_types, only : MPI_Win + use :: mpi_f08, only : ompi_win_flush_f + implicit none + INTEGER, INTENT(IN) :: rank + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_win_flush_f(rank,win%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Win_flush_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/win_flush_local_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/win_flush_local_all_f08.F90 new file mode 100644 index 0000000000..0dc10aa44d --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/win_flush_local_all_f08.F90 @@ -0,0 +1,19 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +subroutine MPI_Win_flush_local_all_f08(win,ierror) + use :: mpi_f08_types, only : MPI_Win + use :: mpi_f08, only : ompi_win_flush_local_all_f + implicit none + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_win_flush_local_all_f(win%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Win_flush_local_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/win_flush_local_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/win_flush_local_f08.F90 new file mode 100644 index 0000000000..b244c2b60f --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/win_flush_local_f08.F90 @@ -0,0 +1,20 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2014 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +subroutine MPI_Win_flush_local_f08(rank,win,ierror) + use :: mpi_f08_types, only : MPI_Win + use :: mpi_f08, only : ompi_win_flush_local_f + implicit none + INTEGER, INTENT(IN) :: rank + TYPE(MPI_Win), INTENT(IN) :: win + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_win_flush_local_f(rank,win%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Win_flush_local_f08 diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in index 70a4d17561..7c1c98e04f 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in @@ -7,7 +7,7 @@ ! of Tennessee Research Foundation. All rights ! reserved. ! Copyright (c) 2012 Inria. All rights reserved. -! Copyright (c) 2013 Los Alamos National Security, LLC. All rights +! Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights ! reserved. ! $COPYRIGHT$ ! @@ -1641,6 +1641,42 @@ end subroutine PMPI_Comm_test_inter end interface +interface MPI_Compare_and_swap + +subroutine MPI_Compare_and_swap(origin_addr, compare_addr, result_addr, & + datatype, target_rank, target_disp, win, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr, compare_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr, compare_addr + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ result_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: result_addr + integer, intent(in) :: datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine MPI_Compare_and_swap + +end interface + +interface PMPI_Compare_and_swap + +subroutine PMPI_Compare_and_swap(origin_addr, compare_addr, result_addr, & + datatype, target_rank, target_disp, win, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr, compare_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr, compare_addr + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ result_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: result_addr + integer, intent(in) :: datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Compare_and_swap + +end interface + interface MPI_Dims_create subroutine MPI_Dims_create(nnodes, ndims, dims, ierror) @@ -1944,6 +1980,43 @@ end subroutine PMPI_Exscan end interface +interface MPI_Fetch_and_op + +subroutine MPI_Fetch_and_op(origin_addr, result_addr, datatype, target_rank,& + target_disp, op, win, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ result_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: result_addr + integer, intent(in) :: datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine MPI_Fetch_and_op + +end interface + +interface PMPI_Fetch_and_op + +subroutine PMPI_Fetch_and_op(origin_addr, result_addr, datatype, target_rank,& + target_disp, op, win, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ result_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: result_addr + integer, intent(in) :: datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Fetch_and_op + +end interface interface MPI_Finalize @@ -2120,6 +2193,57 @@ end subroutine PMPI_Get end interface +interface MPI_Get_accumulate + +subroutine MPI_Get_accumulate(origin_addr, origin_count, origin_datatype,& + result_addr, result_count, result_datatype,& + target_rank, target_disp, target_count, & + target_datatype, op, win, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ result_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: result_addr + integer, intent(in) :: result_count + integer, intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine MPI_Get_accumulate + +end interface + +interface PMPI_Get_accumulate + +subroutine PMPI_Get_accumulate(origin_addr, origin_count, origin_datatype,& + result_addr, result_count, result_datatype,& + target_rank, target_disp, target_count, & + target_datatype, op, win, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ result_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: result_addr + integer, intent(in) :: result_count + integer, intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Get_accumulate + +end interface interface MPI_Get_address @@ -4869,6 +4993,187 @@ end subroutine PMPI_Query_thread end interface +interface MPI_Raccumulate + +subroutine MPI_Raccumulate(origin_addr, origin_count, origin_datatype,& + target_rank, target_disp, target_count, & + target_datatype, op, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_Raccumulate + +end interface + +interface PMPI_Raccumulate + +subroutine PMPI_Raccumulate(origin_addr, origin_count, origin_datatype,& + target_rank, target_disp, target_count, & + target_datatype, op, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_Raccumulate + +end interface + +interface MPI_Get + +subroutine MPI_Rget(origin_addr, origin_count, origin_datatype, & + target_rank, target_disp, target_count, & + target_datatype, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_Rget + +end interface + +interface PMPI_Get + +subroutine PMPI_Rget(origin_addr, origin_count, origin_datatype, & + target_rank, target_disp, target_count, & + target_datatype, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_Rget + +end interface + +interface MPI_Rget_accumulate + +subroutine MPI_Rget_accumulate(origin_addr, origin_count, origin_datatype,& + result_addr, result_count, result_datatype,& + target_rank, target_disp, target_count, & + target_datatype, op, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ result_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: result_addr + integer, intent(in) :: result_count + integer, intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_Rget_accumulate + +end interface + +interface PMPI_Rget_accumulate + +subroutine PMPI_Rget_accumulate(origin_addr, origin_count, origin_datatype,& + result_addr, result_count, result_datatype,& + target_rank, target_disp, target_count, & + target_datatype, op, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ result_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: result_addr + integer, intent(in) :: result_count + integer, intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_Rget_accumulate + +end interface + +interface MPI_Rput + +subroutine MPI_Rput(origin_addr, origin_count, origin_datatype, & + target_rank, target_disp, target_count, & + target_datatype, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_Rput + +end interface + +interface PMPI_Rput + +subroutine PMPI_Rput(origin_addr, origin_count, origin_datatype, & + target_rank, target_disp, target_count, & + target_datatype, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_Rput + +end interface interface MPI_Recv @@ -7820,6 +8125,81 @@ end subroutine PMPI_Win_fence end interface +interface MPI_Win_flush + +subroutine MPI_Win_flush(rank, win, ierror) + integer, intent(in) :: rank + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine MPI_Win_flush + +end interface + +interface PMPI_Win_flush + +subroutine PMPI_Win_flush(rank, win, ierror) + integer, intent(in) :: rank + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Win_flush + +end interface + +interface MPI_Win_flush_all + +subroutine MPI_Win_flush_all(win, ierror) + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine MPI_Win_flush_all + +end interface + +interface PMPI_Win_flush_all + +subroutine PMPI_Win_flush_all(win, ierror) + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Win_flush_all + +end interface + +interface MPI_Win_flush_local + +subroutine MPI_Win_flush_local(rank, win, ierror) + integer, intent(in) :: rank + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine MPI_Win_flush_local + +end interface + +interface PMPI_Win_flush_local + +subroutine PMPI_Win_flush_local(rank, win, ierror) + integer, intent(in) :: rank + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Win_flush_local + +end interface + +interface MPI_Win_flush_local_all + +subroutine MPI_Win_flush_local_all(win, ierror) + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine MPI_Win_flush_local_all + +end interface + +interface PMPI_Win_flush_local_all + +subroutine PMPI_Win_flush_local_all(win, ierror) + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Win_flush_local_all + +end interface interface MPI_Win_free diff --git a/ompi/mpi/fortran/use-mpi-tkr/scripts/mpi-f90-interfaces.h.sh b/ompi/mpi/fortran/use-mpi-tkr/scripts/mpi-f90-interfaces.h.sh index 895cf894c6..6c342b7ed1 100755 --- a/ompi/mpi/fortran/use-mpi-tkr/scripts/mpi-f90-interfaces.h.sh +++ b/ompi/mpi/fortran/use-mpi-tkr/scripts/mpi-f90-interfaces.h.sh @@ -11353,3 +11353,527 @@ start MPI_Dist_graph_neighbors small output_295 MPI_Dist_graph_neighbors end MPI_Dist_graph_neighbors +#------------------------------------------------------------------------ + +output_296() { + if test "$output" = "0"; then + return 0 + fi + + procedure=$1 + cat <