dbcsr_allgatherv Subroutine

public subroutine dbcsr_allgatherv(send_data, scount, recv_data, recv_count, recv_displ, gid)

Allgather of encapsulated data

Note

see mp_allgatherv_dv

Arguments

Type IntentOptional Attributes Name
type(dbcsr_data_obj), intent(in) :: send_data
integer, intent(in) :: scount
type(dbcsr_data_obj), intent(inout) :: recv_data
integer, intent(in), DIMENSION(:), CONTIGUOUS :: recv_count
integer, intent(in), DIMENSION(:), CONTIGUOUS :: recv_displ
type(mp_comm_type), intent(in) :: gid

Source Code

   SUBROUTINE dbcsr_allgatherv(send_data, scount, recv_data, recv_count, recv_displ, gid)
      !! Allgather of encapsulated data
      !! @note see mp_allgatherv_dv

      TYPE(dbcsr_data_obj), INTENT(IN)                   :: send_data
      INTEGER, INTENT(IN)                                :: scount
      TYPE(dbcsr_data_obj), INTENT(INOUT)                :: recv_data
      INTEGER, DIMENSION(:), CONTIGUOUS, INTENT(IN)      :: recv_count, recv_displ
      TYPE(mp_comm_type), INTENT(IN)                     :: gid

      IF (dbcsr_data_get_type(send_data) /= dbcsr_data_get_type(recv_data)) &
         DBCSR_ABORT("Data type mismatch")
      SELECT CASE (dbcsr_data_get_type(send_data))
      CASE (dbcsr_type_real_4)
         CALL mp_allgather(send_data%d%r_sp(1:scount), recv_data%d%r_sp, &
                           recv_count, recv_displ, gid)
      CASE (dbcsr_type_real_8)
         CALL mp_allgather(send_data%d%r_dp(1:scount), recv_data%d%r_dp, &
                           recv_count, recv_displ, gid)
      CASE (dbcsr_type_complex_4)
         CALL mp_allgather(send_data%d%c_sp(1:scount), recv_data%d%c_sp, &
                           recv_count, recv_displ, gid)
      CASE (dbcsr_type_complex_8)
         CALL mp_allgather(send_data%d%c_dp(1:scount), recv_data%d%c_dp, &
                           recv_count, recv_displ, gid)
      CASE default
         DBCSR_ABORT("Invalid data type")
      END SELECT
   END SUBROUTINE dbcsr_allgatherv