dbcsr_dist_release_locals Subroutine

private subroutine dbcsr_dist_release_locals(dist)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_distribution_obj), intent(inout) :: dist

Source Code

   SUBROUTINE dbcsr_dist_release_locals(dist)
      TYPE(dbcsr_distribution_obj), INTENT(INOUT)        :: dist

      INTEGER                                            :: i

      IF (dist%d%has_other_l_rows) THEN
         DO i = LBOUND(dist%d%other_l_rows, 1), UBOUND(dist%d%other_l_rows, 1)
            CALL array_release(dist%d%other_l_rows(i))
         END DO
         DEALLOCATE (dist%d%other_l_rows)
      END IF
      IF (dist%d%has_other_l_cols) THEN
         DO i = LBOUND(dist%d%other_l_cols, 1), UBOUND(dist%d%other_l_cols, 1)
            CALL array_release(dist%d%other_l_cols(i))
         END DO
         DEALLOCATE (dist%d%other_l_cols)
      END IF
      IF (dist%d%has_global_row_map) THEN
         CALL array_release(dist%d%global_row_map)
      END IF
      IF (dist%d%has_global_col_map) THEN
         CALL array_release(dist%d%global_col_map)
      END IF
      dist%d%has_other_l_rows = .FALSE.
      dist%d%has_other_l_cols = .FALSE.
      dist%d%has_global_row_map = .FALSE.
      dist%d%has_global_col_map = .FALSE.
   END SUBROUTINE dbcsr_dist_release_locals