From 8212c97344098bc5b5b7837e484433153ccadb68 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 30 Jun 2015 16:21:05 +0000 Subject: [PATCH] psblas: base/serial/impl/psb_c_csr_impl.f90 base/serial/impl/psb_d_csr_impl.f90 base/serial/impl/psb_s_csr_impl.f90 base/serial/impl/psb_z_csr_impl.f90 Error handlers in csr_impl --- base/serial/impl/psb_c_csr_impl.f90 | 27 +++++---------------------- base/serial/impl/psb_d_csr_impl.f90 | 27 +++++---------------------- base/serial/impl/psb_s_csr_impl.f90 | 27 +++++---------------------- base/serial/impl/psb_z_csr_impl.f90 | 27 +++++---------------------- 4 files changed, 20 insertions(+), 88 deletions(-) diff --git a/base/serial/impl/psb_c_csr_impl.f90 b/base/serial/impl/psb_c_csr_impl.f90 index 0e3b682c..66201ddc 100644 --- a/base/serial/impl/psb_c_csr_impl.f90 +++ b/base/serial/impl/psb_c_csr_impl.f90 @@ -1566,12 +1566,7 @@ subroutine psb_c_csr_get_diag(a,d,info) call psb_erractionrestore(err_act) return -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if +9999 call psb_error_handler(err_act) return end subroutine psb_c_csr_get_diag @@ -1644,12 +1639,7 @@ subroutine psb_c_csr_scal(d,a,info,side) call psb_erractionrestore(err_act) return -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if +9999 call psb_error_handler(err_act) return end subroutine psb_c_csr_scal @@ -1685,12 +1675,7 @@ subroutine psb_c_csr_scals(d,a,info) call psb_erractionrestore(err_act) return -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if +9999 call psb_error_handler(err_act) return end subroutine psb_c_csr_scals @@ -1770,10 +1755,8 @@ subroutine psb_c_csr_mold(a,b,info) goto 9999 end if return -9999 continue - if (err_act /= psb_act_ret_) then - call psb_error() - end if + +9999 call psb_error_handler(err_act) return end subroutine psb_c_csr_mold diff --git a/base/serial/impl/psb_d_csr_impl.f90 b/base/serial/impl/psb_d_csr_impl.f90 index 5cbf4907..64394810 100644 --- a/base/serial/impl/psb_d_csr_impl.f90 +++ b/base/serial/impl/psb_d_csr_impl.f90 @@ -1566,12 +1566,7 @@ subroutine psb_d_csr_get_diag(a,d,info) call psb_erractionrestore(err_act) return -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if +9999 call psb_error_handler(err_act) return end subroutine psb_d_csr_get_diag @@ -1644,12 +1639,7 @@ subroutine psb_d_csr_scal(d,a,info,side) call psb_erractionrestore(err_act) return -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if +9999 call psb_error_handler(err_act) return end subroutine psb_d_csr_scal @@ -1685,12 +1675,7 @@ subroutine psb_d_csr_scals(d,a,info) call psb_erractionrestore(err_act) return -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if +9999 call psb_error_handler(err_act) return end subroutine psb_d_csr_scals @@ -1770,10 +1755,8 @@ subroutine psb_d_csr_mold(a,b,info) goto 9999 end if return -9999 continue - if (err_act /= psb_act_ret_) then - call psb_error() - end if + +9999 call psb_error_handler(err_act) return end subroutine psb_d_csr_mold diff --git a/base/serial/impl/psb_s_csr_impl.f90 b/base/serial/impl/psb_s_csr_impl.f90 index 7aadb01b..3cadcaea 100644 --- a/base/serial/impl/psb_s_csr_impl.f90 +++ b/base/serial/impl/psb_s_csr_impl.f90 @@ -1566,12 +1566,7 @@ subroutine psb_s_csr_get_diag(a,d,info) call psb_erractionrestore(err_act) return -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if +9999 call psb_error_handler(err_act) return end subroutine psb_s_csr_get_diag @@ -1644,12 +1639,7 @@ subroutine psb_s_csr_scal(d,a,info,side) call psb_erractionrestore(err_act) return -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if +9999 call psb_error_handler(err_act) return end subroutine psb_s_csr_scal @@ -1685,12 +1675,7 @@ subroutine psb_s_csr_scals(d,a,info) call psb_erractionrestore(err_act) return -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if +9999 call psb_error_handler(err_act) return end subroutine psb_s_csr_scals @@ -1770,10 +1755,8 @@ subroutine psb_s_csr_mold(a,b,info) goto 9999 end if return -9999 continue - if (err_act /= psb_act_ret_) then - call psb_error() - end if + +9999 call psb_error_handler(err_act) return end subroutine psb_s_csr_mold diff --git a/base/serial/impl/psb_z_csr_impl.f90 b/base/serial/impl/psb_z_csr_impl.f90 index 7050a35d..b7541fa0 100644 --- a/base/serial/impl/psb_z_csr_impl.f90 +++ b/base/serial/impl/psb_z_csr_impl.f90 @@ -1566,12 +1566,7 @@ subroutine psb_z_csr_get_diag(a,d,info) call psb_erractionrestore(err_act) return -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if +9999 call psb_error_handler(err_act) return end subroutine psb_z_csr_get_diag @@ -1644,12 +1639,7 @@ subroutine psb_z_csr_scal(d,a,info,side) call psb_erractionrestore(err_act) return -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if +9999 call psb_error_handler(err_act) return end subroutine psb_z_csr_scal @@ -1685,12 +1675,7 @@ subroutine psb_z_csr_scals(d,a,info) call psb_erractionrestore(err_act) return -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if +9999 call psb_error_handler(err_act) return end subroutine psb_z_csr_scals @@ -1770,10 +1755,8 @@ subroutine psb_z_csr_mold(a,b,info) goto 9999 end if return -9999 continue - if (err_act /= psb_act_ret_) then - call psb_error() - end if + +9999 call psb_error_handler(err_act) return end subroutine psb_z_csr_mold