1
1

Fix problems with calling back-end BIND(C) ompi_*_f() functions.

BIND(C) doesn't let us have LOGICAL parameters, so we have to be
creative in how we invoke back-end ompi_*_f() C functions.
Additionally, the mpi_f08 type for MPI_Status presented some
difficulties, too.
    
See the large comment in
ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h that explains
this in much more detail.

This commit was SVN r29384.
Этот коммит содержится в:
Jeff Squyres 2013-10-04 22:43:07 +00:00
родитель f23d3bca64
Коммит c08f97b030
64 изменённых файлов: 677 добавлений и 883 удалений

Просмотреть файл

@ -1,6 +1,6 @@
# -*- makefile -*-
#
# Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2013 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
@ -21,7 +21,9 @@ if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS
AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include \
$(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/base \
$(OMPI_FC_MODULE_FLAG). -I$(top_srcdir) $(FCFLAGS_f90)
$(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/$(OMPI_FORTRAN_USEMPI_DIR) \
$(OMPI_FC_MODULE_FLAG). \
-I$(top_srcdir) $(FCFLAGS_f90)
lib_LTLIBRARIES = libmpi_usempif08.la

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Cart_create_f08(comm_old,ndims,dims,periods,reorder,comm_cart,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_cart_create_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Cart_create
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: ndims
@ -17,8 +19,7 @@ subroutine MPI_Cart_create_f08(comm_old,ndims,dims,periods,reorder,comm_cart,ier
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_cart_create_f(comm_old%MPI_VAL,ndims,dims,periods,&
call PMPI_Cart_create(comm_old%MPI_VAL,ndims,dims,periods,&
reorder,comm_cart%MPI_VAL,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Cart_create_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Cart_get_f08(comm,maxdims,dims,periods,coords,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_cart_get_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Cart_get
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, INTENT(IN) :: maxdims
@ -16,7 +18,6 @@ subroutine MPI_Cart_get_f08(comm,maxdims,dims,periods,coords,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_cart_get_f(comm%MPI_VAL,maxdims,dims,periods,coords,c_ierror)
call PMPI_Cart_get(comm%MPI_VAL,maxdims,dims,periods,coords,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Cart_get_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Cart_map_f08(comm,ndims,dims,periods,newrank,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_cart_map_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Cart_map
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, INTENT(IN) :: ndims, dims(ndims)
@ -16,7 +18,6 @@ subroutine MPI_Cart_map_f08(comm,ndims,dims,periods,newrank,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_cart_map_f(comm%MPI_VAL,ndims,dims,periods,newrank,c_ierror)
call PMPI_Cart_map(comm%MPI_VAL,ndims,dims,periods,newrank,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Cart_map_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Cart_sub_f08(comm,remain_dims,newcomm,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_cart_sub_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Cart_sub
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
LOGICAL, INTENT(IN) :: remain_dims(*)
@ -15,7 +17,6 @@ subroutine MPI_Cart_sub_f08(comm,remain_dims,newcomm,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_cart_sub_f(comm%MPI_VAL,remain_dims,newcomm%MPI_VAL,c_ierror)
call PMPI_Cart_sub(comm%MPI_VAL,remain_dims,newcomm%MPI_VAL,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Cart_sub_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Comm_get_attr_f08(comm,comm_keyval,attribute_val,flag,ierror)
use :: mpi_f08_types, only : MPI_Comm, MPI_ADDRESS_KIND
use :: mpi_f08, only : ompi_comm_get_attr_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Comm_get_attr
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, INTENT(IN) :: comm_keyval
@ -16,7 +18,6 @@ subroutine MPI_Comm_get_attr_f08(comm,comm_keyval,attribute_val,flag,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_comm_get_attr_f(comm%MPI_VAL,comm_keyval,attribute_val,flag,c_ierror)
call PMPI_Comm_get_attr(comm%MPI_VAL,comm_keyval,attribute_val,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Comm_get_attr_f08

Просмотреть файл

@ -1,20 +1,21 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Comm_test_inter_f08(comm,flag,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_comm_test_inter_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Comm_test_inter
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_comm_test_inter_f(comm%MPI_VAL,flag,c_ierror)
call PMPI_Comm_test_inter(comm%MPI_VAL,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Comm_test_inter_f08

Просмотреть файл

@ -1,6 +1,6 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
@ -9,7 +9,9 @@ subroutine MPI_Dist_graph_create_adjacent_f08(comm_old,indegree,sources,sourcewe
outdegree,destinations,destweights,info,&
reorder,comm_dist_graph,ierror)
use :: mpi_f08_types, only : MPI_Comm, MPI_Info
use :: mpi_f08, only : ompi_dist_graph_create_adjacent_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Dist_graph_create_adjacent
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: indegree, outdegree
@ -20,10 +22,9 @@ subroutine MPI_Dist_graph_create_adjacent_f08(comm_old,indegree,sources,sourcewe
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_dist_graph_create_adjacent_f(comm_old%MPI_VAL,indegree,sources,&
call PMPI_Dist_graph_create_adjacent(comm_old%MPI_VAL,indegree,sources,&
sourceweights,outdegree,destinations,&
destweights,info%MPI_VAL,&
reorder,comm_dist_graph%MPI_VAL,ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Dist_graph_create_adjacent_f08

Просмотреть файл

@ -1,6 +1,6 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
@ -8,7 +8,9 @@
subroutine MPI_Dist_graph_create_f08(comm_old,n,sources,degrees,destinations,&
weights,info,reorder,comm_dist_graph,ierror)
use :: mpi_f08_types, only : MPI_Comm, MPI_Info
use :: mpi_f08, only : ompi_dist_graph_create_f
! See note in ompi/mpi/fortran/use-mpi-f08/iprobe_f08.F90 about why
! we "use mpi" here.
use :: mpi, only : PMPI_Dist_graph_create
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: n
@ -19,7 +21,9 @@ subroutine MPI_Dist_graph_create_f08(comm_old,n,sources,degrees,destinations,&
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_dist_graph_create_f(comm_old%MPI_VAL,n,sources,degrees,destinations,&
! See note in ompi/mpi/fortran/use-mpi-f08/iprobe_f08.F90 about why
! we call a PMPI_* subroutine here
call PMPI_Dist_graph_create(comm_old%MPI_VAL,n,sources,degrees,destinations,&
weights,info%MPI_VAL,reorder,comm_dist_graph%MPI_VAL,&
c_ierror)
if (present(ierror)) ierror = c_ierror

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Dist_graph_neighbors_count_f08(comm,indegree,outdegree,weighted,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_dist_graph_neighbors_count_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Dist_graph_neighbors_count
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, INTENT(OUT) :: indegree, outdegree
@ -15,7 +17,6 @@ subroutine MPI_Dist_graph_neighbors_count_f08(comm,indegree,outdegree,weighted,i
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_dist_graph_neighbors_count_f(comm%MPI_VAL,indegree,outdegree,weighted,c_ierror)
call PMPI_Dist_graph_neighbors_count(comm%MPI_VAL,indegree,outdegree,weighted,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Dist_graph_neighbors_count_f08

Просмотреть файл

@ -1,20 +1,21 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine MPI_File_get_atomicity_f08(fh,flag,ierror)
use :: mpi_f08_types, only : MPI_File
use :: mpi_f08, only : ompi_file_get_atomicity_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_File_get_atomicity
implicit none
TYPE(MPI_File), INTENT(IN) :: fh
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_file_get_atomicity_f(fh%MPI_VAL,flag,c_ierror)
call PMPI_File_get_atomicity(fh%MPI_VAL,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_File_get_atomicity_f08

Просмотреть файл

@ -1,20 +1,21 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine MPI_File_set_atomicity_f08(fh,flag,ierror)
use :: mpi_f08_types, only : MPI_File
use :: mpi_f08, only : ompi_file_set_atomicity_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_File_set_atomicity
implicit none
TYPE(MPI_File), INTENT(IN) :: fh
LOGICAL, INTENT(IN) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_file_set_atomicity_f(fh%MPI_VAL,flag,c_ierror)
call PMPI_File_set_atomicity(fh%MPI_VAL,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_File_set_atomicity_f08

Просмотреть файл

@ -1,18 +1,19 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine MPI_Finalized_f08(flag,ierror)
use :: mpi_f08, only : ompi_finalized_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Finalized
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_finalized_f(flag,c_ierror)
call PMPI_Finalized(flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Finalized_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Graph_create_f08(comm_old,nnodes,index,edges,reorder,comm_graph,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_graph_create_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Graph_create
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: nnodes
@ -17,8 +19,7 @@ subroutine MPI_Graph_create_f08(comm_old,nnodes,index,edges,reorder,comm_graph,i
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_graph_create_f(comm_old%MPI_VAL,nnodes,index,edges,reorder,&
call PMPI_Graph_create(comm_old%MPI_VAL,nnodes,index,edges,reorder,&
comm_graph%MPI_VAL,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Graph_create_f08

Просмотреть файл

@ -1,13 +1,12 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine MPI_Improbe_f08(source,tag,comm,flag,message,status,ierror)
use :: mpi_f08_types, only : MPI_Comm, MPI_Message, MPI_Status
use :: mpi_f08, only : ompi_improbe_f
implicit none
INTEGER, INTENT(IN) :: source, tag
TYPE(MPI_Comm), INTENT(IN) :: comm
@ -17,7 +16,21 @@ subroutine MPI_Improbe_f08(source,tag,comm,flag,message,status,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_improbe_f(source,tag,comm%MPI_VAL,flag,message%MPI_VAL,status,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Improbe(source, tag, comm, flag, message, status, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(in) :: source
integer, intent(in) :: tag
integer, intent(in) :: comm
logical, intent(out) :: flag
integer, intent(out) :: message
type(MPI_STATUS), intent(out) :: status
integer, intent(out) :: ierror
end subroutine PMPI_Improbe
end interface
call PMPI_Improbe(source,tag,comm%MPI_VAL,flag,message%MPI_VAL,status,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Improbe_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine MPI_Info_get_f08(info,key,valuelen,value,flag,ierror)
use :: mpi_f08_types, only : MPI_Info
use :: mpi_f08, only : ompi_info_get_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Info_get
implicit none
TYPE(MPI_Info), INTENT(IN) :: info
CHARACTER(LEN=*), INTENT(IN) :: key
@ -17,8 +19,6 @@ subroutine MPI_Info_get_f08(info,key,valuelen,value,flag,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_info_get_f(info%MPI_VAL,key,valuelen,value,flag,c_ierror, &
len(key),len(value))
call PMPI_Info_get(info%MPI_VAL,key,valuelen,value,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Info_get_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine MPI_Info_get_valuelen_f08(info,key,valuelen,flag,ierror)
use :: mpi_f08_types, only : MPI_Info
use :: mpi_f08, only : ompi_info_get_valuelen_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Info_get_valuelen
implicit none
TYPE(MPI_Info), INTENT(IN) :: info
CHARACTER(LEN=*), INTENT(IN) :: key
@ -16,7 +18,6 @@ subroutine MPI_Info_get_valuelen_f08(info,key,valuelen,flag,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_info_get_valuelen_f(info%MPI_VAL,key,valuelen,flag,c_ierror,len(key))
call PMPI_Info_get_valuelen(info%MPI_VAL,key,valuelen,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Info_get_valuelen_f08

Просмотреть файл

@ -1,18 +1,19 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine MPI_Initialized_f08(flag,ierror)
use :: mpi_f08, only : ompi_initialized_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Initialized
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_initialized_f(flag,c_ierror)
call PMPI_Initialized(flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Initialized_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Intercomm_merge_f08(intercomm,high,newintracomm,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_intercomm_merge_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Intercomm_merge
implicit none
TYPE(MPI_Comm), INTENT(IN) :: intercomm
LOGICAL, INTENT(IN) :: high
@ -15,7 +17,6 @@ subroutine MPI_Intercomm_merge_f08(intercomm,high,newintracomm,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_intercomm_merge_f(intercomm%MPI_VAL,high,newintracomm%MPI_VAL,c_ierror)
call PMPI_Intercomm_merge(intercomm%MPI_VAL,high,newintracomm%MPI_VAL,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Intercomm_merge_f08

Просмотреть файл

@ -1,13 +1,13 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
!
subroutine MPI_Iprobe_f08(source,tag,comm,flag,status,ierror)
use :: mpi_f08_types, only : MPI_Comm, MPI_Status
use :: mpi_f08, only : ompi_iprobe_f
implicit none
INTEGER, INTENT(IN) :: source, tag
TYPE(MPI_Comm), INTENT(IN) :: comm
@ -16,7 +16,21 @@ subroutine MPI_Iprobe_f08(source,tag,comm,flag,status,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_iprobe_f(source,tag,comm%MPI_VAL,flag,status,c_ierror)
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Iprobe(source, tag, comm, flag, status, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(in) :: source
integer, intent(in) :: tag
integer, intent(in) :: comm
logical, intent(out) :: flag
TYPE(MPI_Status), intent(out) :: status
integer, intent(out) :: ierror
end subroutine PMPI_Iprobe
end interface
call PMPI_Iprobe(source,tag,comm%MPI_VAL,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Iprobe_f08

Просмотреть файл

@ -1,18 +1,19 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine MPI_Is_thread_main_f08(flag,ierror)
use :: mpi_f08, only : ompi_is_thread_main_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Is_thread_main
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_is_thread_main_f(flag,c_ierror)
call PMPI_Is_thread_main(flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Is_thread_main_f08

Просмотреть файл

@ -11,10 +11,151 @@
!
! This file provides the interface specifications for the MPI Fortran
! API bindings. It effectively maps between public names ("MPI_Init")
! and the back-end implementation subroutine name (e.g., "ompi_init_f").
! and the back-end OMPI implementation subroutine name (e.g.,
! "ompi_init_f").
!
#include "ompi/mpi/fortran/configure-fortran-output.h"
!
! Most of the "wrapper" subroutines in the mpi_f08 module (i.e., all
! the ones prototyped in this file) are simple routines that simply
! invoke a back-end ompi_*_f() subroutine, which is BIND(C)-bound to a
! back-end C function. Easy-peasy.
!
! However, a bunch of MPI Fortran subroutines use LOGICAL dummy
! parameters, and Fortran disallows passing LOGICAL parameters to
! BIND(C) routines (because the .TRUE. and .FALSE. values are not
! standardized (!)). Hence, for these
! subroutines-with-LOGICAL-params, we have to be creative on how to
! invoke the back-end ompi_*_f() C function. There are 2 cases:
! 1. If the Fortran interface has a LOGICAL parameter and no
! TYPE(MPI_Status) parameter, the individual wrapper implementation
! files (e.g., finalized_f08.F90) use the "mpi" module to get a
! interface for the subroutine and call the PMPI_* name of the
! function, which then invokes the corresponding function in the
! ompi/mpi/fortran/mpif-h directory.
!
! This is a bit of a hack: the "mpi" module will provide the right
! Fortran interface so that the compiler can verify that we're passing
! the right types (e.g., convert MPI handles from comm to
! comm%MPI_VAL). But here's the hack part: when we pass *unbounded
! arrays* of handles (e.g., the sendtypes and recvtypes arrays
! MPI_Alltoallw), we declare that the corresponding ompi_*_f()
! subroutine takes a *scalar*, and then we pass sendtypes(0)%MPI_VAL.
!
! >>>THIS IS A LIE!<<< We're passing a scalar to something that
! expects an array.
!
! However, remember that Fortran passes by reference. So the compiler
! will pass a pointer to sendtypes(0)%MPI_VAL (i.e., the first integer
! in the array). And since the mpi_f08 handles were cleverly designed
! to be exactly equivalent to a single INTEGER, an array of mpi_f08
! handles is exactly equivalent to an array of INTEGERS. So passing
! an address to the first MPI_VAL is exactly the same as passing an
! array of INTEGERS.
!
! Specifically: the back-end C function (in
! ompi/mpi/fortran/mpif-h/*.c) gets an (MPI_Fint*), and it's all good.
!
! The key here is that there is a disconnect between Fortran and C:
! we're telling the Fortran compiler what the C interface is, and
! we're lying. But just a little bit. No one gets hurt.
!
! Yes, this is a total hack. But Craig Rasumussen tells me that this
! is actually quite a common hack in the Fortran developer world, so
! we shouldn't feel bad about using it. Shrug.
!
! 2. If the Fortran interface has both LOGICAL and TYPE(MPI_Status)
! parameters, then we have to do even more tricks than we described
! above. :-(
!
! The problem occurs because in the mpi_f08 module, an MPI_Status is
! TYPE(MPI_Status), but in the mpi module, it's INTEGER,
! DIMENSION(MPI_STATUS_SIZE). Just like MPI handles, TYPE(MPI_Status)
! was cleverly designed so that it can be identical (in terms of a
! memory map) to INTEGER, DIMENSION(MPI_STATUS_SIZE). So we just have
! to fool the compiler into accepting it (it's the same C<-->Fortran
! disconnect from #1).
!
! So in this case, we actually don't "use mpi" at all -- we just add
! an "interface" block for the PMPI_* subroutine that we want to call.
! And we lie in that interface block, saying that the status argument
! is TYPE(MPI_Status) (rather than an INTEGER,
! DIMENSION(MPI_STATUS_SIZE), which is what it *really* is) -- i.e.,
! the same type that we already have.
!
! For the C programmers reading this, this is very much analogous to
! something like this:
!
! $ cat header.h
! void foo(int *param);
! $ cat source.c
! #include "header.h"
! // Pretend that we *know* somehow that param will point to exactly
! // sizeof(int) bytes.
! void bar(char *param) {
! foo(param); // <-- This generates a compiler warning
! }
!
! To fix the compiler warning, instead of including "header.h", we
! just put a byte-equivalent prototype in source.c:
!
! $ cat source.c
! void foo(char *param);
! void bar(char *param) {
! foo(param);
! }
!
! And now it compiles without warning.
!
! The main difference here is that in Fortran, it is an error -- not a
! warning.
!
! Again, we're making the Fortran compiler happy, but we're lying
! because we know the back-end memory representation of the two types
! is the same.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Wasn't that simple? Here's the list of subroutines that are not
! prototyped in this file because they fall into case #1 or #2, above.
!
! MPI_Cart_create
! MPI_Cart_get
! MPI_Cart_map
! MPI_Cart_sub
! MPI_Comm_get_attr
! MPI_Comm_test_inter
! MPI_Dist_graph_create
! MPI_Dist_graph_create_adjacent
! MPI_Dist_graph_neighbors_count
! MPI_File_get_atomicity
! MPI_File_set_atomicity
! MPI_Finalized
! MPI_Graph_create
! MPI_Improbe
! MPI_Info_get
! MPI_Info_get_valuelen
! MPI_Initialized
! MPI_Intercomm_merge
! MPI_Iprobe
! MPI_Is_thread_main
! MPI_Op_commutative
! MPI_Op_create
! MPI_Request_get_status
! MPI_Status_set_cancelled
! MPI_Test
! MPI_Testall
! MPI_Testany
! MPI_Testsome
! MPI_Test_cancelled
! MPI_Type_get_attr
! MPI_Win_get_attr
! MPI_Win_test
!
interface
subroutine ompi_bsend_f(buf,count,datatype,dest,tag,comm,ierror) &
@ -82,17 +223,6 @@ subroutine ompi_ibsend_f(buf,count,datatype,dest,tag,comm,request,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_ibsend_f
subroutine ompi_iprobe_f(source,tag,comm,flag,status,ierror) &
BIND(C, name="ompi_iprobe_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: source, tag
INTEGER, INTENT(IN) :: comm
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_iprobe_f
subroutine ompi_irecv_f(buf,count,datatype,source,tag,comm,request,ierror) &
BIND(C, name="ompi_irecv_f")
implicit none
@ -177,16 +307,6 @@ subroutine ompi_request_free_f(request,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_request_free_f
subroutine ompi_request_get_status_f(request,flag,status,ierror) &
BIND(C, name="ompi_request_get_status_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: request
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_request_get_status_f
subroutine ompi_rsend_f(buf,count,datatype,dest,tag,comm,ierror) &
BIND(C, name="ompi_rsend_f")
implicit none
@ -293,61 +413,6 @@ subroutine ompi_startall_f(count,array_of_requests,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_startall_f
subroutine ompi_test_f(request,flag,status,ierror) &
BIND(C, name="ompi_test_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(INOUT) :: request
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_test_f
subroutine ompi_testall_f(count,array_of_requests,flag,array_of_statuses,ierror) &
BIND(C, name="ompi_testall_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: count
INTEGER, INTENT(INOUT) :: array_of_requests(count)
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Status), INTENT(OUT) :: array_of_statuses(count)
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_testall_f
subroutine ompi_testany_f(count,array_of_requests,index,flag,status,ierror) &
BIND(C, name="ompi_testany_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: count
INTEGER, INTENT(INOUT) :: array_of_requests(count)
INTEGER, INTENT(OUT) :: index
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_testany_f
subroutine ompi_testsome_f(incount,array_of_requests,outcount, &
array_of_indices,array_of_statuses,ierror) &
BIND(C, name="ompi_testsome_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: incount
INTEGER, INTENT(INOUT) :: array_of_requests(incount)
INTEGER, INTENT(OUT) :: outcount
INTEGER, INTENT(OUT) :: array_of_indices(*)
TYPE(MPI_Status), INTENT(OUT) :: array_of_statuses(*)
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_testsome_f
subroutine ompi_test_cancelled_f(status,flag,ierror) &
BIND(C, name="ompi_test_cancelled_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
TYPE(MPI_Status), INTENT(IN) :: status
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_test_cancelled_f
subroutine ompi_wait_f(request,status,ierror) &
BIND(C, name="ompi_wait_f")
use :: mpi_f08_types, only : MPI_Status
@ -981,24 +1046,6 @@ subroutine ompi_igatherv_f(sendbuf,sendcount,sendtype,recvbuf, &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_igatherv_f
subroutine ompi_op_commutative_f(op,commute,ierror) &
BIND(C, name="ompi_op_commutative_f")
implicit none
INTEGER, INTENT(IN) :: op
LOGICAL, INTENT(OUT) :: commute
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_op_commutative_f
subroutine ompi_op_create_f(user_fn,commute,op,ierror) &
BIND(C, name="ompi_op_create_f")
use :: mpi_f08_interfaces_callbacks, only : MPI_User_function
implicit none
OMPI_PROCEDURE(MPI_User_function) :: user_fn
LOGICAL, INTENT(IN) :: commute
INTEGER, INTENT(OUT) :: op
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_op_create_f
subroutine ompi_op_free_f(op,ierror) &
BIND(C, name="ompi_op_free_f")
implicit none
@ -1245,17 +1292,6 @@ subroutine ompi_comm_free_keyval_f(comm_keyval,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_comm_free_keyval_f
subroutine ompi_comm_get_attr_f(comm,comm_keyval,attribute_val,flag,ierror) &
BIND(C, name="ompi_comm_get_attr_f")
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
implicit none
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(IN) :: comm_keyval
INTEGER(MPI_ADDRESS_KIND), INTENT(OUT) :: attribute_val
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_comm_get_attr_f
subroutine ompi_comm_get_name_f(comm,comm_name,resultlen,ierror,comm_name_len) &
BIND(C, name="ompi_comm_get_name_f")
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
@ -1345,14 +1381,6 @@ subroutine ompi_comm_split_f(comm,color,key,newcomm,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_comm_split_f
subroutine ompi_comm_test_inter_f(comm,flag,ierror) &
BIND(C, name="ompi_comm_test_inter_f")
implicit none
INTEGER, INTENT(IN) :: comm
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_comm_test_inter_f
subroutine ompi_group_compare_f(group1,group2,result,ierror) &
BIND(C, name="ompi_group_compare_f")
implicit none
@ -1471,15 +1499,6 @@ subroutine ompi_intercomm_create_f(local_comm,local_leader,peer_comm, &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_intercomm_create_f
subroutine ompi_intercomm_merge_f(intercomm,high,newintracomm,ierror) &
BIND(C, name="ompi_intercomm_merge_f")
implicit none
INTEGER, INTENT(IN) :: intercomm
LOGICAL, INTENT(IN) :: high
INTEGER, INTENT(OUT) :: newintracomm
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_intercomm_merge_f
subroutine ompi_type_create_keyval_f(type_copy_attr_fn,type_delete_attr_fn, &
type_keyval,extra_state,ierror) &
BIND(C, name="ompi_type_create_keyval_f")
@ -1509,17 +1528,6 @@ subroutine ompi_type_free_keyval_f(type_keyval,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_type_free_keyval_f
subroutine ompi_type_get_attr_f(type,type_keyval,attribute_val,flag,ierror) &
BIND(C, name="ompi_type_get_attr_f")
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
implicit none
INTEGER, INTENT(IN) :: type
INTEGER, INTENT(IN) :: type_keyval
INTEGER(MPI_ADDRESS_KIND), INTENT(OUT) :: attribute_val
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_type_get_attr_f
subroutine ompi_type_get_name_f(type,type_name,resultlen,ierror,type_name_len) &
BIND(C, name="ompi_type_get_name_f")
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
@ -1580,17 +1588,6 @@ subroutine ompi_win_free_keyval_f(win_keyval,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_win_free_keyval_f
subroutine ompi_win_get_attr_f(win,win_keyval,attribute_val,flag,ierror) &
BIND(C, name="ompi_win_get_attr_f")
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
implicit none
INTEGER, INTENT(IN) :: win
INTEGER, INTENT(IN) :: win_keyval
INTEGER(MPI_ADDRESS_KIND), INTENT(OUT) :: attribute_val
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_win_get_attr_f
subroutine ompi_win_get_name_f(win,win_name,resultlen,ierror,win_name_len) &
BIND(C, name="ompi_win_get_name_f")
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
@ -1639,37 +1636,6 @@ subroutine ompi_cart_coords_f(comm,rank,maxdims,coords,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_cart_coords_f
subroutine ompi_cart_create_f(comm_old,ndims,dims,periods, &
reorder,comm_cart,ierror) &
BIND(C, name="ompi_cart_create_f")
implicit none
INTEGER, INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: ndims, dims(ndims)
LOGICAL, INTENT(IN) :: periods(ndims), reorder
INTEGER, INTENT(OUT) :: comm_cart
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_cart_create_f
subroutine ompi_cart_get_f(comm,maxdims,dims,periods,coords,ierror) &
BIND(C, name="ompi_cart_get_f")
implicit none
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(IN) :: maxdims
INTEGER, INTENT(OUT) :: dims(maxdims), coords(maxdims)
LOGICAL, INTENT(OUT) :: periods(maxdims)
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_cart_get_f
subroutine ompi_cart_map_f(comm,ndims,dims,periods,newrank,ierror) &
BIND(C, name="ompi_cart_map_f")
implicit none
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(IN) :: ndims, dims(ndims)
LOGICAL, INTENT(IN) :: periods(ndims)
INTEGER, INTENT(OUT) :: newrank
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_cart_map_f
subroutine ompi_cart_rank_f(comm,coords,rank,ierror) &
BIND(C, name="ompi_cart_rank_f")
implicit none
@ -1688,15 +1654,6 @@ subroutine ompi_cart_shift_f(comm,direction,disp,rank_source,rank_dest,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_cart_shift_f
subroutine ompi_cart_sub_f(comm,remain_dims,newcomm,ierror) &
BIND(C, name="ompi_cart_sub_f")
implicit none
INTEGER, INTENT(IN) :: comm
LOGICAL, INTENT(IN) :: remain_dims(*)
INTEGER, INTENT(OUT) :: newcomm
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_cart_sub_f
subroutine ompi_dims_create_f(nnodes,ndims,dims,ierror) &
BIND(C, name="ompi_dims_create_f")
implicit none
@ -1705,34 +1662,6 @@ subroutine ompi_dims_create_f(nnodes,ndims,dims,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_dims_create_f
subroutine ompi_dist_graph_create_f(comm_old,n,sources,degrees, &
destinations,weights,info,reorder,comm_dist_graph,ierror) &
BIND(C, name="ompi_dist_graph_create_f")
implicit none
INTEGER, INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: n
INTEGER, INTENT(IN) :: sources(n), degrees(n), destinations(*), weights(*)
INTEGER, INTENT(IN) :: info
LOGICAL, INTENT(IN) :: reorder
INTEGER, INTENT(OUT) :: comm_dist_graph
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_dist_graph_create_f
subroutine ompi_dist_graph_create_adjacent_f(comm_old,indegree,sources, &
sourceweights,outdegree,destinations,destweights,info, &
reorder,comm_dist_graph,ierror) &
BIND(C, name="ompi_dist_graph_create_adjacent_f")
implicit none
INTEGER, INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: indegree, outdegree
INTEGER, INTENT(IN) :: sources(indegree), sourceweights(indegree)
INTEGER, INTENT(IN) :: destinations(outdegree), destweights(outdegree)
INTEGER, INTENT(IN) :: info
LOGICAL, INTENT(IN) :: reorder
INTEGER, INTENT(OUT) :: comm_dist_graph
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_dist_graph_create_adjacent_f
subroutine ompi_dist_graph_neighbors_f(comm,maxindegree,sources,sourceweights, &
maxoutdegree,destinations,destweights,ierror) &
BIND(C, name="ompi_dist_graph_neighbors_f")
@ -1744,16 +1673,6 @@ subroutine ompi_dist_graph_neighbors_f(comm,maxindegree,sources,sourceweights, &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_dist_graph_neighbors_f
subroutine ompi_dist_graph_neighbors_count_f(comm,indegree,outdegree, &
weighted,ierror) &
BIND(C, name="ompi_dist_graph_neighbors_count_f")
implicit none
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(OUT) :: indegree, outdegree
LOGICAL, INTENT(OUT) :: weighted
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_dist_graph_neighbors_count_f
subroutine ompi_graphdims_get_f(comm,nnodes,nedges,ierror) &
BIND(C, name="ompi_graphdims_get_f")
implicit none
@ -1762,18 +1681,6 @@ subroutine ompi_graphdims_get_f(comm,nnodes,nedges,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_graphdims_get_f
subroutine ompi_graph_create_f(comm_old,nnodes,index,edges,reorder, &
comm_graph,ierror) &
BIND(C, name="ompi_graph_create_f")
implicit none
INTEGER, INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: nnodes
INTEGER, INTENT(IN) :: index(*), edges(*)
LOGICAL, INTENT(IN) :: reorder
INTEGER, INTENT(OUT) :: comm_graph
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_graph_create_f
subroutine ompi_graph_get_f(comm,maxindex,maxedges,index,edges,ierror) &
BIND(C, name="ompi_graph_get_f")
implicit none
@ -1978,13 +1885,6 @@ subroutine ompi_finalize_f(ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_finalize_f
subroutine ompi_finalized_f(flag,ierror) &
BIND(C, name="ompi_finalized_f")
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_finalized_f
subroutine ompi_free_mem_f(base,ierror) &
BIND(C, name="ompi_free_mem_f")
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
@ -2016,13 +1916,6 @@ subroutine ompi_init_f(ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_init_f
subroutine ompi_initialized_f(flag,ierror) &
BIND(C, name="ompi_initialized_f")
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_initialized_f
subroutine ompi_win_call_errhandler_f(win,errorcode,ierror) &
BIND(C, name="ompi_win_call_errhandler_f")
implicit none
@ -2088,19 +1981,6 @@ subroutine ompi_info_free_f(info,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_info_free_f
subroutine ompi_info_get_f(info,key,valuelen,value,flag,ierror,key_len,value_len) &
BIND(C, name="ompi_info_get_f")
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
implicit none
INTEGER, INTENT(IN) :: info
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: key
INTEGER, INTENT(IN) :: valuelen
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: value
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
INTEGER, VALUE, INTENT(IN) :: key_len, value_len
end subroutine ompi_info_get_f
subroutine ompi_info_get_nkeys_f(info,nkeys,ierror) &
BIND(C, name="ompi_info_get_nkeys_f")
implicit none
@ -2120,18 +2000,6 @@ subroutine ompi_info_get_nthkey_f(info,n,key,ierror,key_len) &
INTEGER, VALUE, INTENT(IN) :: key_len
end subroutine ompi_info_get_nthkey_f
subroutine ompi_info_get_valuelen_f(info,key,valuelen,flag,ierror,key_len) &
BIND(C, name="ompi_info_get_valuelen_f")
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
implicit none
INTEGER, INTENT(IN) :: info
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: key
INTEGER, INTENT(OUT) :: valuelen
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
INTEGER, VALUE, INTENT(IN) :: key_len
end subroutine ompi_info_get_valuelen_f
subroutine ompi_info_set_f(info,key,value,ierror,key_len,value_len) &
BIND(C, name="ompi_info_set_f")
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
@ -2389,14 +2257,6 @@ subroutine ompi_win_start_f(group,assert,win,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_win_start_f
subroutine ompi_win_test_f(win,flag,ierror) &
BIND(C, name="ompi_win_test_f")
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(IN) :: win
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_win_test_f
subroutine ompi_win_unlock_f(rank,win,ierror) &
BIND(C, name="ompi_win_unlock_f")
implicit none
@ -2443,13 +2303,6 @@ subroutine ompi_init_thread_f(required,provided,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_init_thread_f
subroutine ompi_is_thread_main_f(flag,ierror) &
BIND(C, name="ompi_is_thread_main_f")
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_is_thread_main_f
subroutine ompi_query_thread_f(provided,ierror) &
BIND(C, name="ompi_query_thread_f")
implicit none
@ -2457,15 +2310,6 @@ subroutine ompi_query_thread_f(provided,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_query_thread_f
subroutine ompi_status_set_cancelled_f(status,flag,ierror) &
BIND(C, name="ompi_status_set_cancelled_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
TYPE(MPI_Status), INTENT(INOUT) :: status
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_status_set_cancelled_f
subroutine ompi_status_set_elements_f(status,datatype,count,ierror) &
BIND(C, name="ompi_status_set_elements_f")
use :: mpi_f08_types, only : MPI_Status
@ -2513,14 +2357,6 @@ subroutine ompi_file_get_amode_f(fh,amode,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_file_get_amode_f
subroutine ompi_file_get_atomicity_f(fh,flag,ierror) &
BIND(C, name="ompi_file_get_atomicity_f")
implicit none
INTEGER, INTENT(IN) :: fh
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_file_get_atomicity_f
subroutine ompi_file_get_byte_offset_f(fh,offset,disp,ierror) &
BIND(C, name="ompi_file_get_byte_offset_f")
use :: mpi_f08_types, only : MPI_OFFSET_KIND
@ -2846,14 +2682,6 @@ subroutine ompi_file_seek_shared_f(fh,offset,whence,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_file_seek_shared_f
subroutine ompi_file_set_atomicity_f(fh,flag,ierror) &
BIND(C, name="ompi_file_set_atomicity_f")
implicit none
INTEGER, INTENT(IN) :: fh
LOGICAL, INTENT(IN) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_file_set_atomicity_f
subroutine ompi_file_set_info_f(fh,info,ierror) &
BIND(C, name="ompi_file_set_info_f")
implicit none
@ -3142,18 +2970,6 @@ subroutine ompi_mprobe_f(source,tag,comm,message,status,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_mprobe_f
subroutine ompi_improbe_f(source,tag,comm,flag,message,status,ierror) &
BIND(C, name="ompi_improbe_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: source, tag
INTEGER, INTENT(IN) :: comm
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: message
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_improbe_f
subroutine ompi_imrecv_f(buf,count,datatype,message,request,ierror) &
BIND(C, name="ompi_imrecv_f")
implicit none

Просмотреть файл

@ -1,20 +1,21 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Op_commutative_f08(op,commute,ierror)
use :: mpi_f08_types, only : MPI_Op
use :: mpi_f08, only : ompi_op_commutative_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Op_commutative
implicit none
TYPE(MPI_Op), INTENT(IN) :: op
LOGICAL, INTENT(OUT) :: commute
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_op_commutative_f(op%MPI_VAL,commute,c_ierror)
call PMPI_Op_commutative(op%MPI_VAL,commute,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Op_commutative_f08

Просмотреть файл

@ -1,6 +1,6 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
@ -10,7 +10,9 @@
subroutine MPI_Op_create_f08(user_fn,commute,op,ierror)
use :: mpi_f08_types, only : MPI_Op
use :: mpi_f08_interfaces_callbacks, only : MPI_User_function
use :: mpi_f08, only : ompi_op_create_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Op_create
implicit none
OMPI_PROCEDURE(MPI_User_function) :: user_fn
LOGICAL, INTENT(IN) :: commute
@ -18,7 +20,6 @@ subroutine MPI_Op_create_f08(user_fn,commute,op,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_op_create_f(user_fn,commute,op%MPI_VAL,c_ierror)
call PMPI_Op_create(user_fn,commute,op%MPI_VAL,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Op_create_f08

Просмотреть файл

@ -15,6 +15,49 @@
#include "ompi/mpi/fortran/configure-fortran-output.h"
!
! Note that interfaces for the following subroutines are not included
! in this file because they contain LOGICAL dummy parameters, and
! therefore cannot be BIND(C). Instead, the individual wrapper
! implementation files (e.g., iprobe_f08.F90) use the "mpi" module to
! get a interface for the subroutine and call the PMPI_* name of the
! function, which then invokes the corresponding function in the
! ompi/mpi/fortran/mpif-h directory.
!
! MPI_Cart_create
! MPI_Cart_get
! MPI_Cart_map
! MPI_Cart_sub
! MPI_Comm_get_attr
! MPI_Comm_test_inter
! MPI_Dist_graph_create
! MPI_Dist_graph_create_adjacent
! MPI_Dist_graph_neighbors_count
! MPI_File_get_atomicity
! MPI_File_set_atomicity
! MPI_Finalized
! MPI_Graph_create
! MPI_Improbe
! MPI_Info_get
! MPI_Info_get_valuelen
! MPI_Initialized
! MPI_Intercomm_merge
! MPI_Iprobe
! MPI_Is_thread_main
! MPI_Op_commutative
! MPI_Op_create
! MPI_Request_get_status
! MPI_Status_set_cancelled
! MPI_Test
! MPI_Testall
! MPI_Testany
! MPI_Testsome
! MPI_Test_cancelled
! MPI_Type_get_attr
! MPI_Win_get_attr
! MPI_Win_test
!
interface
subroutine pompi_bsend_f(buf,count,datatype,dest,tag,comm,ierror) &
@ -82,17 +125,6 @@ subroutine pompi_ibsend_f(buf,count,datatype,dest,tag,comm,request,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_ibsend_f
subroutine pompi_iprobe_f(source,tag,comm,flag,status,ierror) &
BIND(C, name="pompi_iprobe_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: source, tag
INTEGER, INTENT(IN) :: comm
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_iprobe_f
subroutine pompi_irecv_f(buf,count,datatype,source,tag,comm,request,ierror) &
BIND(C, name="pompi_irecv_f")
implicit none
@ -177,16 +209,6 @@ subroutine pompi_request_free_f(request,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_request_free_f
subroutine pompi_request_get_status_f(request,flag,status,ierror) &
BIND(C, name="pompi_request_get_status_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: request
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_request_get_status_f
subroutine pompi_rsend_f(buf,count,datatype,dest,tag,comm,ierror) &
BIND(C, name="pompi_rsend_f")
implicit none
@ -293,39 +315,6 @@ subroutine pompi_startall_f(count,array_of_requests,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_startall_f
subroutine pompi_test_f(request,flag,status,ierror) &
BIND(C, name="pompi_test_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(INOUT) :: request
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_test_f
subroutine pompi_testall_f(count,array_of_requests,flag,array_of_statuses,ierror) &
BIND(C, name="pompi_testall_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: count
INTEGER, INTENT(INOUT) :: array_of_requests(count)
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Status), INTENT(OUT) :: array_of_statuses(count)
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_testall_f
subroutine pompi_testany_f(count,array_of_requests,index,flag,status,ierror) &
BIND(C, name="pompi_testany_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: count
INTEGER, INTENT(INOUT) :: array_of_requests(count)
INTEGER, INTENT(OUT) :: index
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_testany_f
subroutine pompi_testsome_f(incount,array_of_requests,outcount, &
array_of_indices,array_of_statuses,ierror) &
BIND(C, name="pompi_testsome_f")
@ -339,15 +328,6 @@ subroutine pompi_testsome_f(incount,array_of_requests,outcount, &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_testsome_f
subroutine pompi_test_cancelled_f(status,flag,ierror) &
BIND(C, name="pompi_test_cancelled_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
TYPE(MPI_Status), INTENT(IN) :: status
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_test_cancelled_f
subroutine pompi_wait_f(request,status,ierror) &
BIND(C, name="pompi_wait_f")
use :: mpi_f08_types, only : MPI_Status
@ -944,24 +924,6 @@ subroutine pompi_igatherv_f(sendbuf,sendcount,sendtype,recvbuf, &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_igatherv_f
subroutine pompi_op_commutative_f(op,commute,ierror) &
BIND(C, name="pompi_op_commutative_f")
implicit none
INTEGER, INTENT(IN) :: op
LOGICAL, INTENT(OUT) :: commute
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_op_commutative_f
subroutine pompi_op_create_f(user_fn,commute,op,ierror) &
BIND(C, name="pompi_op_create_f")
use :: mpi_f08_interfaces_callbacks, only : MPI_User_function
implicit none
OMPI_PROCEDURE(MPI_User_function) :: user_fn
LOGICAL, INTENT(IN) :: commute
INTEGER, INTENT(OUT) :: op
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_op_create_f
subroutine pompi_op_free_f(op,ierror) &
BIND(C, name="pompi_op_free_f")
implicit none
@ -1189,17 +1151,6 @@ subroutine pompi_comm_free_keyval_f(comm_keyval,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_comm_free_keyval_f
subroutine pompi_comm_get_attr_f(comm,comm_keyval,attribute_val,flag,ierror) &
BIND(C, name="pompi_comm_get_attr_f")
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
implicit none
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(IN) :: comm_keyval
INTEGER(MPI_ADDRESS_KIND), INTENT(OUT) :: attribute_val
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_comm_get_attr_f
subroutine pompi_comm_get_name_f(comm,comm_name,resultlen,ierror,comm_name_len) &
BIND(C, name="pompi_comm_get_name_f")
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
@ -1280,14 +1231,6 @@ subroutine pompi_comm_split_f(comm,color,key,newcomm,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_comm_split_f
subroutine pompi_comm_test_inter_f(comm,flag,ierror) &
BIND(C, name="pompi_comm_test_inter_f")
implicit none
INTEGER, INTENT(IN) :: comm
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_comm_test_inter_f
subroutine pompi_group_compare_f(group1,group2,result,ierror) &
BIND(C, name="pompi_group_compare_f")
implicit none
@ -1406,15 +1349,6 @@ subroutine pompi_intercomm_create_f(local_comm,local_leader,peer_comm, &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_intercomm_create_f
subroutine pompi_intercomm_merge_f(intercomm,high,newintracomm,ierror) &
BIND(C, name="pompi_intercomm_merge_f")
implicit none
INTEGER, INTENT(IN) :: intercomm
LOGICAL, INTENT(IN) :: high
INTEGER, INTENT(OUT) :: newintracomm
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_intercomm_merge_f
subroutine pompi_type_create_keyval_f(type_copy_attr_fn,type_delete_attr_fn, &
type_keyval,extra_state,ierror) &
BIND(C, name="pompi_type_create_keyval_f")
@ -1444,17 +1378,6 @@ subroutine pompi_type_free_keyval_f(type_keyval,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_type_free_keyval_f
subroutine pompi_type_get_attr_f(type,type_keyval,attribute_val,flag,ierror) &
BIND(C, name="pompi_type_get_attr_f")
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
implicit none
INTEGER, INTENT(IN) :: type
INTEGER, INTENT(IN) :: type_keyval
INTEGER(MPI_ADDRESS_KIND), INTENT(OUT) :: attribute_val
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_type_get_attr_f
subroutine pompi_type_get_name_f(type,type_name,resultlen,ierror,type_name_len) &
BIND(C, name="pompi_type_get_name_f")
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
@ -1515,17 +1438,6 @@ subroutine pompi_win_free_keyval_f(win_keyval,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_win_free_keyval_f
subroutine pompi_win_get_attr_f(win,win_keyval,attribute_val,flag,ierror) &
BIND(C, name="pompi_win_get_attr_f")
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
implicit none
INTEGER, INTENT(IN) :: win
INTEGER, INTENT(IN) :: win_keyval
INTEGER(MPI_ADDRESS_KIND), INTENT(OUT) :: attribute_val
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_win_get_attr_f
subroutine pompi_win_get_name_f(win,win_name,resultlen,ierror,win_name_len) &
BIND(C, name="pompi_win_get_name_f")
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
@ -1574,37 +1486,6 @@ subroutine pompi_cart_coords_f(comm,rank,maxdims,coords,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_cart_coords_f
subroutine pompi_cart_create_f(comm_old,ndims,dims,periods, &
reorder,comm_cart,ierror) &
BIND(C, name="pompi_cart_create_f")
implicit none
INTEGER, INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: ndims, dims(ndims)
LOGICAL, INTENT(IN) :: periods(ndims), reorder
INTEGER, INTENT(OUT) :: comm_cart
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_cart_create_f
subroutine pompi_cart_get_f(comm,maxdims,dims,periods,coords,ierror) &
BIND(C, name="pompi_cart_get_f")
implicit none
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(IN) :: maxdims
INTEGER, INTENT(OUT) :: dims(maxdims), coords(maxdims)
LOGICAL, INTENT(OUT) :: periods(maxdims)
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_cart_get_f
subroutine pompi_cart_map_f(comm,ndims,dims,periods,newrank,ierror) &
BIND(C, name="pompi_cart_map_f")
implicit none
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(IN) :: ndims, dims(ndims)
LOGICAL, INTENT(IN) :: periods
INTEGER, INTENT(OUT) :: newrank
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_cart_map_f
subroutine pompi_cart_rank_f(comm,coords,rank,ierror) &
BIND(C, name="pompi_cart_rank_f")
implicit none
@ -1623,15 +1504,6 @@ subroutine pompi_cart_shift_f(comm,direction,disp,rank_source,rank_dest,ierror)
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_cart_shift_f
subroutine pompi_cart_sub_f(comm,remain_dims,newcomm,ierror) &
BIND(C, name="pompi_cart_sub_f")
implicit none
INTEGER, INTENT(IN) :: comm
LOGICAL, INTENT(IN) :: remain_dims(*)
INTEGER, INTENT(OUT) :: newcomm
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_cart_sub_f
subroutine pompi_dims_create_f(nnodes,ndims,dims,ierror) &
BIND(C, name="pompi_dims_create_f")
implicit none
@ -1640,34 +1512,6 @@ subroutine pompi_dims_create_f(nnodes,ndims,dims,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_dims_create_f
subroutine pompi_dist_graph_create_f(comm_old,n,sources,degrees, &
destinations,weights,info,reorder,comm_dist_graph,ierror) &
BIND(C, name="pompi_dist_graph_create_f")
implicit none
INTEGER, INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: n
INTEGER, INTENT(IN) :: sources(n), degrees(n), destinations(*), weights(*)
INTEGER, INTENT(IN) :: info
LOGICAL, INTENT(IN) :: reorder
INTEGER, INTENT(OUT) :: comm_dist_graph
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_dist_graph_create_f
subroutine pompi_dist_graph_create_adjacent_f(comm_old,indegree,sources, &
sourceweights,outdegree,destinations,destweights,info, &
reorder,comm_dist_graph,ierror) &
BIND(C, name="pompi_dist_graph_create_adjacent_f")
implicit none
INTEGER, INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: indegree, outdegree
INTEGER, INTENT(IN) :: sources(indegree), sourceweights(indegree)
INTEGER, INTENT(IN) :: destinations(outdegree), destweights(outdegree)
INTEGER, INTENT(IN) :: info
LOGICAL, INTENT(IN) :: reorder
INTEGER, INTENT(OUT) :: comm_dist_graph
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_dist_graph_create_adjacent_f
subroutine pompi_dist_graph_neighbors_f(comm,maxindegree,sources,sourceweights, &
maxoutdegree,destinations,destweights,ierror) &
BIND(C, name="pompi_dist_graph_neighbors_f")
@ -1679,16 +1523,6 @@ subroutine pompi_dist_graph_neighbors_f(comm,maxindegree,sources,sourceweights,
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_dist_graph_neighbors_f
subroutine pompi_dist_graph_neighbors_count_f(comm,indegree,outdegree, &
weighted,ierror) &
BIND(C, name="pompi_dist_graph_neighbors_count_f")
implicit none
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(OUT) :: indegree, outdegree
LOGICAL, INTENT(OUT) :: weighted
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_dist_graph_neighbors_count_f
subroutine pompi_graphdims_get_f(comm,nnodes,nedges,ierror) &
BIND(C, name="pompi_graphdims_get_f")
implicit none
@ -1697,18 +1531,6 @@ subroutine pompi_graphdims_get_f(comm,nnodes,nedges,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_graphdims_get_f
subroutine pompi_graph_create_f(comm_old,nnodes,index,edges,reorder, &
comm_graph,ierror) &
BIND(C, name="pompi_graph_create_f")
implicit none
INTEGER, INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: nnodes
INTEGER, INTENT(IN) :: index(*), edges(*)
LOGICAL, INTENT(IN) :: reorder
INTEGER, INTENT(OUT) :: comm_graph
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_graph_create_f
subroutine pompi_graph_get_f(comm,maxindex,maxedges,index,edges,ierror) &
BIND(C, name="pompi_graph_get_f")
implicit none
@ -1916,13 +1738,6 @@ subroutine pompi_finalize_f(ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_finalize_f
subroutine pompi_finalized_f(flag,ierror) &
BIND(C, name="pompi_finalized_f")
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_finalized_f
subroutine pompi_free_mem_f(base,ierror) &
BIND(C, name="pompi_free_mem_f")
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
@ -1957,13 +1772,6 @@ subroutine pompi_init_f(ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_init_f
subroutine pompi_initialized_f(flag,ierror) &
BIND(C, name="pompi_initialized_f")
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_initialized_f
subroutine pompi_win_call_errhandler_f(win,errorcode,ierror) &
BIND(C, name="pompi_win_call_errhandler_f")
implicit none
@ -2029,19 +1837,6 @@ subroutine pompi_info_free_f(info,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_info_free_f
subroutine pompi_info_get_f(info,key,valuelen,value,flag,ierror,key_len,value_len) &
BIND(C, name="pompi_info_get_f")
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
implicit none
INTEGER, INTENT(IN) :: info
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: key
INTEGER, INTENT(IN) :: valuelen
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: value
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
INTEGER, VALUE, INTENT(IN) :: key_len, value_len
end subroutine pompi_info_get_f
subroutine pompi_info_get_nkeys_f(info,nkeys,ierror) &
BIND(C, name="pompi_info_get_nkeys_f")
implicit none
@ -2061,18 +1856,6 @@ subroutine pompi_info_get_nthkey_f(info,n,key,ierror,key_len) &
INTEGER, VALUE, INTENT(IN) :: key_len
end subroutine pompi_info_get_nthkey_f
subroutine pompi_info_get_valuelen_f(info,key,valuelen,flag,ierror,key_len) &
BIND(C, name="pompi_info_get_valuelen_f")
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
implicit none
INTEGER, INTENT(IN) :: info
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: key
INTEGER, INTENT(OUT) :: valuelen
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
INTEGER, VALUE, INTENT(IN) :: key_len
end subroutine pompi_info_get_valuelen_f
subroutine pompi_info_set_f(info,key,value,ierror,key_len,value_len) &
BIND(C, name="pompi_info_set_f")
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
@ -2330,14 +2113,6 @@ subroutine pompi_win_start_f(group,assert,win,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_win_start_f
subroutine pompi_win_test_f(win,flag,ierror) &
BIND(C, name="pompi_win_test_f")
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(IN) :: win
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_win_test_f
subroutine pompi_win_unlock_f(rank,win,ierror) &
BIND(C, name="pompi_win_unlock_f")
implicit none
@ -2384,13 +2159,6 @@ subroutine pompi_init_thread_f(required,provided,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_init_thread_f
subroutine pompi_is_thread_main_f(flag,ierror) &
BIND(C, name="pompi_is_thread_main_f")
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_is_thread_main_f
subroutine pompi_query_thread_f(provided,ierror) &
BIND(C, name="pompi_query_thread_f")
implicit none
@ -2398,15 +2166,6 @@ subroutine pompi_query_thread_f(provided,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_query_thread_f
subroutine pompi_status_set_cancelled_f(status,flag,ierror) &
BIND(C, name="pompi_status_set_cancelled_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
TYPE(MPI_Status), INTENT(INOUT) :: status
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_status_set_cancelled_f
subroutine pompi_status_set_elements_f(status,datatype,count,ierror) &
BIND(C, name="pompi_status_set_elements_f")
use :: mpi_f08_types, only : MPI_Status
@ -2444,14 +2203,6 @@ subroutine pompi_file_get_amode_f(fh,amode,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_file_get_amode_f
subroutine pompi_file_get_atomicity_f(fh,flag,ierror) &
BIND(C, name="pompi_file_get_atomicity_f")
implicit none
INTEGER, INTENT(IN) :: fh
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_file_get_atomicity_f
subroutine pompi_file_get_byte_offset_f(fh,offset,disp,ierror) &
BIND(C, name="pompi_file_get_byte_offset_f")
use :: mpi_f08_types, only : MPI_OFFSET_KIND
@ -2777,14 +2528,6 @@ subroutine pompi_file_seek_shared_f(fh,offset,whence,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_file_seek_shared_f
subroutine pompi_file_set_atomicity_f(fh,flag,ierror) &
BIND(C, name="pompi_file_set_atomicity_f")
implicit none
INTEGER, INTENT(IN) :: fh
LOGICAL, INTENT(IN) :: flag
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_file_set_atomicity_f
subroutine pompi_file_set_info_f(fh,info,ierror) &
BIND(C, name="pompi_file_set_info_f")
implicit none
@ -3073,18 +2816,6 @@ subroutine pompi_mprobe_f(source,tag,comm,message,status,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_mprobe_f
subroutine pompi_improbe_f(source,tag,comm,flag,message,status,ierror) &
BIND(C, name="pompi_improbe_f")
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: source, tag
INTEGER, INTENT(IN) :: comm
LOGICAL, INTENT(OUT) :: flag
INTEGER, INTENT(OUT) :: message
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_improbe_f
subroutine pompi_imrecv_f(buf,count,datatype,message,request,ierror) &
BIND(C, name="pompi_imrecv_f")
implicit none

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Cart_create_f08(comm_old,ndims,dims,periods,reorder,comm_cart,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_cart_create_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Cart_create
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: ndims
@ -17,8 +19,7 @@ subroutine PMPI_Cart_create_f08(comm_old,ndims,dims,periods,reorder,comm_cart,ie
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_cart_create_f(comm_old%MPI_VAL,ndims,dims,periods,&
call PMPI_Cart_create(comm_old%MPI_VAL,ndims,dims,periods,&
reorder,comm_cart%MPI_VAL,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Cart_create_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Cart_get_f08(comm,maxdims,dims,periods,coords,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_cart_get_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Cart_get
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, INTENT(IN) :: maxdims
@ -16,7 +18,6 @@ subroutine PMPI_Cart_get_f08(comm,maxdims,dims,periods,coords,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_cart_get_f(comm%MPI_VAL,maxdims,dims,periods,coords,c_ierror)
call PMPI_Cart_get(comm%MPI_VAL,maxdims,dims,periods,coords,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Cart_get_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Cart_map_f08(comm,ndims,dims,periods,newrank,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_cart_map_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Cart_map
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, INTENT(IN) :: ndims, dims(ndims)
@ -16,7 +18,6 @@ subroutine PMPI_Cart_map_f08(comm,ndims,dims,periods,newrank,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_cart_map_f(comm%MPI_VAL,ndims,dims,periods,newrank,c_ierror)
call PMPI_Cart_map(comm%MPI_VAL,ndims,dims,periods,newrank,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Cart_map_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Cart_sub_f08(comm,remain_dims,newcomm,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_cart_sub_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Cart_sub
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
LOGICAL, INTENT(IN) :: remain_dims(*)
@ -15,7 +17,6 @@ subroutine PMPI_Cart_sub_f08(comm,remain_dims,newcomm,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_cart_sub_f(comm%MPI_VAL,remain_dims,newcomm%MPI_VAL,c_ierror)
call PMPI_Cart_sub(comm%MPI_VAL,remain_dims,newcomm%MPI_VAL,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Cart_sub_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Comm_get_attr_f08(comm,comm_keyval,attribute_val,flag,ierror)
use :: mpi_f08_types, only : MPI_Comm, MPI_ADDRESS_KIND
use :: mpi_f08, only : ompi_comm_get_attr_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Comm_get_attr
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, INTENT(IN) :: comm_keyval
@ -16,7 +18,6 @@ subroutine PMPI_Comm_get_attr_f08(comm,comm_keyval,attribute_val,flag,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_comm_get_attr_f(comm%MPI_VAL,comm_keyval,attribute_val,flag,c_ierror)
call PMPI_Comm_get_attr(comm%MPI_VAL,comm_keyval,attribute_val,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Comm_get_attr_f08

Просмотреть файл

@ -1,20 +1,21 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Comm_test_inter_f08(comm,flag,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_comm_test_inter_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Comm_test_inter
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_comm_test_inter_f(comm%MPI_VAL,flag,c_ierror)
call PMPI_Comm_test_inter(comm%MPI_VAL,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Comm_test_inter_f08

Просмотреть файл

@ -1,20 +1,21 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine PMPI_File_get_atomicity_f08(fh,flag,ierror)
use :: mpi_f08_types, only : MPI_File
use :: mpi_f08, only : ompi_file_get_atomicity_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_File_get_atomicity
implicit none
TYPE(MPI_File), INTENT(IN) :: fh
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_file_get_atomicity_f(fh%MPI_VAL,flag,c_ierror)
call PMPI_File_get_atomicity(fh%MPI_VAL,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_File_get_atomicity_f08

Просмотреть файл

@ -1,20 +1,21 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine PMPI_File_set_atomicity_f08(fh,flag,ierror)
use :: mpi_f08_types, only : MPI_File
use :: mpi_f08, only : ompi_file_set_atomicity_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_File_set_atomicity
implicit none
TYPE(MPI_File), INTENT(IN) :: fh
LOGICAL, INTENT(IN) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_file_set_atomicity_f(fh%MPI_VAL,flag,c_ierror)
call PMPI_File_set_atomicity(fh%MPI_VAL,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_File_set_atomicity_f08

Просмотреть файл

@ -1,18 +1,19 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine PMPI_Finalized_f08(flag,ierror)
use :: mpi_f08, only : ompi_finalized_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Finalized
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_finalized_f(flag,c_ierror)
call PMPI_Finalized(flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Finalized_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Graph_create_f08(comm_old,nnodes,index,edges,reorder,comm_graph,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_graph_create_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Graph_create
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm_old
INTEGER, INTENT(IN) :: nnodes
@ -17,8 +19,7 @@ subroutine PMPI_Graph_create_f08(comm_old,nnodes,index,edges,reorder,comm_graph,
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_graph_create_f(comm_old%MPI_VAL,nnodes,index,edges,reorder,&
call PMPI_Graph_create(comm_old%MPI_VAL,nnodes,index,edges,reorder,&
comm_graph%MPI_VAL,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Graph_create_f08

Просмотреть файл

@ -1,13 +1,12 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine PMPI_Improbe_f08(source,tag,comm,flag,message,status,ierror)
use :: mpi_f08_types, only : MPI_Comm, MPI_Message, MPI_Status
use :: mpi_f08, only : ompi_improbe_f
implicit none
INTEGER, INTENT(IN) :: source, tag
TYPE(MPI_Comm), INTENT(IN) :: comm
@ -17,7 +16,22 @@ subroutine PMPI_Improbe_f08(source,tag,comm,flag,message,status,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_improbe_f(source,tag,comm%MPI_VAL,flag,message%MPI_VAL,status,c_ierror)
interface
subroutine PMPI_Improbe(source, tag, comm, flag, message, status, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(in) :: source
integer, intent(in) :: tag
integer, intent(in) :: comm
logical, intent(out) :: flag
integer, intent(out) :: message
type(MPI_STATUS), intent(out) :: status
integer, intent(out) :: ierror
end subroutine PMPI_Improbe
end interface
! See note in ompi/mpi/fortran/use-mpi-f08/iprobe_f09.F90 about why
! we call an PMPI_* subroutine here
call PMPI_Improbe(source,tag,comm%MPI_VAL,flag,message%MPI_VAL,status,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Improbe_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine PMPI_Info_get_f08(info,key,valuelen,value,flag,ierror)
use :: mpi_f08_types, only : MPI_Info
use :: mpi_f08, only : ompi_info_get_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Info_get
implicit none
TYPE(MPI_Info), INTENT(IN) :: info
CHARACTER(LEN=*), INTENT(IN) :: key
@ -17,8 +19,6 @@ subroutine PMPI_Info_get_f08(info,key,valuelen,value,flag,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_info_get_f(info%MPI_VAL,key,valuelen,value,flag,c_ierror, &
len(key),len(value))
call PMPI_Info_get(info%MPI_VAL,key,valuelen,value,flag,c_ierror);
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Info_get_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine PMPI_Info_get_valuelen_f08(info,key,valuelen,flag,ierror)
use :: mpi_f08_types, only : MPI_Info
use :: mpi_f08, only : ompi_info_get_valuelen_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Info_get_valuelen
implicit none
TYPE(MPI_Info), INTENT(IN) :: info
CHARACTER(LEN=*), INTENT(IN) :: key
@ -16,7 +18,6 @@ subroutine PMPI_Info_get_valuelen_f08(info,key,valuelen,flag,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_info_get_valuelen_f(info%MPI_VAL,key,valuelen,flag,c_ierror,len(key))
call PMPI_Info_get_valuelen(info%MPI_VAL,key,valuelen,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Info_get_valuelen_f08

Просмотреть файл

@ -1,18 +1,19 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine PMPI_Initialized_f08(flag,ierror)
use :: mpi_f08, only : ompi_initialized_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Initialized
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_initialized_f(flag,c_ierror)
call PMPI_Initialized(flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Initialized_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Intercomm_merge_f08(intercomm,high,newintracomm,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: mpi_f08, only : ompi_intercomm_merge_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Intercomm_merge
implicit none
TYPE(MPI_Comm), INTENT(IN) :: intercomm
LOGICAL, INTENT(IN) :: high
@ -15,7 +17,6 @@ subroutine PMPI_Intercomm_merge_f08(intercomm,high,newintracomm,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_intercomm_merge_f(intercomm%MPI_VAL,high,newintracomm%MPI_VAL,c_ierror)
call PMPI_Intercomm_merge(intercomm%MPI_VAL,high,newintracomm%MPI_VAL,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Intercomm_merge_f08

Просмотреть файл

@ -1,13 +1,12 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Iprobe_f08(source,tag,comm,flag,status,ierror)
use :: mpi_f08_types, only : MPI_Comm, MPI_Status
use :: mpi_f08, only : ompi_iprobe_f
implicit none
INTEGER, INTENT(IN) :: source, tag
TYPE(MPI_Comm), INTENT(IN) :: comm
@ -16,7 +15,20 @@ subroutine PMPI_Iprobe_f08(source,tag,comm,flag,status,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_iprobe_f(source,tag,comm%MPI_VAL,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Iprobe(source, tag, comm, flag, status, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(in) :: source
integer, intent(in) :: tag
integer, intent(in) :: comm
logical, intent(out) :: flag
TYPE(MPI_Status), intent(out) :: status
integer, intent(out) :: ierror
end subroutine PMPI_Iprobe
end interface
call PMPI_Iprobe(source,tag,comm%MPI_VAL,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Iprobe_f08

Просмотреть файл

@ -1,18 +1,19 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine PMPI_Is_thread_main_f08(flag,ierror)
use :: mpi_f08, only : ompi_is_thread_main_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Is_thread_main
implicit none
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_is_thread_main_f(flag,c_ierror)
call PMPI_Is_thread_main(flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Is_thread_main_f08

Просмотреть файл

@ -1,20 +1,21 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Op_commutative_f08(op,commute,ierror)
use :: mpi_f08_types, only : MPI_Op
use :: mpi_f08, only : ompi_op_commutative_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Op_commutative
implicit none
TYPE(MPI_Op), INTENT(IN) :: op
LOGICAL, INTENT(OUT) :: commute
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_op_commutative_f(op%MPI_VAL,commute,c_ierror)
call PMPI_Op_commutative(op%MPI_VAL,commute,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Op_commutative_f08

Просмотреть файл

@ -1,6 +1,6 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
@ -10,7 +10,9 @@
subroutine PMPI_Op_create_f08(user_fn,commute,op,ierror)
use :: mpi_f08_types, only : MPI_Op
use :: mpi_f08_interfaces_callbacks, only : MPI_User_function
use :: mpi_f08, only : ompi_op_create_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Op_create
implicit none
OMPI_PROCEDURE(MPI_User_function) :: user_fn
LOGICAL, INTENT(IN) :: commute
@ -18,7 +20,6 @@ subroutine PMPI_Op_create_f08(user_fn,commute,op,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_op_create_f(user_fn,commute,op%MPI_VAL,c_ierror)
call PMPI_Op_create(user_fn,commute,op%MPI_VAL,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Op_create_f08

Просмотреть файл

@ -1,13 +1,12 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Request_get_status_f08(request,flag,status,ierror)
use :: mpi_f08_types, only : MPI_Request, MPI_Status
use :: mpi_f08, only : ompi_request_get_status_f
implicit none
TYPE(MPI_Request), INTENT(IN) :: request
LOGICAL, INTENT(OUT) :: flag
@ -15,7 +14,18 @@ subroutine PMPI_Request_get_status_f08(request,flag,status,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_request_get_status_f(request%MPI_VAL,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Request_get_status(request, flag, status, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(in) :: request
logical, intent(out) :: flag
type(MPI_Status), intent(out) :: status
integer, intent(out) :: ierror
end subroutine PMPI_Request_get_status
end interface
call PMPI_Request_get_status(request%MPI_VAL,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Request_get_status_f08

Просмотреть файл

@ -1,20 +1,29 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine PMPI_Status_set_cancelled_f08(status,flag,ierror)
use :: mpi_f08_types, only : MPI_Status
use :: mpi_f08, only : ompi_status_set_cancelled_f
implicit none
TYPE(MPI_Status), INTENT(INOUT) :: status
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_status_set_cancelled_f(status,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine MPI_Status_set_cancelled(status, flag, ierror)
use :: mpi_f08_types, only : MPI_Status
type(MPI_Status), intent(inout) :: status
logical, intent(in) :: flag
integer, intent(out) :: ierror
end subroutine MPI_Status_set_cancelled
end interface
call PMPI_Status_set_cancelled(status,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Status_set_cancelled_f08

Просмотреть файл

@ -1,20 +1,29 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Test_cancelled_f08(status,flag,ierror)
use :: mpi_f08_types, only : MPI_Status
use :: mpi_f08, only : ompi_test_cancelled_f
implicit none
TYPE(MPI_Status), INTENT(IN) :: status
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_test_cancelled_f(status,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Test_cancelled(status, flag, ierror)
use :: mpi_f08_types, only : MPI_Status
type(MPI_Status), intent(in) :: status
logical, intent(out) :: flag
integer, intent(out) :: ierror
end subroutine PMPI_Test_cancelled
end interface
call PMPI_Test_cancelled(status,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Test_cancelled_f08

Просмотреть файл

@ -1,13 +1,12 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Test_f08(request,flag,status,ierror)
use :: mpi_f08_types, only : MPI_Request, MPI_Status
use :: mpi_f08, only : ompi_test_f
implicit none
TYPE(MPI_Request), INTENT(INOUT) :: request
LOGICAL, INTENT(OUT) :: flag
@ -15,7 +14,18 @@ subroutine PMPI_Test_f08(request,flag,status,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_test_f(request%MPI_VAL,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Test(request, flag, status, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(inout) :: request
logical, intent(out) :: flag
TYPE(MPI_Status) :: status
integer, intent(out) :: ierror
end subroutine PMPI_Test
end interface
call PMPI_Test(request%MPI_VAL,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Test_f08

Просмотреть файл

@ -1,13 +1,12 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Testall_f08(count,array_of_requests,flag,array_of_statuses,ierror)
use :: mpi_f08_types, only : MPI_Request, MPI_Status
use :: mpi_f08, only : ompi_testall_f
implicit none
INTEGER, INTENT(IN) :: count
TYPE(MPI_Request), INTENT(INOUT) :: array_of_requests(count)
@ -16,7 +15,19 @@ subroutine PMPI_Testall_f08(count,array_of_requests,flag,array_of_statuses,ierro
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_testall_f(count,array_of_requests(:)%MPI_VAL,flag,array_of_statuses,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Testall(count, array_of_requests, flag, array_of_statuses, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(in) :: count
integer, dimension(count), intent(inout) :: array_of_requests
logical, intent(out) :: flag
type(MPI_Status), dimension(*), intent(out) :: array_of_statuses
integer, intent(out) :: ierror
end subroutine PMPI_Testall
end interface
call PMPI_Testall(count,array_of_requests(:)%MPI_VAL,flag,array_of_statuses,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Testall_f08

Просмотреть файл

@ -1,13 +1,12 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Testany_f08(count,array_of_requests,index,flag,status,ierror)
use :: mpi_f08_types, only : MPI_Request, MPI_Status
use :: mpi_f08, only : ompi_testany_f
implicit none
INTEGER, INTENT(IN) :: count
TYPE(MPI_Request), INTENT(INOUT) :: array_of_requests(count)
@ -17,7 +16,21 @@ subroutine PMPI_Testany_f08(count,array_of_requests,index,flag,status,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_testany_f(count,array_of_requests(:)%MPI_VAL,index,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Testany(count, array_of_requests, index, flag, status&
, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(in) :: count
integer, dimension(count), intent(inout) :: array_of_requests
integer, intent(out) :: index
logical, intent(out) :: flag
type(MPI_Status), intent(out) :: status
integer, intent(out) :: ierror
end subroutine PMPI_Testany
end interface
call PMPI_Testany(count,array_of_requests(:)%MPI_VAL,index,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Testany_f08

Просмотреть файл

@ -1,6 +1,6 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
@ -8,7 +8,6 @@
subroutine PMPI_Testsome_f08(incount,array_of_requests,outcount, &
array_of_indices,array_of_statuses,ierror)
use :: mpi_f08_types, only : MPI_Request, MPI_Status
use :: mpi_f08, only : ompi_testsome_f
implicit none
INTEGER, INTENT(IN) :: incount
TYPE(MPI_Request), INTENT(INOUT) :: array_of_requests(incount)
@ -18,8 +17,22 @@ subroutine PMPI_Testsome_f08(incount,array_of_requests,outcount, &
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_testsome_f(incount,array_of_requests(:)%MPI_VAL,outcount, &
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Testsome(incount, array_of_requests, outcount, array_of_indices, array_of_statuses&
, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(in) :: incount
integer, dimension(incount), intent(inout) :: array_of_requests
integer, intent(out) :: outcount
integer, dimension(*), intent(out) :: array_of_indices
type(MPI_Status), dimension(*), intent(out) :: array_of_statuses
integer, intent(out) :: ierror
end subroutine PMPI_Testsome
end interface
call PMPI_Testsome(incount,array_of_requests(:)%MPI_VAL,outcount, &
array_of_indices,array_of_statuses,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Testsome_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Type_get_attr_f08(type,type_keyval,attribute_val,flag,ierror)
use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND
use :: mpi_f08, only : ompi_type_get_attr_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Type_get_attr
implicit none
TYPE(MPI_Datatype), INTENT(IN) :: type
INTEGER, INTENT(IN) :: type_keyval
@ -16,7 +18,6 @@ subroutine PMPI_Type_get_attr_f08(type,type_keyval,attribute_val,flag,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_type_get_attr_f(type%MPI_VAL,type_keyval,attribute_val,flag,c_ierror)
call PMPI_Type_get_attr(type%MPI_VAL,type_keyval,attribute_val,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Type_get_attr_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine PMPI_Win_get_attr_f08(win,win_keyval,attribute_val,flag,ierror)
use :: mpi_f08_types, only : MPI_Win, MPI_ADDRESS_KIND
use :: mpi_f08, only : ompi_win_get_attr_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Win_get_attr
implicit none
TYPE(MPI_Win), INTENT(IN) :: win
INTEGER, INTENT(IN) :: win_keyval
@ -16,7 +18,6 @@ subroutine PMPI_Win_get_attr_f08(win,win_keyval,attribute_val,flag,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_win_get_attr_f(win%MPI_VAL,win_keyval,attribute_val,flag,c_ierror)
call PMPI_Win_get_attr(win%MPI_VAL,win_keyval,attribute_val,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Win_get_attr_f08

Просмотреть файл

@ -1,20 +1,21 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine PMPI_Win_test_f08(win,flag,ierror)
use :: mpi_f08_types, only : MPI_Win
use :: mpi_f08, only : ompi_win_test_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Win_test
implicit none
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Win), INTENT(IN) :: win
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_win_test_f(win%MPI_VAL,flag,c_ierror)
call PMPI_Win_test(win%MPI_VAL,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine PMPI_Win_test_f08

Просмотреть файл

@ -1,13 +1,12 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Request_get_status_f08(request,flag,status,ierror)
use :: mpi_f08_types, only : MPI_Request, MPI_Status
use :: mpi_f08, only : ompi_request_get_status_f
implicit none
TYPE(MPI_Request), INTENT(IN) :: request
LOGICAL, INTENT(OUT) :: flag
@ -15,7 +14,18 @@ subroutine MPI_Request_get_status_f08(request,flag,status,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_request_get_status_f(request%MPI_VAL,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Request_get_status(request, flag, status, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(in) :: request
logical, intent(out) :: flag
type(MPI_Status), intent(out) :: status
integer, intent(out) :: ierror
end subroutine PMPI_Request_get_status
end interface
call PMPI_Request_get_status(request%MPI_VAL,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Request_get_status_f08

Просмотреть файл

@ -1,20 +1,27 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine MPI_Status_set_cancelled_f08(status,flag,ierror)
use :: mpi_f08_types, only : MPI_Status
use :: mpi_f08, only : ompi_status_set_cancelled_f
implicit none
TYPE(MPI_Status), INTENT(INOUT) :: status
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_status_set_cancelled_f(status,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
interface
subroutine MPI_Status_set_cancelled(status, flag, ierror)
use :: mpi_f08_types, only : MPI_Status
type(MPI_Status), intent(inout) :: status
logical, intent(in) :: flag
integer, intent(out) :: ierror
end subroutine MPI_Status_set_cancelled
end interface
call PMPI_Status_set_cancelled(status,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Status_set_cancelled_f08

Просмотреть файл

@ -1,20 +1,29 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Test_cancelled_f08(status,flag,ierror)
use :: mpi_f08_types, only : MPI_Status
use :: mpi_f08, only : ompi_test_cancelled_f
implicit none
TYPE(MPI_Status), INTENT(IN) :: status
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_test_cancelled_f(status,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Test_cancelled(status, flag, ierror)
use :: mpi_f08_types, only : MPI_Status
type(MPI_Status), intent(in) :: status
logical, intent(out) :: flag
integer, intent(out) :: ierror
end subroutine PMPI_Test_cancelled
end interface
call PMPI_Test_cancelled(status,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Test_cancelled_f08

Просмотреть файл

@ -1,13 +1,12 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Test_f08(request,flag,status,ierror)
use :: mpi_f08_types, only : MPI_Request, MPI_Status
use :: mpi_f08, only : ompi_test_f
implicit none
TYPE(MPI_Request), INTENT(INOUT) :: request
LOGICAL, INTENT(OUT) :: flag
@ -15,7 +14,18 @@ subroutine MPI_Test_f08(request,flag,status,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_test_f(request%MPI_VAL,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Test(request, flag, status, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(inout) :: request
logical, intent(out) :: flag
TYPE(MPI_Status) :: status
integer, intent(out) :: ierror
end subroutine PMPI_Test
end interface
call PMPI_Test(request%MPI_VAL,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Test_f08

Просмотреть файл

@ -1,13 +1,12 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Testall_f08(count,array_of_requests,flag,array_of_statuses,ierror)
use :: mpi_f08_types, only : MPI_Request, MPI_Status
use :: mpi_f08, only : ompi_testall_f
implicit none
INTEGER, INTENT(IN) :: count
TYPE(MPI_Request), INTENT(INOUT) :: array_of_requests(count)
@ -16,7 +15,19 @@ subroutine MPI_Testall_f08(count,array_of_requests,flag,array_of_statuses,ierror
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_testall_f(count,array_of_requests(:)%MPI_VAL,flag,array_of_statuses,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Testall(count, array_of_requests, flag, array_of_statuses, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(in) :: count
integer, dimension(count), intent(inout) :: array_of_requests
logical, intent(out) :: flag
type(MPI_Status), dimension(*), intent(out) :: array_of_statuses
integer, intent(out) :: ierror
end subroutine PMPI_Testall
end interface
call PMPI_Testall(count,array_of_requests(:)%MPI_VAL,flag,array_of_statuses,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Testall_f08

Просмотреть файл

@ -1,13 +1,12 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Testany_f08(count,array_of_requests,index,flag,status,ierror)
use :: mpi_f08_types, only : MPI_Request, MPI_Status
use :: mpi_f08, only : ompi_testany_f
implicit none
INTEGER, INTENT(IN) :: count
TYPE(MPI_Request), INTENT(INOUT) :: array_of_requests(count)
@ -17,7 +16,21 @@ subroutine MPI_Testany_f08(count,array_of_requests,index,flag,status,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_testany_f(count,array_of_requests(:)%MPI_VAL,index,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Testany(count, array_of_requests, index, flag, status&
, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(in) :: count
integer, dimension(count), intent(inout) :: array_of_requests
integer, intent(out) :: index
logical, intent(out) :: flag
type(MPI_Status), intent(out) :: status
integer, intent(out) :: ierror
end subroutine PMPI_Testany
end interface
call PMPI_Testany(count,array_of_requests(:)%MPI_VAL,index,flag,status,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Testany_f08

Просмотреть файл

@ -1,6 +1,6 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
@ -8,7 +8,6 @@
subroutine MPI_Testsome_f08(incount,array_of_requests,outcount, &
array_of_indices,array_of_statuses,ierror)
use :: mpi_f08_types, only : MPI_Request, MPI_Status
use :: mpi_f08, only : ompi_testsome_f
implicit none
INTEGER, INTENT(IN) :: incount
TYPE(MPI_Request), INTENT(INOUT) :: array_of_requests(incount)
@ -18,8 +17,22 @@ subroutine MPI_Testsome_f08(incount,array_of_requests,outcount, &
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_testsome_f(incount,array_of_requests(:)%MPI_VAL,outcount, &
! See note in mpi-f-interfaces-bind.h for why we include an
! interface here and call a PMPI_* subroutine below.
interface
subroutine PMPI_Testsome(incount, array_of_requests, outcount, array_of_indices, array_of_statuses&
, ierror)
use :: mpi_f08_types, only : MPI_Status
integer, intent(in) :: incount
integer, dimension(incount), intent(inout) :: array_of_requests
integer, intent(out) :: outcount
integer, dimension(*), intent(out) :: array_of_indices
type(MPI_Status), dimension(*), intent(out) :: array_of_statuses
integer, intent(out) :: ierror
end subroutine PMPI_Testsome
end interface
call PMPI_Testsome(incount,array_of_requests(:)%MPI_VAL,outcount, &
array_of_indices,array_of_statuses,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Testsome_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Type_get_attr_f08(type,type_keyval,attribute_val,flag,ierror)
use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND
use :: mpi_f08, only : ompi_type_get_attr_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Type_get_attr
implicit none
TYPE(MPI_Datatype), INTENT(IN) :: type
INTEGER, INTENT(IN) :: type_keyval
@ -16,7 +18,6 @@ subroutine MPI_Type_get_attr_f08(type,type_keyval,attribute_val,flag,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_type_get_attr_f(type%MPI_VAL,type_keyval,attribute_val,flag,c_ierror)
call PMPI_Type_get_attr(type%MPI_VAL,type_keyval,attribute_val,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Type_get_attr_f08

Просмотреть файл

@ -1,13 +1,15 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
subroutine MPI_Win_get_attr_f08(win,win_keyval,attribute_val,flag,ierror)
use :: mpi_f08_types, only : MPI_Win, MPI_ADDRESS_KIND
use :: mpi_f08, only : ompi_win_get_attr_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Win_get_attr
implicit none
TYPE(MPI_Win), INTENT(IN) :: win
INTEGER, INTENT(IN) :: win_keyval
@ -16,7 +18,6 @@ subroutine MPI_Win_get_attr_f08(win,win_keyval,attribute_val,flag,ierror)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_win_get_attr_f(win%MPI_VAL,win_keyval,attribute_val,flag,c_ierror)
call PMPI_Win_get_attr(win%MPI_VAL,win_keyval,attribute_val,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Win_get_attr_f08

Просмотреть файл

@ -1,20 +1,21 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$
subroutine MPI_Win_test_f08(win,flag,ierror)
use :: mpi_f08_types, only : MPI_Win
use :: mpi_f08, only : ompi_win_test_f
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
! call a PMPI_* subroutine below.
use :: mpi, only : PMPI_Win_test
implicit none
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Win), INTENT(IN) :: win
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_win_test_f(win%MPI_VAL,flag,c_ierror)
call PMPI_Win_test(win%MPI_VAL,flag,c_ierror)
if (present(ierror)) ierror = c_ierror
end subroutine MPI_Win_test_f08