MAPL_BalanceDestroy Subroutine

public subroutine MAPL_BalanceDestroy(Handle, rc)

Arguments

Type IntentOptional Attributes Name
integer, intent(in), optional :: Handle
integer, intent(out), optional :: rc

Calls

proc~~mapl_balancedestroy~~CallsGraph proc~mapl_balancedestroy MAPL_BalanceDestroy interface~mapl_assert MAPL_Assert proc~mapl_balancedestroy->interface~mapl_assert proc~mapl_return MAPL_Return proc~mapl_balancedestroy->proc~mapl_return at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception

Source Code

  subroutine MAPL_BalanceDestroy(Handle, rc)
    integer, optional, intent(IN ) :: Handle
    integer, optional, intent(OUT) :: rc

    integer :: Handle_

    if (present(Handle)) then
       _ASSERT(Handle>=0, 'Handle is less than 0')
       _ASSERT(Handle<=MAX_NUM_STRATEGIES,'Handle is greater than MAX_NUM_STRATEGIES')
       Handle_ = Handle
    else
       ! If we do not pass in a Handle, assume we wish to destroy
       ! the default Strategy which has a Handle of 0
       Handle_ = 0
    end if

    if(associated(THE_STRATEGIES(Handle_)%NOP)) &
         deallocate(THE_STRATEGIES(Handle_)%NOP)

    nullify(THE_STRATEGIES(Handle_)%NOP)

    THE_STRATEGIES(Handle_)%UNBALANCED_LENGTH =-1
    THE_STRATEGIES(Handle_)%BALANCED_LENGTH   =-1
    THE_STRATEGIES(Handle_)%BUFFER_LENGTH     =-1
    THE_STRATEGIES(Handle_)%PASSES            =-1
    THE_STRATEGIES(Handle_)%COMM              =-1

    _RETURN(LDB_SUCCESS)
  end subroutine MAPL_BalanceDestroy