Prints a message and exit from the program. This function should be used in all the conditions where the program cannot proceed.
Close output file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | message |
Message to print before the program termination |
subroutine fatal_error(message)
!! Prints a message and exit from the program. This
!! function should be used in all the conditions
!! where the program cannot proceed.
implicit none
character (len=*), intent(in) :: message
!! Message to print before the program termination
call ommp_message(message, OMMP_VERBOSE_LOW, 'stop')
call ommp_message("Unrecoverable error in openMMPol &
&library. Exiting.", OMMP_VERBOSE_LOW, &
'stop')
!! Close output file
call close_output()
!TODO call mmpol_terminate()
!stop 1
call exit(1)
end subroutine fatal_error