dbcsr_sendrecv_any Subroutine

public subroutine dbcsr_sendrecv_any(msgin, dest, msgout, source, comm)

sendrecv of encapsulated data.

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_data_obj), intent(in) :: msgin
integer, intent(in) :: dest
type(dbcsr_data_obj), intent(inout) :: msgout
integer, intent(in) :: source
integer, intent(in) :: comm

Contents

Source Code


Source Code

   SUBROUTINE dbcsr_sendrecv_any(msgin, dest, msgout, source, comm)
      !! sendrecv of encapsulated data.
      !! @note see mp_sendrecv

      TYPE(dbcsr_data_obj), INTENT(IN)                   :: msgin
      INTEGER, INTENT(IN)                                :: dest
      TYPE(dbcsr_data_obj), INTENT(INOUT)                :: msgout
      INTEGER, INTENT(IN)                                :: source, comm

      IF (dbcsr_data_get_type(msgin) .NE. dbcsr_data_get_type(msgout)) &
         DBCSR_ABORT("Different data type for msgin and msgout")

      SELECT CASE (dbcsr_data_get_type(msgin))
      CASE (dbcsr_type_real_4)
         CALL mp_sendrecv(msgin%d%r_sp, dest, msgout%d%r_sp, source, comm)
      CASE (dbcsr_type_real_8)
         CALL mp_sendrecv(msgin%d%r_dp, dest, msgout%d%r_dp, source, comm)
      CASE (dbcsr_type_complex_4)
         CALL mp_sendrecv(msgin%d%c_sp, dest, msgout%d%c_sp, source, comm)
      CASE (dbcsr_type_complex_8)
         CALL mp_sendrecv(msgin%d%c_dp, dest, msgout%d%c_dp, source, comm)
      CASE default
         DBCSR_ABORT("Incorrect data type")
      END SELECT
   END SUBROUTINE dbcsr_sendrecv_any