From 1c6b2595412193ab448d386b75e5b8ab070e0417 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Mon, 17 May 2010 15:56:21 +0000 Subject: [PATCH] psblas3: base/modules/psb_const_mod.F90 base/modules/psb_error_mod.F90 base/tools/psb_cdins.f90 base/tools/psb_icdasb.F90 1. New error code to be called from cdasb (if we get there). 2. Fix proper error signal into cdins. --- base/modules/psb_const_mod.F90 | 1 + base/modules/psb_error_mod.F90 | 2 ++ base/tools/psb_cdins.f90 | 6 ++++-- base/tools/psb_icdasb.F90 | 9 +++++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/base/modules/psb_const_mod.F90 b/base/modules/psb_const_mod.F90 index b0552c0d..f728e30f 100644 --- a/base/modules/psb_const_mod.F90 +++ b/base/modules/psb_const_mod.F90 @@ -141,6 +141,7 @@ module psb_const_mod integer, parameter, public :: psb_err_iarray_outside_process_=150 integer, parameter, public :: psb_err_forgot_geall_=290 integer, parameter, public :: psb_err_forgot_spall_=295 + integer, parameter, public :: psb_err_wrong_ins_=298 integer, parameter, public :: psb_err_iarg_mbeeiarra_i_=300 integer, parameter, public :: psb_err_mpi_error_=400 integer, parameter, public :: psb_err_parm_differs_among_procs_=550 diff --git a/base/modules/psb_error_mod.F90 b/base/modules/psb_error_mod.F90 index e44fb73a..c0fe3e98 100644 --- a/base/modules/psb_error_mod.F90 +++ b/base/modules/psb_error_mod.F90 @@ -360,6 +360,8 @@ contains write (error_unit,'("To call this routine you must first call psb_geall on the same matrix")') case(psb_err_forgot_spall_) write (error_unit,'("To call this routine you must first call psb_spall on the same matrix")') + case(psb_err_wrong_ins_) + write (0,'("Something went wrong before this call to ",a,", probably in cdins/spins")')r_name case(psb_err_iarg_mbeeiarra_i_) write (error_unit,'("Input argument n. ",i0," must be equal to entry n. ",i0," in array input argument n.",i0)') & & i_e_d(1),i_e_d(4),i_e_d(3) diff --git a/base/tools/psb_cdins.f90 b/base/tools/psb_cdins.f90 index f6271ded..b00ab44e 100644 --- a/base/tools/psb_cdins.f90 +++ b/base/tools/psb_cdins.f90 @@ -120,7 +120,8 @@ subroutine psb_cdinsrc(nz,ia,ja,desc_a,info,ila,jla) if (present(ila).and.present(jla)) then call psi_idx_cnv(nz,ia,ila,desc_a,info,owned=.true.) - call psb_cdins(nz,ja,desc_a,info,jla=jla,mask=(ila(1:nz)>0)) + if (info == psb_success_) & + & call psb_cdins(nz,ja,desc_a,info,jla=jla,mask=(ila(1:nz)>0)) else if (present(ila).or.present(jla)) then write(0,*) 'Inconsistent call : ',present(ila),present(jla) @@ -132,7 +133,8 @@ subroutine psb_cdinsrc(nz,ia,ja,desc_a,info,ila,jla) goto 9999 end if call psi_idx_cnv(nz,ia,ila_,desc_a,info,owned=.true.) - call psb_cdins(nz,ja,desc_a,info,mask=(ila_(1:nz)>0)) + if (info == psb_success_) & + & call psb_cdins(nz,ja,desc_a,info,mask=(ila_(1:nz)>0)) deallocate(ila_) end if diff --git a/base/tools/psb_icdasb.F90 b/base/tools/psb_icdasb.F90 index b7ad3bca..e5d88d7d 100644 --- a/base/tools/psb_icdasb.F90 +++ b/base/tools/psb_icdasb.F90 @@ -96,6 +96,15 @@ subroutine psb_icdasb(desc_a,info,ext_hv) goto 9999 endif + info = psb_get_errstatus() + if (info /= psb_success_) then + ! Something went wrong in cdins/spins + ! signal and exit + info = psb_err_wrong_ins_ + call psb_errpush(info,name) + goto 9999 + end if + if (present(ext_hv)) then ext_hv_ = ext_hv else