Open error file and record associated lun/unit
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | open_it |
If true, open the file, otherwise do nothing |
subroutine init_error_unit (open_it)
use mp, only : set_default_error_file_unit
implicit none
!> If true, open the file, otherwise do nothing
logical, intent (in) :: open_it
error_unit_no = 0
if (run_name /= "unknown" .and. open_it) then
call open_output_file (error_unit_no, ".error")
! TT: error_unit_no is overwritten for .error file
end if
! Set mp's error file so that we don't have to set it in every
! call to mp_abort
call set_default_error_file_unit(error_unit_no)
end subroutine init_error_unit