process_test Subroutine

public subroutine process_test(rslt, test_name)

Uses

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: rslt
character(len=*), intent(in) :: test_name

Contents

Source Code


Source Code

  subroutine process_test(rslt, test_name)
    use mp, only: mp_abort, mp_initialized
    logical, intent (in) :: rslt
    character(*), intent(in) :: test_name
    if (.not. rslt) then
      write(*,*) '--> ', test_name, ' failed', proc_message()
      if (mp_initialized) then
        call mp_abort('Failed test', .true.)
      else
        stop 1
      end if
    end if

    if (should_print(1)) write (*,*) '--> ', test_name, ' passed', proc_message()
  end subroutine process_test