From e60f4a2612a216d268d90e4a149ad0ee5131968e Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Fri, 5 Feb 2021 14:00:41 +0100 Subject: [PATCH] Fix error handling in GEASB --- base/tools/psb_casb.f90 | 12 ++++++++---- base/tools/psb_dasb.f90 | 12 ++++++++---- base/tools/psb_iasb.f90 | 12 ++++++++---- base/tools/psb_lasb.f90 | 12 ++++++++---- base/tools/psb_sasb.f90 | 12 ++++++++---- base/tools/psb_zasb.f90 | 12 ++++++++---- 6 files changed, 48 insertions(+), 24 deletions(-) diff --git a/base/tools/psb_casb.f90 b/base/tools/psb_casb.f90 index 78d28f02..de2e3890 100644 --- a/base/tools/psb_casb.f90 +++ b/base/tools/psb_casb.f90 @@ -70,9 +70,11 @@ subroutine psb_casb_vect(x, desc_a, info, mold, scratch) character(len=20) :: name,ch_err info = psb_success_ - if (psb_errstatus_fatal()) return - name = 'psb_cgeasb_v' + call psb_erractionsave(err_act) + if (psb_errstatus_fatal()) then + info = psb_err_internal_error_ ; goto 9999 + end if ctxt = desc_a%get_context() debug_unit = psb_get_debug_unit() @@ -144,9 +146,11 @@ subroutine psb_casb_vect_r2(x, desc_a, info, mold, scratch) character(len=20) :: name,ch_err info = psb_success_ - if (psb_errstatus_fatal()) return - name = 'psb_cgeasb_v' + call psb_erractionsave(err_act) + if (psb_errstatus_fatal()) then + info = psb_err_internal_error_ ; goto 9999 + end if ctxt = desc_a%get_context() debug_unit = psb_get_debug_unit() diff --git a/base/tools/psb_dasb.f90 b/base/tools/psb_dasb.f90 index fac4198d..5ebee093 100644 --- a/base/tools/psb_dasb.f90 +++ b/base/tools/psb_dasb.f90 @@ -70,9 +70,11 @@ subroutine psb_dasb_vect(x, desc_a, info, mold, scratch) character(len=20) :: name,ch_err info = psb_success_ - if (psb_errstatus_fatal()) return - name = 'psb_dgeasb_v' + call psb_erractionsave(err_act) + if (psb_errstatus_fatal()) then + info = psb_err_internal_error_ ; goto 9999 + end if ctxt = desc_a%get_context() debug_unit = psb_get_debug_unit() @@ -144,9 +146,11 @@ subroutine psb_dasb_vect_r2(x, desc_a, info, mold, scratch) character(len=20) :: name,ch_err info = psb_success_ - if (psb_errstatus_fatal()) return - name = 'psb_dgeasb_v' + call psb_erractionsave(err_act) + if (psb_errstatus_fatal()) then + info = psb_err_internal_error_ ; goto 9999 + end if ctxt = desc_a%get_context() debug_unit = psb_get_debug_unit() diff --git a/base/tools/psb_iasb.f90 b/base/tools/psb_iasb.f90 index d296d2f9..d0cf2d83 100644 --- a/base/tools/psb_iasb.f90 +++ b/base/tools/psb_iasb.f90 @@ -70,9 +70,11 @@ subroutine psb_iasb_vect(x, desc_a, info, mold, scratch) character(len=20) :: name,ch_err info = psb_success_ - if (psb_errstatus_fatal()) return - name = 'psb_igeasb_v' + call psb_erractionsave(err_act) + if (psb_errstatus_fatal()) then + info = psb_err_internal_error_ ; goto 9999 + end if ctxt = desc_a%get_context() debug_unit = psb_get_debug_unit() @@ -144,9 +146,11 @@ subroutine psb_iasb_vect_r2(x, desc_a, info, mold, scratch) character(len=20) :: name,ch_err info = psb_success_ - if (psb_errstatus_fatal()) return - name = 'psb_igeasb_v' + call psb_erractionsave(err_act) + if (psb_errstatus_fatal()) then + info = psb_err_internal_error_ ; goto 9999 + end if ctxt = desc_a%get_context() debug_unit = psb_get_debug_unit() diff --git a/base/tools/psb_lasb.f90 b/base/tools/psb_lasb.f90 index 8b80ae89..1618abdb 100644 --- a/base/tools/psb_lasb.f90 +++ b/base/tools/psb_lasb.f90 @@ -70,9 +70,11 @@ subroutine psb_lasb_vect(x, desc_a, info, mold, scratch) character(len=20) :: name,ch_err info = psb_success_ - if (psb_errstatus_fatal()) return - name = 'psb_lgeasb_v' + call psb_erractionsave(err_act) + if (psb_errstatus_fatal()) then + info = psb_err_internal_error_ ; goto 9999 + end if ctxt = desc_a%get_context() debug_unit = psb_get_debug_unit() @@ -144,9 +146,11 @@ subroutine psb_lasb_vect_r2(x, desc_a, info, mold, scratch) character(len=20) :: name,ch_err info = psb_success_ - if (psb_errstatus_fatal()) return - name = 'psb_lgeasb_v' + call psb_erractionsave(err_act) + if (psb_errstatus_fatal()) then + info = psb_err_internal_error_ ; goto 9999 + end if ctxt = desc_a%get_context() debug_unit = psb_get_debug_unit() diff --git a/base/tools/psb_sasb.f90 b/base/tools/psb_sasb.f90 index c23ada14..ac3a0684 100644 --- a/base/tools/psb_sasb.f90 +++ b/base/tools/psb_sasb.f90 @@ -70,9 +70,11 @@ subroutine psb_sasb_vect(x, desc_a, info, mold, scratch) character(len=20) :: name,ch_err info = psb_success_ - if (psb_errstatus_fatal()) return - name = 'psb_sgeasb_v' + call psb_erractionsave(err_act) + if (psb_errstatus_fatal()) then + info = psb_err_internal_error_ ; goto 9999 + end if ctxt = desc_a%get_context() debug_unit = psb_get_debug_unit() @@ -144,9 +146,11 @@ subroutine psb_sasb_vect_r2(x, desc_a, info, mold, scratch) character(len=20) :: name,ch_err info = psb_success_ - if (psb_errstatus_fatal()) return - name = 'psb_sgeasb_v' + call psb_erractionsave(err_act) + if (psb_errstatus_fatal()) then + info = psb_err_internal_error_ ; goto 9999 + end if ctxt = desc_a%get_context() debug_unit = psb_get_debug_unit() diff --git a/base/tools/psb_zasb.f90 b/base/tools/psb_zasb.f90 index e3d3a555..34706841 100644 --- a/base/tools/psb_zasb.f90 +++ b/base/tools/psb_zasb.f90 @@ -70,9 +70,11 @@ subroutine psb_zasb_vect(x, desc_a, info, mold, scratch) character(len=20) :: name,ch_err info = psb_success_ - if (psb_errstatus_fatal()) return - name = 'psb_zgeasb_v' + call psb_erractionsave(err_act) + if (psb_errstatus_fatal()) then + info = psb_err_internal_error_ ; goto 9999 + end if ctxt = desc_a%get_context() debug_unit = psb_get_debug_unit() @@ -144,9 +146,11 @@ subroutine psb_zasb_vect_r2(x, desc_a, info, mold, scratch) character(len=20) :: name,ch_err info = psb_success_ - if (psb_errstatus_fatal()) return - name = 'psb_zgeasb_v' + call psb_erractionsave(err_act) + if (psb_errstatus_fatal()) then + info = psb_err_internal_error_ ; goto 9999 + end if ctxt = desc_a%get_context() debug_unit = psb_get_debug_unit()