dbcsr_abort_handler Subroutine

public subroutine dbcsr_abort_handler(location, message)

Abort program with error message

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: location
character(len=*), intent(in) :: message

Contents

Source Code


Source Code

   SUBROUTINE dbcsr_abort_handler(location, message)
      !! Abort program with error message
      CHARACTER(len=*), INTENT(in)                       :: location, message

      INTEGER                                            :: unit_nr

      CALL delay_non_master() ! cleaner output if all ranks abort simultaneously

      unit_nr = dbcsr_logger_get_default_io_unit()
      IF (unit_nr <= 0) &
         unit_nr = default_output_unit ! fall back to stdout

      CALL print_abort_message(message, location, unit_nr)
      CALL print_stack(unit_nr)
      CALL m_flush(unit_nr)

      CALL mp_abort()
   END SUBROUTINE dbcsr_abort_handler