Commits

Jeff Squyres committed 20ff2fb

Up to SVN r21489

Comments (0)

Files changed (3)

ompi/mpi/f03/mpi.f03

+!
+! Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
+!                         University Research and Technology
+!                         Corporation.  All rights reserved.
+! Copyright (c) 2004-2005 The University of Tennessee and The University
+!                         of Tennessee Research Foundation.  All rights
+!                         reserved.
+! Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
+!                         University of Stuttgart.  All rights reserved.
+! Copyright (c) 2004-2005 The Regents of the University of California.
+!                         All rights reserved.
+! $COPYRIGHT$
+!
+! Additional copyrights may follow
+!
+! $HEADER$
+!
+!
+! C-interop interfaces for mpi.h
+!
+
+use, intrinsic :: ISO_C_BINDING
+
+
+interface MPI_Abort
+
+integer(C_INT) function &
+MPI_Abort(comm, errorcode, ierr) &
+  BIND(C, name="MPI_Abort")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: errorcode
+end function MPI_Abort
+
+end interface MPI_Abort
+
+
+interface MPI_Accumulate
+
+integer(C_INT) function &
+MPI_Accumulate(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, &
+        op, win, ierr) &
+  BIND(C, name="MPI_Accumulate")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: origin_addr
+  integer(INT_C), value, intent(in) :: origin_count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: origin_datatype
+  integer(INT_C), value, intent(in) :: target_rank
+  integer(kind=MPI_ADDRESS_KIND), value, intent(in) :: target_disp
+  integer(INT_C), value, intent(in) :: target_count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: target_datatype
+  integer(MPI_HANDLE_KIND), value, intent(in) :: op
+  integer(MPI_HANDLE_KIND), value, intent(in) :: win
+end function MPI_Accumulate
+
+end interface MPI_Accumulate
+
+
+interface MPI_Add_error_class
+
+integer(C_INT) function &
+MPI_Add_error_class(errorclass, ierr) &
+  BIND(C, name="MPI_Add_error_class")
+  use MPI_C_BINDING
+  integer(INT_C), value, intent(out) :: errorclass
+end function MPI_Add_error_class
+
+end interface MPI_Add_error_class
+
+
+interface MPI_Add_error_code
+
+integer(C_INT) function &
+MPI_Add_error_code(errorclass, errorcode, ierr) &
+  BIND(C, name="MPI_Add_error_code")
+  use MPI_C_BINDING
+  integer(INT_C), value, intent(in) :: errorclass
+  integer(INT_C), value, intent(out) :: errorcode
+end function MPI_Add_error_code
+
+end interface MPI_Add_error_code
+
+
+interface MPI_Add_error_string
+
+integer(C_INT) function &
+MPI_Add_error_string(errorcode, string, ierr) &
+  BIND(C, name="MPI_Add_error_string")
+  use MPI_C_BINDING
+  integer(INT_C), value, intent(in) :: errorcode
+  character(len=*), value, intent(in) :: string
+end function MPI_Add_error_string
+
+end interface MPI_Add_error_string
+
+
+interface MPI_Address
+
+integer(C_INT) function &
+MPI_Address(location, address, ierr) &
+  BIND(C, name="MPI_Address")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: location
+  integer(kind=MPI_ADDRESS_KIND), value, intent(out) :: address
+end function MPI_Address
+
+end interface MPI_Address
+
+
+interface MPI_Allgather
+
+integer(C_INT) function &
+MPI_Allgather(sendbuf, sendcount, sendtype,
+              recvbuf, recvcount, recvtype,
+              comm, ierr) &
+  BIND(C, name="MPI_Allgather")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: sendbuf
+  integer(INT_C), value, intent(in) :: sendcount
+  integer(MPI_HANDLE_KIND), value, intent(in) :: sendtype
+  type(C_PTR), value, intent(inout) :: recvbuf
+  integer(INT_C), value, intent(in) :: recvcount
+  integer(MPI_HANDLE_KIND), value, intent(in) :: recvtype
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+end function MPI_Allgather
+
+end interface MPI_Allgather
+
+
+interface MPI_Allgatherv
+
+integer(C_INT) function &
+MPI_Allgatherv(sendbuf, sendcount, sendtype,
+               recvbuf, recvcount, recvtype,
+               comm, ierr) &
+  BIND(C, name="MPI_Allgatherv")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: sendbuf
+  integer(INT_C), value, intent(in) :: sendcount
+  integer(MPI_HANDLE_KIND), value, intent(in) :: sendtype
+  type(C_PTR), value, intent(inout) :: recvbuf
+  integer(INT_C), value, intent(in) :: recvcount
+  integer(MPI_HANDLE_KIND), value, intent(in) :: recvtype
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+end function MPI_Allgatherv
+
+end interface MPI_Allgatherv
+
+
+interface MPI_Alloc_mem
+
+integer(C_INT) function &
+MPI_Alloc_mem(size, info, baseptr, ierr) &
+  BIND(C, name="MPI_Alloc_mem")
+  use MPI_C_BINDING
+  integer(kind=MPI_ADDRESS_KIND), value, intent(in) :: size
+  integer(MPI_HANDLE_KIND), value, intent(in) :: info
+  type(C_PTR), value, intent(out) :: baseptr
+end function MPI_Alloc_mem
+
+end interface MPI_Alloc_mem
+
+
+interface MPI_Allreduce
+
+integer(C_INT) function &
+MPI_Allreduce(sendbuf, recvbuf, count,
+              datatype, op, comm, ierr) &
+  BIND(C, name="MPI_Allreduce")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: sendbuf
+  type(C_PTR), value, intent(inout) :: recvbuf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_HANDLE_KIND), value, intent(in) :: op
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+end function MPI_Allreduce
+
+end interface MPI_Allreduce
+
+
+interface MPI_Alltoall
+
+integer(C_INT) function &
+MPI_Alltoall(sendbuf, sendcount, sendtype,
+             recvbuf, recvcount, recvtype,
+             comm, ierr) &
+  BIND(C, name="MPI_Alltoall")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: sendbuf
+  integer(INT_C), value, intent(in) :: sendcount
+  integer(MPI_HANDLE_KIND), value, intent(in) :: sendtype
+  type(C_PTR), value, intent(out) :: recvbuf
+  integer(INT_C), value, intent(in) :: recvcount
+  integer(MPI_HANDLE_KIND), value, intent(in) :: recvtype
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+end function MPI_Alltoall
+
+end interface MPI_Alltoall
+
+
+interface MPI_Alltoallv
+
+integer(C_INT) function &
+MPI_Alltoallv(sendbuf, sendcount, sdispls, sendtype,
+              recvbuf, recvcount, rdispls, recvtype,
+              comm, ierr) &
+  BIND(C, name="MPI_Alltoallv")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: sendbuf
+  integer(INT_C), dimension(*), value, intent(in) :: sendcount
+  integer(INT_C), dimension(*), value, intent(in) :: sdispls
+  integer(MPI_HANDLE_KIND), value, intent(in) :: sendtype
+  type(C_PTR), value, intent(out) :: recvbuf
+  integer(INT_C), dimension(*), value, intent(in) :: recvcount
+  integer(INT_C), dimension(*), value, intent(in) :: rdispls
+  integer(MPI_HANDLE_KIND), value, intent(in) :: recvtype
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+end function MPI_Alltoallv
+
+end interface MPI_Alltoallv
+
+
+interface MPI_Alltoallw
+
+integer(C_INT) function &
+MPI_Alltoallw(sendbuf, sendcounts, sdispls, sendtypes,
+              recvbuf, recvcounts, rdispls, recvtypes,
+              comm, ierr) &
+  BIND(C, name="MPI_Alltoallw")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: sendbuf
+  integer(INT_C), dimension(*), value, intent(in) :: sendcounts
+  integer(INT_C), dimension(*), value, intent(in) :: sdispls
+  integer(MPI_HANDLE_KIND), dimension(*), value, intent(in) :: sendtypes
+  type(C_PTR), value, intent(out) :: recvbuf
+  integer(INT_C), dimension(*), value, intent(in) :: recvcounts
+  integer(INT_C), dimension(*), value, intent(in) :: rdispls
+  integer(MPI_HANDLE_KIND), dimension(*), value, intent(in) :: recvtypes
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+end function MPI_Alltoallw
+
+end interface MPI_Alltoallw
+
+
+interface MPI_Attr_delete
+
+integer(C_INT) function &
+MPI_Attr_delete(comm, keyval, ierr) &
+  BIND(C, name="MPI_Attr_delete")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: keyval
+end function MPI_Attr_delete
+
+end interface MPI_Attr_delete
+
+
+interface MPI_Attr_get
+
+integer(C_INT) function &
+MPI_Attr_get(comm, keyval, attribute_val, flag, ierr) &
+  BIND(C, name="MPI_Attr_get")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: keyval
+  integer(C_INT), value, intent(out) :: attribute_val
+  integer, value, intent(out) :: flag
+end function MPI_Attr_get
+
+end interface MPI_Attr_get
+
+
+interface MPI_Attr_put
+
+integer(C_INT) function &
+MPI_Attr_put(comm, keyval, attribute_val, ierr) &
+  BIND(C, name="MPI_Attr_put")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: keyval
+  integer(C_INT), value, intent(in) :: attribute_val
+end function MPI_Attr_put
+
+end interface MPI_Attr_put
+
+
+interface MPI_Barrier
+
+integer(C_INT) function &
+MPI_Barrier(comm, ierr) &
+  BIND(C, name="MPI_Barrier")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+end function MPI_Barrier
+
+end interface MPI_Barrier
+
+
+interface MPI_Bcast
+
+integer(C_INT) function &
+MPI_Bcast(buffer, count, datatype, root, comm, ierr) &
+  BIND(C, name="MPI_Bcast")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(inout) :: buffer
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(INT_C), value, intent(in) :: root
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+end function MPI_Bcast
+
+end interface MPI_Bcast
+
+
+interface MPI_Bsend
+
+integer(C_INT) function &
+MPI_Bsend(buf, count, datatype, dest, tag, comm, ierr) &
+  BIND(C, name="MPI_Bsend")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(INT_C), value, intent(in) :: dest
+  integer(INT_C), value, intent(in) :: tag
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+end function MPI_Bsend
+
+end interface MPI_Bsend
+
+
+interface MPI_Bsend_init
+
+integer(C_INT) function &
+MPI_Bsend_init(buf, count, datatype, dest, tag, comm, request&
+        , ierr) &
+  BIND(C, name="MPI_Bsend_init")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(INT_C), value, intent(in) :: dest
+  integer(INT_C), value, intent(in) :: tag
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(out) :: request
+end function MPI_Bsend_init
+
+end interface MPI_Bsend_init
+
+
+interface MPI_Buffer_attach
+
+integer(C_INT) function &
+MPI_Buffer_attach(buffer, size, ierr) &
+  BIND(C, name="MPI_Buffer_attach")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: buffer
+  integer(INT_C), value, intent(in) :: size
+end function MPI_Buffer_attach
+
+end interface MPI_Buffer_attach
+
+
+interface MPI_Buffer_detach
+
+integer(C_INT) function &
+MPI_Buffer_detach(buffer, size, ierr) &
+  BIND(C, name="MPI_Buffer_detach")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(out) :: buffer
+  integer(INT_C), value, intent(out) :: size
+end function MPI_Buffer_detach
+
+end interface MPI_Buffer_detach
+
+
+interface MPI_Cancel
+
+integer(C_INT) function &
+MPI_Cancel(request, ierr) &
+  BIND(C, name="MPI_Cancel")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: request
+end function MPI_Cancel
+
+end interface MPI_Cancel
+
+
+interface MPI_Cart_coords
+
+integer(C_INT) function &
+MPI_Cart_coords(comm, rank, maxdims, coords, ierr) &
+  BIND(C, name="MPI_Cart_coords")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: rank
+  integer(INT_C), value, intent(in) :: maxdims
+  integer(INT_C), dimension(*), value, intent(out) :: coords
+end function MPI_Cart_coords
+
+end interface MPI_Cart_coords
+
+
+interface MPI_Cart_create
+
+integer(C_INT) function &
+MPI_Cart_create(old_comm, ndims, dims, periods, reorder, comm_cart, ierr) &
+  BIND(C, name="MPI_Cart_create")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: old_comm
+  integer(INT_C), value, intent(in) :: ndims
+  integer(INT_C), dimension(*), value, intent(in) :: dims
+  integer(INT_C), dimension(*), value, intent(in) :: periods
+  integer(INT_C), value, intent(in) :: reorder
+  integer(MPI_HANDLE_KIND), value, intent(out) :: comm_cart
+end function MPI_Cart_create
+
+end interface MPI_Cart_create
+
+
+interface MPI_Cart_get
+
+integer(C_INT) function &
+MPI_Cart_get(comm, maxdims, dims, periods, coords, ierr) &
+  BIND(C, name="MPI_Cart_get")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: maxdims
+  integer(INT_C), dimension(*), value, intent(out) :: dims
+  integer(INT_C), dimension(*), value, intent(out) :: periods
+  integer(INT_C), dimension(*), value, intent(out) :: coords
+end function MPI_Cart_get
+
+end interface MPI_Cart_get
+
+
+interface MPI_Cart_map
+
+integer(C_INT) function &
+MPI_Cart_map(comm, ndims, dims, periods, newrank, ierr) &
+  BIND(C, name="MPI_Cart_map")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: ndims
+  integer(INT_C), dimension(*), value, intent(in) :: dims
+  integer(INT_C), dimension(*), value, intent(in) :: periods
+  integer(INT_C), value, intent(out) :: newrank
+end function MPI_Cart_map
+
+end interface MPI_Cart_map
+
+
+interface MPI_Cart_rank
+
+integer(C_INT) function &
+MPI_Cart_rank(comm, coords, rank, ierr) &
+  BIND(C, name="MPI_Cart_rank")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), dimension(*), value, intent(in) :: coords
+  integer(INT_C), value, intent(out) :: rank
+end function MPI_Cart_rank
+
+end interface MPI_Cart_rank
+
+
+interface MPI_Cart_shift
+
+integer(C_INT) function &
+MPI_Cart_shift(comm, direction, disp, rank_source, rank_dest, ierr) &
+  BIND(C, name="MPI_Cart_shift")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: direction
+  integer(INT_C), value, intent(in) :: disp
+  integer(INT_C), value, intent(out) :: rank_source
+  integer(INT_C), value, intent(out) :: rank_dest
+end function MPI_Cart_shift
+
+end interface MPI_Cart_shift
+
+
+interface MPI_Cart_sub
+
+integer(C_INT) function &
+MPI_Cart_sub(comm, remain_dims, new_comm, ierr) &
+  BIND(C, name="MPI_Cart_sub")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer, dimension(*), value, intent(in) :: remain_dims
+  integer(MPI_HANDLE_KIND), value, intent(out) :: new_comm
+end function MPI_Cart_sub
+
+end interface MPI_Cart_sub
+
+
+interface MPI_Cartdim_get
+
+integer(C_INT) function &
+MPI_Cartdim_get(comm, ndims, ierr) &
+  BIND(C, name="MPI_Cartdim_get")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(out) :: ndims
+end function MPI_Cartdim_get
+
+end interface MPI_Cartdim_get
+
+
+interface MPI_Close_port
+
+integer(C_INT) function &
+MPI_Close_port(port_name, ierr) &
+  BIND(C, name="MPI_Close_port")
+  use MPI_C_BINDING
+  character(len=*), value, intent(in) :: port_name
+end function MPI_Close_port
+
+end interface MPI_Close_port
+
+
+interface MPI_Comm_accept
+
+integer(C_INT) function &
+MPI_Comm_accept(port_name, info, root, comm, newcomm, ierr) &
+  BIND(C, name="MPI_Comm_accept")
+  use MPI_C_BINDING
+  character(len=*), value, intent(in) :: port_name
+  integer(MPI_HANDLE_KIND), value, intent(in) :: info
+  integer(INT_C), value, intent(in) :: root
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(out) :: newcomm
+end function MPI_Comm_accept
+
+end interface MPI_Comm_accept
+
+
+interface MPI_Comm_call_errhandler
+
+integer(C_INT) function &
+MPI_Comm_call_errhandler(comm, errorcode, ierr) &
+  BIND(C, name="MPI_Comm_call_errhandler")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: errorcode
+end function MPI_Comm_call_errhandler
+
+end interface MPI_Comm_call_errhandler
+
+
+interface MPI_Comm_compare
+
+integer(C_INT) function &
+MPI_Comm_compare(comm1, comm2, result, ierr) &
+  BIND(C, name="MPI_Comm_compare")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm1
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm2
+  integer(INT_C), value, intent(out) :: result
+end function MPI_Comm_compare
+
+end interface MPI_Comm_compare
+
+
+interface MPI_Comm_connect
+
+integer(C_INT) function &
+MPI_Comm_connect(port_name, info, root, comm, newcomm, ierr) &
+  BIND(C, name="MPI_Comm_connect")
+  use MPI_C_BINDING
+  character(len=*), value, intent(in) :: port_name
+  integer(MPI_HANDLE_KIND), value, intent(in) :: info
+  integer(INT_C), value, intent(in) :: root
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(out) :: newcomm
+end function MPI_Comm_connect
+
+end interface MPI_Comm_connect
+
+
+interface MPI_Comm_create
+
+integer(C_INT) function &
+MPI_Comm_create(comm, group, newcomm, ierr) &
+  BIND(C, name="MPI_Comm_create")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group
+  integer(MPI_HANDLE_KIND), value, intent(out) :: newcomm
+end function MPI_Comm_create
+
+end interface MPI_Comm_create
+
+
+interface MPI_Comm_create_errhandler
+
+integer(C_INT) function &
+MPI_Comm_create_errhandler(function, errhandler, ierr) &
+  BIND(C, name="MPI_Comm_create_errhandler")
+  use MPI_C_BINDING
+  external :: function
+  integer(MPI_HANDLE_KIND), value, intent(out) :: errhandler
+end function MPI_Comm_create_errhandler
+
+end interface MPI_Comm_create_errhandler
+
+
+interface MPI_Comm_create_keyval
+
+integer(C_INT) function &
+MPI_Comm_create_keyval(comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state, ierr) &
+  BIND(C, name="MPI_Comm_create_keyval")
+  use MPI_C_BINDING
+  external :: comm_copy_attr_fn
+  external :: comm_delete_attr_fn
+  integer(INT_C), value, intent(out) :: comm_keyval
+  integer(C_INT), value, intent(in) :: extra_state
+end function MPI_Comm_create_keyval
+
+end interface MPI_Comm_create_keyval
+
+
+interface MPI_Comm_delete_attr
+
+integer(C_INT) function &
+MPI_Comm_delete_attr(comm, comm_keyval, ierr) &
+  BIND(C, name="MPI_Comm_delete_attr")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: comm
+  integer(INT_C), value, intent(in) :: comm_keyval
+end function MPI_Comm_delete_attr
+
+end interface MPI_Comm_delete_attr
+
+
+interface MPI_Comm_disconnect
+
+integer(C_INT) function &
+MPI_Comm_disconnect(comm, ierr) &
+  BIND(C, name="MPI_Comm_disconnect")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: comm
+end function MPI_Comm_disconnect
+
+end interface MPI_Comm_disconnect
+
+
+interface MPI_Comm_dup
+
+integer(C_INT) function &
+MPI_Comm_dup(comm, newcomm, ierr) &
+  BIND(C, name="MPI_Comm_dup")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(out) :: newcomm
+end function MPI_Comm_dup
+
+end interface MPI_Comm_dup
+
+
+interface MPI_Comm_free
+
+integer(C_INT) function &
+MPI_Comm_free(comm, ierr) &
+  BIND(C, name="MPI_Comm_free")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: comm
+end function MPI_Comm_free
+
+end interface MPI_Comm_free
+
+
+interface MPI_Comm_free_keyval
+
+integer(C_INT) function &
+MPI_Comm_free_keyval(comm_keyval, ierr) &
+  BIND(C, name="MPI_Comm_free_keyval")
+  use MPI_C_BINDING
+  integer(INT_C), value, intent(inout) :: comm_keyval
+end function MPI_Comm_free_keyval
+
+end interface MPI_Comm_free_keyval
+
+
+interface MPI_Comm_get_attr
+
+integer(C_INT) function &
+MPI_Comm_get_attr(comm, comm_keyval, attribute_val, flag, ierr) &
+  BIND(C, name="MPI_Comm_get_attr")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: comm_keyval
+  type(C_PTR), value, intent(out) :: attribute_val
+  integer, value, intent(out) :: flag
+end function MPI_Comm_get_attr
+
+end interface MPI_Comm_get_attr
+
+
+interface MPI_Comm_get_errhandler
+
+integer(C_INT) function &
+MPI_Comm_get_errhandler(comm, erhandler, ierr) &
+  BIND(C, name="MPI_Comm_get_errhandler")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(out) :: erhandler
+end function MPI_Comm_get_errhandler
+
+end interface MPI_Comm_get_errhandler
+
+
+interface MPI_Comm_get_name
+
+integer(C_INT) function &
+MPI_Comm_get_name(comm, comm_name, resultlen, ierr) &
+  BIND(C, name="MPI_Comm_get_name")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  character(len=*), value, intent(out) :: comm_name
+  integer(INT_C), value, intent(out) :: resultlen
+end function MPI_Comm_get_name
+
+end interface MPI_Comm_get_name
+
+
+interface MPI_Comm_get_parent
+
+integer(C_INT) function &
+MPI_Comm_get_parent(parent, ierr) &
+  BIND(C, name="MPI_Comm_get_parent")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(out) :: parent
+end function MPI_Comm_get_parent
+
+end interface MPI_Comm_get_parent
+
+
+interface MPI_Comm_group
+
+integer(C_INT) function &
+MPI_Comm_group(comm, group, ierr) &
+  BIND(C, name="MPI_Comm_group")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(out) :: group
+end function MPI_Comm_group
+
+end interface MPI_Comm_group
+
+
+interface MPI_Comm_join
+
+integer(C_INT) function &
+MPI_Comm_join(fd, intercomm, ierr) &
+  BIND(C, name="MPI_Comm_join")
+  use MPI_C_BINDING
+  integer(INT_C), value, intent(in) :: fd
+  integer(MPI_HANDLE_KIND), value, intent(out) :: intercomm
+end function MPI_Comm_join
+
+end interface MPI_Comm_join
+
+
+interface MPI_Comm_rank
+
+integer(C_INT) function &
+MPI_Comm_rank(comm, rank, ierr) &
+  BIND(C, name="MPI_Comm_rank")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(out) :: rank
+end function MPI_Comm_rank
+
+end interface MPI_Comm_rank
+
+
+interface MPI_Comm_remote_group
+
+integer(C_INT) function &
+MPI_Comm_remote_group(comm, group, ierr) &
+  BIND(C, name="MPI_Comm_remote_group")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(out) :: group
+end function MPI_Comm_remote_group
+
+end interface MPI_Comm_remote_group
+
+
+interface MPI_Comm_remote_size
+
+integer(C_INT) function &
+MPI_Comm_remote_size(comm, size, ierr) &
+  BIND(C, name="MPI_Comm_remote_size")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(out) :: size
+end function MPI_Comm_remote_size
+
+end interface MPI_Comm_remote_size
+
+
+interface MPI_Comm_set_attr
+
+integer(C_INT) function &
+MPI_Comm_set_attr(comm, comm_keyval, attribute_val, ierr) &
+  BIND(C, name="MPI_Comm_set_attr")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: comm_keyval
+  type(C_PTR), value, intent(in) :: attribute_val
+end function MPI_Comm_set_attr
+
+end interface MPI_Comm_set_attr
+
+
+interface MPI_Comm_set_errhandler
+
+integer(C_INT) function &
+MPI_Comm_set_errhandler(comm, errhandler, ierr) &
+  BIND(C, name="MPI_Comm_set_errhandler")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(in) :: errhandler
+end function MPI_Comm_set_errhandler
+
+end interface MPI_Comm_set_errhandler
+
+
+interface MPI_Comm_set_name
+
+integer(C_INT) function &
+MPI_Comm_set_name(comm, comm_name, ierr) &
+  BIND(C, name="MPI_Comm_set_name")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: comm
+  character(len=*), value, intent(in) :: comm_name
+end function MPI_Comm_set_name
+
+end interface MPI_Comm_set_name
+
+
+interface MPI_Comm_size
+
+integer(C_INT) function &
+MPI_Comm_size(comm, size, ierr) &
+  BIND(C, name="MPI_Comm_size")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(out) :: size
+end function MPI_Comm_size
+
+end interface MPI_Comm_size
+
+
+interface MPI_Comm_spawn
+
+integer(C_INT) function &
+MPI_Comm_spawn(command, argv, maxprocs, info, root, comm, intercomm, &
+        array_of_errcodes, ierr) &
+  BIND(C, name="MPI_Comm_spawn")
+  use MPI_C_BINDING
+  character(len=*), value, intent(in) :: command
+  character(len=*), dimension(*), value, intent(in) :: argv
+  integer(INT_C), value, intent(in) :: maxprocs
+  integer(MPI_HANDLE_KIND), value, intent(in) :: info
+  integer(INT_C), value, intent(in) :: root
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(out) :: intercomm
+  integer(INT_C), dimension(*), value, intent(out) :: array_of_errcodes
+end function MPI_Comm_spawn
+
+end interface MPI_Comm_spawn
+
+
+interface MPI_Comm_spawn_multiple
+
+integer(C_INT) function &
+MPI_Comm_spawn_multiple(count, array_of_commands, array_of_argv, array_of_maxprocs, array_of_info, root, comm, &
+        intercomm, array_of_errcodes, ierr) &
+  BIND(C, name="MPI_Comm_spawn_multiple")
+  use MPI_C_BINDING
+  integer(INT_C), value, intent(in) :: count
+  character(len=*), dimension(*), value, intent(in) :: array_of_commands
+  character(len=*), dimension(count,*), value, intent(in) :: array_of_argv
+  integer(INT_C), dimension(*), value, intent(in) :: array_of_maxprocs
+  integer(MPI_HANDLE_KIND), dimension(*), value, intent(in) :: array_of_info
+  integer(INT_C), value, intent(in) :: root
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(out) :: intercomm
+  integer(INT_C), dimension(*), value, intent(out) :: array_of_errcodes
+end function MPI_Comm_spawn_multiple
+
+end interface MPI_Comm_spawn_multiple
+
+
+interface MPI_Comm_split
+
+integer(C_INT) function &
+MPI_Comm_split(comm, color, key, newcomm, ierr) &
+  BIND(C, name="MPI_Comm_split")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: color
+  integer(INT_C), value, intent(in) :: key
+  integer(MPI_HANDLE_KIND), value, intent(out) :: newcomm
+end function MPI_Comm_split
+
+end interface MPI_Comm_split
+
+
+interface MPI_Comm_test_inter
+
+integer(C_INT) function &
+MPI_Comm_test_inter(comm, flag, ierr) &
+  BIND(C, name="MPI_Comm_test_inter")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: comm
+  integer, value, intent(in) :: flag
+end function MPI_Comm_test_inter
+
+end interface MPI_Comm_test_inter
+
+
+interface MPI_Dims_create
+
+integer(C_INT) function &
+MPI_Dims_create(nnodes, ndims, dims, ierr) &
+  BIND(C, name="MPI_Dims_create")
+  use MPI_C_BINDING
+  integer(INT_C), value, intent(in) :: nnodes
+  integer(INT_C), value, intent(in) :: ndims
+  integer(INT_C), dimension(*), value, intent(inout) :: dims
+end function MPI_Dims_create
+
+end interface MPI_Dims_create
+
+
+interface MPI_Errhandler_create
+
+integer(C_INT) function &
+MPI_Errhandler_create(function, errhandler, ierr) &
+  BIND(C, name="MPI_Errhandler_create")
+  use MPI_C_BINDING
+  external :: function
+  integer(MPI_HANDLE_KIND), value, intent(out) :: errhandler
+end function MPI_Errhandler_create
+
+end interface MPI_Errhandler_create
+
+
+interface MPI_Errhandler_free
+
+integer(C_INT) function &
+MPI_Errhandler_free(errhandler, ierr) &
+  BIND(C, name="MPI_Errhandler_free")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: errhandler
+end function MPI_Errhandler_free
+
+end interface MPI_Errhandler_free
+
+
+interface MPI_Errhandler_get
+
+integer(C_INT) function &
+MPI_Errhandler_get(comm, errhandler, ierr) &
+  BIND(C, name="MPI_Errhandler_get")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(out) :: errhandler
+end function MPI_Errhandler_get
+
+end interface MPI_Errhandler_get
+
+
+interface MPI_Errhandler_set
+
+integer(C_INT) function &
+MPI_Errhandler_set(comm, errhandler, ierr) &
+  BIND(C, name="MPI_Errhandler_set")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(MPI_HANDLE_KIND), value, intent(in) :: errhandler
+end function MPI_Errhandler_set
+
+end interface MPI_Errhandler_set
+
+
+interface MPI_Error_class
+
+integer(C_INT) function &
+MPI_Error_class(errorcode, errorclass, ierr) &
+  BIND(C, name="MPI_Error_class")
+  use MPI_C_BINDING
+  integer(INT_C), value, intent(in) :: errorcode
+  integer(INT_C), value, intent(out) :: errorclass
+end function MPI_Error_class
+
+end interface MPI_Error_class
+
+
+interface MPI_Error_string
+
+integer(C_INT) function &
+MPI_Error_string(errorcode, string, resultlen, ierr) &
+  BIND(C, name="MPI_Error_string")
+  use MPI_C_BINDING
+  integer(INT_C), value, intent(in) :: errorcode
+  character(len=*), value, intent(out) :: string
+  integer(INT_C), value, intent(out) :: resultlen
+end function MPI_Error_string
+
+end interface MPI_Error_string
+
+
+interface MPI_Exscan
+
+integer(C_INT) function &
+MPI_Exscan(sendbuf, recvbuf, count,
+           datatype, op, comm, ierr) &
+  BIND(C, name="MPI_Exscan")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: sendbuf
+  type(C_PTR), value, intent(out) :: recvbuf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_HANDLE_KIND), value, intent(in) :: op
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+end function MPI_Exscan
+
+end interface MPI_Exscan
+
+
+interface MPI_File_call_errhandler
+
+integer(C_INT) function &
+MPI_File_call_errhandler(fh, errorcode, ierr) &
+  BIND(C, name="MPI_File_call_errhandler")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(INT_C), value, intent(in) :: errorcode
+end function MPI_File_call_errhandler
+
+end interface MPI_File_call_errhandler
+
+
+interface MPI_File_close
+
+integer(C_INT) function &
+MPI_File_close(fh, ierr) &
+  BIND(C, name="MPI_File_close")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+end function MPI_File_close
+
+end interface MPI_File_close
+
+
+interface MPI_File_create_errhandler
+
+integer(C_INT) function &
+MPI_File_create_errhandler(function, errhandler, ierr) &
+  BIND(C, name="MPI_File_create_errhandler")
+  use MPI_C_BINDING
+  external :: function
+  integer(MPI_HANDLE_KIND), value, intent(out) :: errhandler
+end function MPI_File_create_errhandler
+
+end interface MPI_File_create_errhandler
+
+
+interface MPI_File_delete
+
+integer(C_INT) function &
+MPI_File_delete(filename, info, ierr) &
+  BIND(C, name="MPI_File_delete")
+  use MPI_C_BINDING
+  character(len=*), value, intent(in) :: filename
+  integer(MPI_HANDLE_KIND), value, intent(in) :: info
+end function MPI_File_delete
+
+end interface MPI_File_delete
+
+
+interface MPI_File_get_amode
+
+integer(C_INT) function &
+MPI_File_get_amode(fh, amode, ierr) &
+  BIND(C, name="MPI_File_get_amode")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(INT_C), value, intent(out) :: amode
+end function MPI_File_get_amode
+
+end interface MPI_File_get_amode
+
+
+interface MPI_File_get_atomicity
+
+integer(C_INT) function &
+MPI_File_get_atomicity(fh, flag, ierr) &
+  BIND(C, name="MPI_File_get_atomicity")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer, value, intent(out) :: flag
+end function MPI_File_get_atomicity
+
+end interface MPI_File_get_atomicity
+
+
+interface MPI_File_get_byte_offset
+
+integer(C_INT) function &
+MPI_File_get_byte_offset(fh, offset, disp, ierr) &
+  BIND(C, name="MPI_File_get_byte_offset")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: offset
+  integer(kind=MPI_OFFSET_KIND), value, intent(out) :: disp
+end function MPI_File_get_byte_offset
+
+end interface MPI_File_get_byte_offset
+
+
+interface MPI_File_get_errhandler
+
+integer(C_INT) function &
+MPI_File_get_errhandler(file, errhandler, ierr) &
+  BIND(C, name="MPI_File_get_errhandler")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: file
+  integer(MPI_HANDLE_KIND), value, intent(out) :: errhandler
+end function MPI_File_get_errhandler
+
+end interface MPI_File_get_errhandler
+
+
+interface MPI_File_get_group
+
+integer(C_INT) function &
+MPI_File_get_group(fh, group, ierr) &
+  BIND(C, name="MPI_File_get_group")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(MPI_HANDLE_KIND), value, intent(out) :: group
+end function MPI_File_get_group
+
+end interface MPI_File_get_group
+
+
+interface MPI_File_get_info
+
+integer(C_INT) function &
+MPI_File_get_info(fh, info_used, ierr) &
+  BIND(C, name="MPI_File_get_info")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(MPI_HANDLE_KIND), value, intent(out) :: info_used
+end function MPI_File_get_info
+
+end interface MPI_File_get_info
+
+
+interface MPI_File_get_position
+
+integer(C_INT) function &
+MPI_File_get_position(fh, offset, ierr) &
+  BIND(C, name="MPI_File_get_position")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(out) :: offset
+end function MPI_File_get_position
+
+end interface MPI_File_get_position
+
+
+interface MPI_File_get_position_shared
+
+integer(C_INT) function &
+MPI_File_get_position_shared(fh, offset, ierr) &
+  BIND(C, name="MPI_File_get_position_shared")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(out) :: offset
+end function MPI_File_get_position_shared
+
+end interface MPI_File_get_position_shared
+
+
+interface MPI_File_get_size
+
+integer(C_INT) function &
+MPI_File_get_size(fh, size, ierr) &
+  BIND(C, name="MPI_File_get_size")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(out) :: size
+end function MPI_File_get_size
+
+end interface MPI_File_get_size
+
+
+interface MPI_File_get_type_extent
+
+integer(C_INT) function &
+MPI_File_get_type_extent(fh, datatype, extent, ierr) &
+  BIND(C, name="MPI_File_get_type_extent")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(kind=MPI_ADDRESS_KIND), value, intent(out) :: extent
+end function MPI_File_get_type_extent
+
+end interface MPI_File_get_type_extent
+
+
+interface MPI_File_get_view
+
+integer(C_INT) function &
+MPI_File_get_view(fh, disp, etype, filetype, datarep, ierr) &
+  BIND(C, name="MPI_File_get_view")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(out) :: disp
+  integer(MPI_HANDLE_KIND), value, intent(out) :: etype
+  integer(MPI_HANDLE_KIND), value, intent(out) :: filetype
+  character(len=*), value, intent(out) :: datarep
+end function MPI_File_get_view
+
+end interface MPI_File_get_view
+
+
+interface MPI_File_iread
+
+integer(C_INT) function &
+MPI_File_iread(fh, buf, count, datatype, request, ierr) &
+  BIND(C, name="MPI_File_iread")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(out) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_HANDLE_KIND), value, intent(out) :: request
+end function MPI_File_iread
+
+end interface MPI_File_iread
+
+
+interface MPI_File_iread_at
+
+integer(C_INT) function &
+MPI_File_iread_at(fh, offset, buf, count, datatype, request, ierr) &
+  BIND(C, name="MPI_File_iread_at")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: offset
+  type(C_PTR), value, intent(out) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_HANDLE_KIND), value, intent(out) :: request
+end function MPI_File_iread_at
+
+end interface MPI_File_iread_at
+
+
+interface MPI_File_iread_shared
+
+integer(C_INT) function &
+MPI_File_iread_shared(fh, buf, count, datatype, request, ierr) &
+  BIND(C, name="MPI_File_iread_shared")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(out) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_HANDLE_KIND), value, intent(out) :: request
+end function MPI_File_iread_shared
+
+end interface MPI_File_iread_shared
+
+
+interface MPI_File_iwrite
+
+integer(C_INT) function &
+MPI_File_iwrite(fh, buf, count, datatype, request, ierr) &
+  BIND(C, name="MPI_File_iwrite")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_HANDLE_KIND), value, intent(out) :: request
+end function MPI_File_iwrite
+
+end interface MPI_File_iwrite
+
+
+interface MPI_File_iwrite_at
+
+integer(C_INT) function &
+MPI_File_iwrite_at(fh, offset, buf, count, datatype, request, ierr) &
+  BIND(C, name="MPI_File_iwrite_at")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: offset
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_HANDLE_KIND), value, intent(out) :: request
+end function MPI_File_iwrite_at
+
+end interface MPI_File_iwrite_at
+
+
+interface MPI_File_iwrite_shared
+
+integer(C_INT) function &
+MPI_File_iwrite_shared(fh, buf, count, datatype, request, ierr) &
+  BIND(C, name="MPI_File_iwrite_shared")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_HANDLE_KIND), value, intent(out) :: request
+end function MPI_File_iwrite_shared
+
+end interface MPI_File_iwrite_shared
+
+
+interface MPI_File_open
+
+integer(C_INT) function &
+MPI_File_open(comm, filename, amode, info, fh, ierr) &
+  BIND(C, name="MPI_File_open")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  character(len=*), value, intent(in) :: filename
+  integer(INT_C), value, intent(in) :: amode
+  integer(MPI_HANDLE_KIND), value, intent(in) :: info
+  integer(MPI_HANDLE_KIND), value, intent(out) :: fh
+end function MPI_File_open
+
+end interface MPI_File_open
+
+
+interface MPI_File_preallocate
+
+integer(C_INT) function &
+MPI_File_preallocate(fh, size, ierr) &
+  BIND(C, name="MPI_File_preallocate")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: size
+end function MPI_File_preallocate
+
+end interface MPI_File_preallocate
+
+
+interface MPI_File_read
+
+integer(C_INT) function &
+MPI_File_read(fh, buf, count, datatype, status, ierr) &
+  BIND(C, name="MPI_File_read")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(out) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_read
+
+end interface MPI_File_read
+
+
+interface MPI_File_read_all
+
+integer(C_INT) function &
+MPI_File_read_all(fh, buf, count, datatype, status, ierr) &
+  BIND(C, name="MPI_File_read_all")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(out) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_read_all
+
+end interface MPI_File_read_all
+
+
+interface MPI_File_read_all_begin
+
+integer(C_INT) function &
+MPI_File_read_all_begin(fh, buf, count, datatype, ierr) &
+  BIND(C, name="MPI_File_read_all_begin")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(out) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+end function MPI_File_read_all_begin
+
+end interface MPI_File_read_all_begin
+
+
+interface MPI_File_read_all_end
+
+integer(C_INT) function &
+MPI_File_read_all_end(fh, buf, status, ierr) &
+  BIND(C, name="MPI_File_read_all_end")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(out) :: buf
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_read_all_end
+
+end interface MPI_File_read_all_end
+
+
+interface MPI_File_read_at
+
+integer(C_INT) function &
+MPI_File_read_at(fh, offset, buf, count, datatype, status, ierr) &
+  BIND(C, name="MPI_File_read_at")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: offset
+  type(C_PTR), value, intent(out) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_read_at
+
+end interface MPI_File_read_at
+
+
+interface MPI_File_read_at_all
+
+integer(C_INT) function &
+MPI_File_read_at_all(fh, offset, buf, count, datatype, status, ierr) &
+  BIND(C, name="MPI_File_read_at_all")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: offset
+  type(C_PTR), value, intent(out) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_read_at_all
+
+end interface MPI_File_read_at_all
+
+
+interface MPI_File_read_at_all_begin
+
+integer(C_INT) function &
+MPI_File_read_at_all_begin(fh, offset, buf, count, datatype, ierr) &
+  BIND(C, name="MPI_File_read_at_all_begin")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: offset
+  type(C_PTR), value, intent(out) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+end function MPI_File_read_at_all_begin
+
+end interface MPI_File_read_at_all_begin
+
+
+interface MPI_File_read_at_all_end
+
+integer(C_INT) function &
+MPI_File_read_at_all_end(fh, buf, status, ierr) &
+  BIND(C, name="MPI_File_read_at_all_end")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  type(C_PTR), value, intent(out) :: buf
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_read_at_all_end
+
+end interface MPI_File_read_at_all_end
+
+
+interface MPI_File_read_ordered
+
+integer(C_INT) function &
+MPI_File_read_ordered(fh, buf, count, datatype, status, ierr) &
+  BIND(C, name="MPI_File_read_ordered")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(out) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_read_ordered
+
+end interface MPI_File_read_ordered
+
+
+interface MPI_File_read_ordered_begin
+
+integer(C_INT) function &
+MPI_File_read_ordered_begin(fh, buf, count, datatype, ierr) &
+  BIND(C, name="MPI_File_read_ordered_begin")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(out) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+end function MPI_File_read_ordered_begin
+
+end interface MPI_File_read_ordered_begin
+
+
+interface MPI_File_read_ordered_end
+
+integer(C_INT) function &
+MPI_File_read_ordered_end(fh, buf, status, ierr) &
+  BIND(C, name="MPI_File_read_ordered_end")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(out) :: buf
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_read_ordered_end
+
+end interface MPI_File_read_ordered_end
+
+
+interface MPI_File_read_shared
+
+integer(C_INT) function &
+MPI_File_read_shared(fh, buf, count, datatype, status, ierr) &
+  BIND(C, name="MPI_File_read_shared")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(out) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_read_shared
+
+end interface MPI_File_read_shared
+
+
+interface MPI_File_seek
+
+integer(C_INT) function &
+MPI_File_seek(fh, offset, whence, ierr) &
+  BIND(C, name="MPI_File_seek")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: offset
+  integer(INT_C), value, intent(in) :: whence
+end function MPI_File_seek
+
+end interface MPI_File_seek
+
+
+interface MPI_File_seek_shared
+
+integer(C_INT) function &
+MPI_File_seek_shared(fh, offset, whence, ierr) &
+  BIND(C, name="MPI_File_seek_shared")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: offset
+  integer(INT_C), value, intent(in) :: whence
+end function MPI_File_seek_shared
+
+end interface MPI_File_seek_shared
+
+
+interface MPI_File_set_atomicity
+
+integer(C_INT) function &
+MPI_File_set_atomicity(fh, flag, ierr) &
+  BIND(C, name="MPI_File_set_atomicity")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  integer, value, intent(in) :: flag
+end function MPI_File_set_atomicity
+
+end interface MPI_File_set_atomicity
+
+
+interface MPI_File_set_errhandler
+
+integer(C_INT) function &
+MPI_File_set_errhandler(file, errhandler, ierr) &
+  BIND(C, name="MPI_File_set_errhandler")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: file
+  integer(MPI_HANDLE_KIND), value, intent(in) :: errhandler
+end function MPI_File_set_errhandler
+
+end interface MPI_File_set_errhandler
+
+
+interface MPI_File_set_info
+
+integer(C_INT) function &
+MPI_File_set_info(fh, info, ierr) &
+  BIND(C, name="MPI_File_set_info")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  integer(MPI_HANDLE_KIND), value, intent(in) :: info
+end function MPI_File_set_info
+
+end interface MPI_File_set_info
+
+
+interface MPI_File_set_size
+
+integer(C_INT) function &
+MPI_File_set_size(fh, size, ierr) &
+  BIND(C, name="MPI_File_set_size")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: size
+end function MPI_File_set_size
+
+end interface MPI_File_set_size
+
+
+interface MPI_File_set_view
+
+integer(C_INT) function &
+MPI_File_set_view(fh, disp, etype, filetype, datarep, info, ierr) &
+  BIND(C, name="MPI_File_set_view")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: disp
+  integer(MPI_HANDLE_KIND), value, intent(in) :: etype
+  integer(MPI_HANDLE_KIND), value, intent(in) :: filetype
+  character(len=*), value, intent(in) :: datarep
+  integer(MPI_HANDLE_KIND), value, intent(in) :: info
+end function MPI_File_set_view
+
+end interface MPI_File_set_view
+
+
+interface MPI_File_sync
+
+integer(C_INT) function &
+MPI_File_sync(fh, ierr) &
+  BIND(C, name="MPI_File_sync")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+end function MPI_File_sync
+
+end interface MPI_File_sync
+
+
+interface MPI_File_write
+
+integer(C_INT) function &
+MPI_File_write(fh, buf, count, datatype, status, ierr) &
+  BIND(C, name="MPI_File_write")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_write
+
+end interface MPI_File_write
+
+
+interface MPI_File_write_all
+
+integer(C_INT) function &
+MPI_File_write_all(fh, buf, count, datatype, status, ierr) &
+  BIND(C, name="MPI_File_write_all")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_write_all
+
+end interface MPI_File_write_all
+
+
+interface MPI_File_write_all_begin
+
+integer(C_INT) function &
+MPI_File_write_all_begin(fh, buf, count, datatype, ierr) &
+  BIND(C, name="MPI_File_write_all_begin")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+end function MPI_File_write_all_begin
+
+end interface MPI_File_write_all_begin
+
+
+interface MPI_File_write_all_end
+
+integer(C_INT) function &
+MPI_File_write_all_end(fh, buf, status, ierr) &
+  BIND(C, name="MPI_File_write_all_end")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(in) :: buf
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_write_all_end
+
+end interface MPI_File_write_all_end
+
+
+interface MPI_File_write_at
+
+integer(C_INT) function &
+MPI_File_write_at(fh, offset, buf, count, datatype, status, ierr) &
+  BIND(C, name="MPI_File_write_at")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: offset
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_write_at
+
+end interface MPI_File_write_at
+
+
+interface MPI_File_write_at_all
+
+integer(C_INT) function &
+MPI_File_write_at_all(fh, offset, buf, count, datatype, status, ierr) &
+  BIND(C, name="MPI_File_write_at_all")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: offset
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_write_at_all
+
+end interface MPI_File_write_at_all
+
+
+interface MPI_File_write_at_all_begin
+
+integer(C_INT) function &
+MPI_File_write_at_all_begin(fh, offset, buf, count, datatype, ierr) &
+  BIND(C, name="MPI_File_write_at_all_begin")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  integer(kind=MPI_OFFSET_KIND), value, intent(in) :: offset
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+end function MPI_File_write_at_all_begin
+
+end interface MPI_File_write_at_all_begin
+
+
+interface MPI_File_write_at_all_end
+
+integer(C_INT) function &
+MPI_File_write_at_all_end(fh, buf, status, ierr) &
+  BIND(C, name="MPI_File_write_at_all_end")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(in) :: buf
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_write_at_all_end
+
+end interface MPI_File_write_at_all_end
+
+
+interface MPI_File_write_ordered
+
+integer(C_INT) function &
+MPI_File_write_ordered(fh, buf, count, datatype, status, ierr) &
+  BIND(C, name="MPI_File_write_ordered")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_write_ordered
+
+end interface MPI_File_write_ordered
+
+
+interface MPI_File_write_ordered_begin
+
+integer(C_INT) function &
+MPI_File_write_ordered_begin(fh, buf, count, datatype, ierr) &
+  BIND(C, name="MPI_File_write_ordered_begin")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+end function MPI_File_write_ordered_begin
+
+end interface MPI_File_write_ordered_begin
+
+
+interface MPI_File_write_ordered_end
+
+integer(C_INT) function &
+MPI_File_write_ordered_end(fh, buf, status, ierr) &
+  BIND(C, name="MPI_File_write_ordered_end")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(in) :: buf
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_write_ordered_end
+
+end interface MPI_File_write_ordered_end
+
+
+interface MPI_File_write_shared
+
+integer(C_INT) function &
+MPI_File_write_shared(fh, buf, count, datatype, status, ierr) &
+  BIND(C, name="MPI_File_write_shared")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: fh
+  type(C_PTR), value, intent(in) :: buf
+  integer(INT_C), value, intent(in) :: count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(MPI_STATUS_SIZE), value, intent(out) :: status
+end function MPI_File_write_shared
+
+end interface MPI_File_write_shared
+
+
+interface MPI_Finalize
+
+integer(C_INT) function &
+MPI_Finalize(ierr) &
+  BIND(C, name="MPI_Finalize")
+  use MPI_C_BINDING
+end function MPI_Finalize
+
+end interface MPI_Finalize
+
+
+interface MPI_Finalized
+
+integer(C_INT) function &
+MPI_Finalized(flag, ierr) &
+  BIND(C, name="MPI_Finalized")
+  use MPI_C_BINDING
+  integer, value, intent(out) :: flag
+end function MPI_Finalized
+
+end interface MPI_Finalized
+
+
+interface MPI_Free_mem
+
+integer(C_INT) function &
+MPI_Free_mem(baseptr, ierr) &
+  BIND(C, name="MPI_Free_mem")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(inout) :: baseptr
+end function MPI_Free_mem
+
+end interface MPI_Free_mem
+
+
+interface MPI_Gather
+
+integer(C_INT) function &
+MPI_Gather(sendbuf, sendcount, sendtype,
+           recvbuf, recvcount, recvtype,
+           root, comm, ierr) &
+  BIND(C, name="MPI_Gather")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: sendbuf
+  integer(INT_C), value, intent(in) :: sendcount
+  integer(MPI_HANDLE_KIND), value, intent(in) :: sendtype
+  type(C_PTR), value, intent(inout) :: recvbuf
+  integer(INT_C), value, intent(in) :: recvcount
+  integer(MPI_HANDLE_KIND), value, intent(in) :: recvtype
+  integer(INT_C), value, intent(in) :: root
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+end function MPI_Gather
+
+end interface MPI_Gather
+
+
+interface MPI_Gatherv
+
+integer(C_INT) function &
+MPI_Gatherv(sendbuf, sendcounts, sendtype,
+            recvbuf, recvcounts, displs, recvtype,
+            root, comm, ierr) &
+  BIND(C, name="MPI_Gatherv")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: sendbuf
+  integer(INT_C), value, intent(in) :: sendcounts
+  integer(MPI_HANDLE_KIND), value, intent(in) :: sendtype
+  type(C_PTR), value, intent(inout) :: recvbuf
+  integer(INT_C), value, intent(in) :: recvcounts
+  integer(INT_C), dimension(*), value, intent(in) :: displs
+  integer(MPI_HANDLE_KIND), value, intent(in) :: recvtype
+  integer(INT_C), value, intent(in) :: root
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+end function MPI_Gatherv
+
+end interface MPI_Gatherv
+
+
+interface MPI_Get
+
+integer(C_INT) function &
+MPI_Get(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, &
+        win, ierr) &
+  BIND(C, name="MPI_Get")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: origin_addr
+  integer(INT_C), value, intent(in) :: origin_count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: origin_datatype
+  integer(INT_C), value, intent(in) :: target_rank
+  integer(kind=MPI_ADDRESS_KIND), value, intent(in) :: target_disp
+  integer(INT_C), value, intent(in) :: target_count
+  integer(MPI_HANDLE_KIND), value, intent(in) :: target_datatype
+  integer(MPI_HANDLE_KIND), value, intent(in) :: win
+end function MPI_Get
+
+end interface MPI_Get
+
+
+interface MPI_Get_address
+
+integer(C_INT) function &
+MPI_Get_address(location, address, ierr) &
+  BIND(C, name="MPI_Get_address")
+  use MPI_C_BINDING
+  type(C_PTR), value, intent(in) :: location
+  integer(kind=MPI_ADDRESS_KIND), value, intent(out) :: address
+end function MPI_Get_address
+
+end interface MPI_Get_address
+
+
+interface MPI_Get_count
+
+integer(C_INT) function &
+MPI_Get_count(status, datatype, count, ierr) &
+  BIND(C, name="MPI_Get_count")
+  use MPI_C_BINDING
+  integer(MPI_STATUS_SIZE), value, intent(in) :: status
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(INT_C), value, intent(out) :: count
+end function MPI_Get_count
+
+end interface MPI_Get_count
+
+
+interface MPI_Get_elements
+
+integer(C_INT) function &
+MPI_Get_elements(status, datatype, count, ierr) &
+  BIND(C, name="MPI_Get_elements")
+  use MPI_C_BINDING
+  integer(MPI_STATUS_SIZE), value, intent(in) :: status
+  integer(MPI_HANDLE_KIND), value, intent(in) :: datatype
+  integer(INT_C), value, intent(out) :: count
+end function MPI_Get_elements
+
+end interface MPI_Get_elements
+
+
+interface MPI_Get_processor_name
+
+integer(C_INT) function &
+MPI_Get_processor_name(name, resultlen, ierr) &
+  BIND(C, name="MPI_Get_processor_name")
+  use MPI_C_BINDING
+  character(len=*), value, intent(out) :: name
+  integer(INT_C), value, intent(out) :: resultlen
+end function MPI_Get_processor_name
+
+end interface MPI_Get_processor_name
+
+
+interface MPI_Get_version
+
+integer(C_INT) function &
+MPI_Get_version(version, subversion, ierr) &
+  BIND(C, name="MPI_Get_version")
+  use MPI_C_BINDING
+  integer(INT_C), value, intent(out) :: version
+  integer(INT_C), value, intent(out) :: subversion
+end function MPI_Get_version
+
+end interface MPI_Get_version
+
+
+interface MPI_Graph_create
+
+integer(C_INT) function &
+MPI_Graph_create(comm_old, nnodes, index, edges, reorder, comm_graph, ierr) &
+  BIND(C, name="MPI_Graph_create")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm_old
+  integer(INT_C), value, intent(in) :: nnodes
+  integer(INT_C), dimension(*), value, intent(in) :: index
+  integer(INT_C), dimension(*), value, intent(in) :: edges
+  integer(INT_C), value, intent(in) :: reorder
+  integer(MPI_HANDLE_KIND), value, intent(out) :: comm_graph
+end function MPI_Graph_create
+
+end interface MPI_Graph_create
+
+
+interface MPI_Graph_get
+
+integer(C_INT) function &
+MPI_Graph_get(comm, maxindex, maxedges, index, edges, ierr) &
+  BIND(C, name="MPI_Graph_get")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: maxindex
+  integer(INT_C), value, intent(in) :: maxedges
+  integer(INT_C), dimension(*), value, intent(out) :: index
+  integer(INT_C), dimension(*), value, intent(out) :: edges
+end function MPI_Graph_get
+
+end interface MPI_Graph_get
+
+
+interface MPI_Graph_map
+
+integer(C_INT) function &
+MPI_Graph_map(comm, nnodes, index, edges, newrank, ierr) &
+  BIND(C, name="MPI_Graph_map")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: nnodes
+  integer(INT_C), dimension(*), value, intent(in) :: index
+  integer(INT_C), dimension(*), value, intent(in) :: edges
+  integer(INT_C), value, intent(out) :: newrank
+end function MPI_Graph_map
+
+end interface MPI_Graph_map
+
+
+interface MPI_Graph_neighbors
+
+integer(C_INT) function &
+MPI_Graph_neighbors(comm, rank, maxneighbors, neighbors, ierr) &
+  BIND(C, name="MPI_Graph_neighbors")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: rank
+  integer(INT_C), value, intent(in) :: maxneighbors
+  integer(INT_C), dimension(*), value, intent(out) :: neighbors
+end function MPI_Graph_neighbors
+
+end interface MPI_Graph_neighbors
+
+
+interface MPI_Graph_neighbors_count
+
+integer(C_INT) function &
+MPI_Graph_neighbors_count(comm, rank, nneighbors, ierr) &
+  BIND(C, name="MPI_Graph_neighbors_count")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(in) :: rank
+  integer(INT_C), value, intent(out) :: nneighbors
+end function MPI_Graph_neighbors_count
+
+end interface MPI_Graph_neighbors_count
+
+
+interface MPI_Graphdims_get
+
+integer(C_INT) function &
+MPI_Graphdims_get(comm, nnodes, nedges, ierr) &
+  BIND(C, name="MPI_Graphdims_get")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: comm
+  integer(INT_C), value, intent(out) :: nnodes
+  integer(INT_C), value, intent(out) :: nedges
+end function MPI_Graphdims_get
+
+end interface MPI_Graphdims_get
+
+
+interface MPI_Grequest_complete
+
+integer(C_INT) function &
+MPI_Grequest_complete(request, ierr) &
+  BIND(C, name="MPI_Grequest_complete")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: request
+end function MPI_Grequest_complete
+
+end interface MPI_Grequest_complete
+
+
+interface MPI_Grequest_start
+
+integer(C_INT) function &
+MPI_Grequest_start(query_fn, free_fn, cancel_fn, extra_state, request, ierr) &
+  BIND(C, name="MPI_Grequest_start")
+  use MPI_C_BINDING
+  external :: query_fn
+  external :: free_fn
+  external :: cancel_fn
+  integer(C_INT), value, intent(in) :: extra_state
+  integer(MPI_HANDLE_KIND), value, intent(out) :: request
+end function MPI_Grequest_start
+
+end interface MPI_Grequest_start
+
+
+interface MPI_Group_compare
+
+integer(C_INT) function &
+MPI_Group_compare(group1, group2, result, ierr) &
+  BIND(C, name="MPI_Group_compare")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group1
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group2
+  integer(INT_C), value, intent(out) :: result
+end function MPI_Group_compare
+
+end interface MPI_Group_compare
+
+
+interface MPI_Group_difference
+
+integer(C_INT) function &
+MPI_Group_difference(group1, group2, newgroup, ierr) &
+  BIND(C, name="MPI_Group_difference")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group1
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group2
+  integer(MPI_HANDLE_KIND), value, intent(out) :: newgroup
+end function MPI_Group_difference
+
+end interface MPI_Group_difference
+
+
+interface MPI_Group_excl
+
+integer(C_INT) function &
+MPI_Group_excl(group, n, ranks, newgroup, ierr) &
+  BIND(C, name="MPI_Group_excl")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group
+  integer(INT_C), value, intent(in) :: n
+  integer(INT_C), dimension(*), value, intent(in) :: ranks
+  integer(MPI_HANDLE_KIND), value, intent(out) :: newgroup
+end function MPI_Group_excl
+
+end interface MPI_Group_excl
+
+
+interface MPI_Group_free
+
+integer(C_INT) function &
+MPI_Group_free(group, ierr) &
+  BIND(C, name="MPI_Group_free")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(inout) :: group
+end function MPI_Group_free
+
+end interface MPI_Group_free
+
+
+interface MPI_Group_incl
+
+integer(C_INT) function &
+MPI_Group_incl(group, n, ranks, newgroup, ierr) &
+  BIND(C, name="MPI_Group_incl")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group
+  integer(INT_C), value, intent(in) :: n
+  integer(INT_C), dimension(*), value, intent(in) :: ranks
+  integer(MPI_HANDLE_KIND), value, intent(out) :: newgroup
+end function MPI_Group_incl
+
+end interface MPI_Group_incl
+
+
+interface MPI_Group_intersection
+
+integer(C_INT) function &
+MPI_Group_intersection(group1, group2, newgroup, ierr) &
+  BIND(C, name="MPI_Group_intersection")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group1
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group2
+  integer(MPI_HANDLE_KIND), value, intent(out) :: newgroup
+end function MPI_Group_intersection
+
+end interface MPI_Group_intersection
+
+
+interface MPI_Group_range_excl
+
+integer(C_INT) function &
+MPI_Group_range_excl(group, n, ranges, newgroup, ierr) &
+  BIND(C, name="MPI_Group_range_excl")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group
+  integer(INT_C), value, intent(in) :: n
+  integer(INT_C), dimension(3, *), value, intent(in) :: ranges
+  integer(MPI_HANDLE_KIND), value, intent(out) :: newgroup
+end function MPI_Group_range_excl
+
+end interface MPI_Group_range_excl
+
+
+interface MPI_Group_range_incl
+
+integer(C_INT) function &
+MPI_Group_range_incl(group, n, ranges, newgroup, ierr) &
+  BIND(C, name="MPI_Group_range_incl")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group
+  integer(INT_C), value, intent(in) :: n
+  integer(INT_C), dimension(3, *), value, intent(in) :: ranges
+  integer(MPI_HANDLE_KIND), value, intent(out) :: newgroup
+end function MPI_Group_range_incl
+
+end interface MPI_Group_range_incl
+
+
+interface MPI_Group_rank
+
+integer(C_INT) function &
+MPI_Group_rank(group, rank, ierr) &
+  BIND(C, name="MPI_Group_rank")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group
+  integer(INT_C), value, intent(out) :: rank
+end function MPI_Group_rank
+
+end interface MPI_Group_rank
+
+
+interface MPI_Group_size
+
+integer(C_INT) function &
+MPI_Group_size(group, size, ierr) &
+  BIND(C, name="MPI_Group_size")
+  use MPI_C_BINDING
+  integer(MPI_HANDLE_KIND), value, intent(in) :: group