2004-10-29 19:30:03 +04:00
|
|
|
module mpi_kinds
|
|
|
|
|
2004-11-22 03:37:56 +03:00
|
|
|
!
|
2004-11-22 04:38:40 +03:00
|
|
|
! Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
! All rights reserved.
|
|
|
|
! Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
! All rights reserved.
|
|
|
|
! $COPYRIGHT$
|
|
|
|
!
|
|
|
|
! Additional copyrights may follow
|
|
|
|
!
|
2004-11-22 03:37:56 +03:00
|
|
|
! $HEADER$
|
|
|
|
!
|
|
|
|
|
2004-11-01 20:41:16 +03:00
|
|
|
!
|
|
|
|
! kind for 4 byte integer (selected_int_kind(18) for 8 byte integer)
|
|
|
|
! (WARNING, Compiler dependent)
|
|
|
|
!
|
|
|
|
integer :: MPI_ADDRESS_KIND
|
2004-10-29 19:30:03 +04:00
|
|
|
parameter(MPI_ADDRESS_KIND = selected_int_kind(9))
|
|
|
|
|
2004-11-01 20:41:16 +03:00
|
|
|
!
|
|
|
|
! integer kinds
|
|
|
|
!
|
|
|
|
|
|
|
|
integer :: MPI_INTEGER1_KIND, MPI_INTEGER2_KIND, MPI_INTEGER4_KIND
|
|
|
|
integer :: MPI_INTEGER8_KIND, MPI_INTEGER16_KIND
|
|
|
|
parameter(MPI_INTEGER1_KIND = selected_int_kind(2))
|
|
|
|
parameter(MPI_INTEGER2_KIND = selected_int_kind(4))
|
|
|
|
parameter(MPI_INTEGER4_KIND = selected_int_kind(9))
|
|
|
|
parameter(MPI_INTEGER8_KIND = selected_int_kind(18))
|
|
|
|
parameter(MPI_INTEGER16_KIND = selected_int_kind(19))
|
|
|
|
|
2004-10-29 19:30:03 +04:00
|
|
|
end module mpi_kinds
|
|
|
|
|
|
|
|
|
|
|
|
module mpi
|
|
|
|
|
|
|
|
use mpi_kinds
|
|
|
|
|
2004-11-01 20:41:16 +03:00
|
|
|
include "mpif.h"
|
2004-10-29 19:30:03 +04:00
|
|
|
|
2004-11-01 20:41:16 +03:00
|
|
|
interface mpi_send
|
2004-10-29 19:30:03 +04:00
|
|
|
|
2004-11-01 20:41:16 +03:00
|
|
|
!
|
|
|
|
! Integer array types
|
|
|
|
!
|
2004-10-29 19:30:03 +04:00
|
|
|
|
2004-11-01 20:41:16 +03:00
|
|
|
subroutine mpi_send_1DI(a, count, datatype, dest, tag, comm, ierr)
|
|
|
|
integer :: a(:)
|
|
|
|
integer, intent(in) :: count, datatype, dest, tag, comm
|
|
|
|
integer, intent(out), optional :: ierr
|
|
|
|
end subroutine mpi_send_1DI
|
2004-10-29 19:30:03 +04:00
|
|
|
|
2004-11-01 20:41:16 +03:00
|
|
|
subroutine mpi_send_1DI1(a, count, datatype, dest, tag, comm, ierr)
|
2004-10-29 19:30:03 +04:00
|
|
|
use mpi_kinds
|
2004-11-01 20:41:16 +03:00
|
|
|
integer(kind=MPI_INTEGER1_KIND) :: a(:)
|
2004-10-29 19:30:03 +04:00
|
|
|
integer, intent(in) :: count, datatype, dest, tag, comm
|
2004-11-01 20:41:16 +03:00
|
|
|
integer, intent(out), optional :: ierr
|
|
|
|
end subroutine mpi_send_1DI1
|
2004-10-29 19:30:03 +04:00
|
|
|
|
2004-11-01 20:41:16 +03:00
|
|
|
subroutine mpi_send_1DI2(a, count, datatype, dest, tag, comm, ierr)
|
2004-10-29 19:30:03 +04:00
|
|
|
use mpi_kinds
|
2004-11-01 20:41:16 +03:00
|
|
|
integer(kind=MPI_INTEGER2_KIND) :: a(:)
|
2004-10-29 19:30:03 +04:00
|
|
|
integer, intent(in) :: count, datatype, dest, tag, comm
|
2004-11-01 20:41:16 +03:00
|
|
|
integer, intent(out), optional :: ierr
|
|
|
|
end subroutine mpi_send_1DI2
|
2004-10-29 19:30:03 +04:00
|
|
|
|
2004-11-01 20:41:16 +03:00
|
|
|
!
|
|
|
|
! Real array types
|
|
|
|
!
|
2004-10-29 19:30:03 +04:00
|
|
|
|
2004-11-01 20:41:16 +03:00
|
|
|
subroutine mpi_send_1DR(a, count, datatype, dest, tag, comm, ierr)
|
|
|
|
real :: a(:)
|
|
|
|
integer, intent(in) :: count, datatype, dest, tag, comm
|
|
|
|
integer, intent(out), optional :: ierr
|
|
|
|
end subroutine mpi_send_1DR
|
|
|
|
|
|
|
|
end interface
|
2004-10-29 19:30:03 +04:00
|
|
|
|
|
|
|
end module mpi
|