Commit 958c8670 authored by Roy Fabrice's avatar Roy Fabrice
Browse files

use routine_name

parent e5796596
......@@ -60,10 +60,11 @@ subroutine Algorithmic_error(routine, error_msg, error_code, process_id)
integer(kind=4), intent(in) :: error_code
integer(kind=4), intent(in) :: process_id
integer(kind=4) :: mpierr
integer :: mpierr
character(*), parameter :: ROUTINE_NAME = 'Algorithmic_error'
#ifdef DEBUG
write(ERROR_UNIT,'(a,i0)') 'Algorithmic_error begins on process', process_id
write(ERROR_UNIT,'(a,i0)') ROUTINE_NAME//' begins on process', process_id
#endif
write(ERROR_UNIT,'(a,i0)') 'Error code: ', error_code
......@@ -74,7 +75,7 @@ subroutine Algorithmic_error(routine, error_msg, error_code, process_id)
call mpi_abort(MPI_COMM_WORLD, error_code, mpierr)
#ifdef DEBUG
write(ERROR_UNIT,'(a,i0)') 'Algorithmic_error ends on process', process_id
write(ERROR_UNIT,'(a,i0)') ROUTINE_NAME//' ends on process', process_id
#endif
end subroutine Algorithmic_error
......@@ -97,10 +98,11 @@ subroutine Algorithmic_error(routine, error_msg, error_code, process_id)
integer(kind=4), intent(in) :: error_code
integer(kind=4), intent(in) :: process_id
integer(kind=4) :: mpierr
integer :: mpierr
character(*), parameter :: ROUTINE_NAME = 'Allocate_error'
#ifdef DEBUG
write(ERROR_UNIT,'(a,i0)') 'Allocate_error begins on process', process_id
write(ERROR_UNIT,'(a,i0)') ROUTINE_NAME//' begins on process', process_id
#endif
write(ERROR_UNIT,'(a,i0)') 'Error code: ', error_code
......@@ -111,7 +113,7 @@ subroutine Algorithmic_error(routine, error_msg, error_code, process_id)
call mpi_abort(MPI_COMM_WORLD, error_code, mpierr)
#ifdef DEBUG
write(ERROR_UNIT,'(a,i0)') 'Allocate_error ends on process', process_id
write(ERROR_UNIT,'(a,i0)') ROUTINE_NAME//' ends on process', process_id
#endif
end subroutine Allocate_error
......@@ -135,9 +137,10 @@ subroutine Algorithmic_error(routine, error_msg, error_code, process_id)
integer(kind=4), intent(in) :: process_id
integer(kind=4) :: mpierr
character(*), parameter :: ROUTINE_NAME = 'Deallocate_error'
#ifdef DEBUG
write(ERROR_UNIT,'(a,i0)') 'Deallocate_error begins on process', process_id
write(ERROR_UNIT,'(a,i0)') ROUTINE_NAME//' begins on process', process_id
#endif
write(ERROR_UNIT,'(a,i0)') 'Error code: ', error_code
......@@ -148,7 +151,7 @@ subroutine Algorithmic_error(routine, error_msg, error_code, process_id)
call mpi_abort(MPI_COMM_WORLD, error_code, mpierr)
#ifdef DEBUG
write(ERROR_UNIT,'(a,i0)') 'Deallocate_error ends on process', process_id
write(ERROR_UNIT,'(a,i0)') ROUTINE_NAME//' ends on process', process_id
#endif
end subroutine Deallocate_error
......@@ -171,9 +174,11 @@ subroutine Algorithmic_error(routine, error_msg, error_code, process_id)
integer(kind=4), intent(in) :: process_id
integer(kind=4) :: mpierr
character(*), parameter :: ROUTINE_NAME = 'IO_error'
#ifdef DEBUG
write(ERROR_UNIT,'(a,i0)') 'IO_error begins on process', process_id
write(ERROR_UNIT,'(a,i0)') ROUTINE_NAME//' begins on process', process_id
#endif
write(ERROR_UNIT,'(a,i0)') 'Error code: ', error_code
......@@ -200,9 +205,10 @@ subroutine Algorithmic_error(routine, error_msg, error_code, process_id)
character(*), intent(in) :: routine
character(*), intent(in) :: message
integer, intent(in) :: process_id
character(*), parameter :: ROUTINE_NAME = 'Warning'
#ifdef DEBUG
write(ERROR_UNIT,'(a,i0)') 'Warning begins on process', process_id
write(ERROR_UNIT,'(a,i0)') ROUTINE_NAME//' begins on process', process_id
#endif
write(ERROR_UNIT,'(a)') 'Warning: '
......@@ -210,7 +216,7 @@ subroutine Algorithmic_error(routine, error_msg, error_code, process_id)
write(ERROR_UNIT,*) trim(message)
#ifdef DEBUG
write(ERROR_UNIT,'(a,i0)') 'Warning ends on process', process_id
write(ERROR_UNIT,'(a,i0)') ROUTINE_NAME//' ends on process', process_id
#endif
end subroutine Warning
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment