dbcsr_distribution_get Subroutine

public subroutine dbcsr_distribution_get(dist, row_dist, col_dist, nrows, ncols, has_threads, group, mynode, numnodes, nprows, npcols, myprow, mypcol, pgrid, subgroups_defined, prow_group, pcol_group)

Get distribution parameters

Arguments

Type IntentOptional Attributes Name
type(dbcsr_distribution_obj), intent(in) :: dist
integer, optional, DIMENSION(:), POINTER :: row_dist
integer, optional, DIMENSION(:), POINTER :: col_dist
integer, intent(out), optional :: nrows
integer, intent(out), optional :: ncols
logical, intent(out), optional :: has_threads
type(mp_comm_type), intent(out), optional :: group
integer, intent(out), optional :: mynode
integer, intent(out), optional :: numnodes
integer, intent(out), optional :: nprows
integer, intent(out), optional :: npcols
integer, intent(out), optional :: myprow
integer, intent(out), optional :: mypcol
integer, optional, DIMENSION(:, :), POINTER :: pgrid
logical, intent(out), optional :: subgroups_defined
type(mp_comm_type), intent(out), optional :: prow_group
type(mp_comm_type), intent(out), optional :: pcol_group

Source Code

   SUBROUTINE dbcsr_distribution_get(dist, row_dist, col_dist, &
      !! Get distribution parameters
                                     nrows, ncols, has_threads, &
                                     group, mynode, numnodes, nprows, npcols, myprow, mypcol, pgrid, &
                                     subgroups_defined, prow_group, pcol_group)
      TYPE(dbcsr_distribution_obj), INTENT(IN)          :: dist
      INTEGER, DIMENSION(:), OPTIONAL, POINTER           :: row_dist, col_dist
      INTEGER, INTENT(OUT), OPTIONAL                     :: nrows, ncols
      LOGICAL, INTENT(OUT), OPTIONAL                     :: has_threads
      TYPE(mp_comm_type), INTENT(OUT), OPTIONAL          :: group
      INTEGER, INTENT(OUT), OPTIONAL                     :: mynode, numnodes, nprows, npcols, &
                                                            myprow, mypcol
      INTEGER, DIMENSION(:, :), OPTIONAL, POINTER        :: pgrid
      LOGICAL, INTENT(OUT), OPTIONAL                     :: subgroups_defined
      TYPE(mp_comm_type), INTENT(OUT), OPTIONAL          :: prow_group, pcol_group

      IF (PRESENT(row_dist)) row_dist => array_data(dist%d%row_dist_block)
      IF (PRESENT(col_dist)) col_dist => array_data(dist%d%col_dist_block)
      IF (PRESENT(nrows)) nrows = array_size(dist%d%row_dist_block)
      IF (PRESENT(ncols)) ncols = array_size(dist%d%col_dist_block)
      IF (PRESENT(has_threads)) has_threads = dist%d%has_thread_dist

      IF (PRESENT(group)) group = dist%d%mp_env%mp%mp_group
      IF (PRESENT(mynode)) mynode = dist%d%mp_env%mp%mynode
      IF (PRESENT(numnodes)) numnodes = dist%d%mp_env%mp%numnodes
      IF (PRESENT(nprows)) nprows = SIZE(dist%d%mp_env%mp%pgrid, 1)
      IF (PRESENT(npcols)) npcols = SIZE(dist%d%mp_env%mp%pgrid, 2)
      IF (PRESENT(myprow)) myprow = dist%d%mp_env%mp%myprow
      IF (PRESENT(mypcol)) mypcol = dist%d%mp_env%mp%mypcol
      IF (PRESENT(prow_group)) prow_group = dist%d%mp_env%mp%prow_group
      IF (PRESENT(pcol_group)) pcol_group = dist%d%mp_env%mp%pcol_group
      IF (PRESENT(pgrid)) pgrid => dist%d%mp_env%mp%pgrid
      IF (PRESENT(subgroups_defined)) subgroups_defined = dist%d%mp_env%mp%subgroups_defined

   END SUBROUTINE dbcsr_distribution_get