1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
|
! -*- f90 -*-
!
! Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
!
! This file provides the interface specifications for the MPI Fortran
! API bindings. It effectively maps between public names ("MPI_Init")
! and the name for tools ("MPI_Init_f08") and the back-end implementation
! name (e.g., "MPI_Init_f08").
module mpi_f08_interfaces
interface MPI_Comm_rank
subroutine MPI_Comm_rank_f08(comm,rank,ierror)
use :: mpi_f08_types
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, INTENT(OUT) :: rank
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Comm_rank_f08
end interface MPI_Comm_rank
interface MPI_Comm_size
subroutine MPI_Comm_size_f08(comm,size,ierror)
use :: mpi_f08_types
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, INTENT(OUT) :: size
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Comm_size_f08
end interface MPI_Comm_size
interface MPI_Finalize
subroutine MPI_Finalize_f08(ierror)
use :: mpi_f08_types
implicit none
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Finalize_f08
end interface MPI_Finalize
interface MPI_Init
subroutine MPI_Init_f08(ierror)
use :: mpi_f08_types
implicit none
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Init_f08
end interface MPI_Init
! Note that send/recv only works with specific types for buffers (2D integers)
! Double precision is not implemented at this time but allows compiler to do
! type checking so that MPI_SUBARRAYS_SUPPORTED flag can be utilized in
! test_send_recv.f90.
!
interface MPI_Recv
subroutine MPI_Recv_f08_desc_int_2d(buf,count,datatype,source,tag,comm,status,ierror)
use :: mpi_f08_types
implicit none
INTEGER, INTENT(IN), target :: buf(:,:)
INTEGER, INTENT(IN) :: count, source, tag
TYPE(MPI_Datatype), INTENT(IN) :: datatype
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Status) :: status
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Recv_f08_desc_int_2d
subroutine MPI_Recv_f08_desc_dbl_1d(buf,count,datatype,source,tag,comm,status,ierror)
use :: mpi_f08_types
implicit none
DOUBLE PRECISION, INTENT(IN), target :: buf(:)
INTEGER, INTENT(IN) :: count, source, tag
TYPE(MPI_Datatype), INTENT(IN) :: datatype
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Status) :: status
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Recv_f08_desc_dbl_1d
subroutine MPI_Recv_f08_desc_dbl_0d(buf,count,datatype,source,tag,comm,status,ierror)
use :: mpi_f08_types
implicit none
DOUBLE PRECISION, INTENT(IN), target :: buf
INTEGER, INTENT(IN) :: count, source, tag
TYPE(MPI_Datatype), INTENT(IN) :: datatype
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Status) :: status
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Recv_f08_desc_dbl_0d
end interface MPI_Recv
interface MPI_Send
subroutine MPI_Send_f08_desc_int_2d(buf,count,datatype,dest,tag,comm,ierror)
use :: mpi_f08_types
implicit none
INTEGER, INTENT(IN), target :: buf(:,:)
INTEGER, INTENT(IN) :: count, dest, tag
TYPE(MPI_Datatype), INTENT(IN) :: datatype
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Send_f08_desc_int_2d
subroutine MPI_Send_f08_desc_dbl_1d(buf,count,datatype,dest,tag,comm,ierror)
use :: mpi_f08_types
implicit none
DOUBLE PRECISION, INTENT(IN), target :: buf(:)
INTEGER, INTENT(IN) :: count, dest, tag
TYPE(MPI_Datatype), INTENT(IN) :: datatype
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Send_f08_desc_dbl_1d
subroutine MPI_Send_f08_desc_dbl_0d(buf,count,datatype,dest,tag,comm,ierror)
use :: mpi_f08_types
implicit none
DOUBLE PRECISION, INTENT(IN), target :: buf
INTEGER, INTENT(IN) :: count, dest, tag
TYPE(MPI_Datatype), INTENT(IN) :: datatype
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Send_f08_desc_dbl_0d
end interface MPI_Send
interface MPI_Type_commit
subroutine MPI_Type_commit_f08(datatype,ierror)
use :: mpi_f08_types
implicit none
TYPE(MPI_Datatype), INTENT(INOUT) :: datatype
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Type_commit_f08
end interface MPI_Type_commit
interface MPI_Type_contiguous
subroutine MPI_Type_contiguous_f08(count,oldtype,newtype,ierror)
use :: mpi_f08_types
implicit none
INTEGER, INTENT(IN) :: count
TYPE(MPI_Datatype), INTENT(IN) :: oldtype
TYPE(MPI_Datatype), INTENT(OUT) :: newtype
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Type_contiguous_f08
end interface MPI_Type_contiguous
interface MPI_Type_vector
subroutine MPI_Type_vector_f08(count,blocklength,stride,oldtype,newtype,ierror)
use :: mpi_f08_types
implicit none
INTEGER, INTENT(IN) :: count, blocklength, stride
TYPE(MPI_Datatype), INTENT(IN) :: oldtype
TYPE(MPI_Datatype), INTENT(OUT) :: newtype
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Type_vector_f08
end interface MPI_Type_vector
end module mpi_f08_interfaces
|