base/modules/psb_const_mod.F90
 base/modules/psb_error_mod.F90
 util/psb_d_renum_impl.F90a

Added check for square matrices.
psblas3-type-indexed
Salvatore Filippone 13 years ago
parent e6828c8cca
commit ad61accbb0

@ -178,6 +178,7 @@ module psb_const_mod
integer, parameter, public :: psb_err_spmat_invalid_state_=600
integer, parameter, public :: psb_err_missing_override_method_=700
integer, parameter, public :: psb_err_invalid_dynamic_type_=701
integer, parameter, public :: psb_err_rectangular_mat_unsupported_=1120
integer, parameter, public :: psb_err_invalid_mat_state_=1121
integer, parameter, public :: psb_err_invalid_cd_state_=1122
integer, parameter, public :: psb_err_invalid_a_and_cd_state_=1123

@ -487,6 +487,9 @@ contains
case(psb_err_invalid_dynamic_type_)
write(psb_err_unit,'("input argument n. ",i0," has a dynamic type not allowed here.")')&
& i_e_d(1)
case (psb_err_rectangular_mat_unsupported_)
write(psb_err_unit,'("This routine does not support rectangular matrices: ",i0, " /= ",i0)'), &
& i_e_d(1), i_e_d(2)
case (psb_err_invalid_mat_state_)
write(psb_err_unit,'("Invalid state for sparse matrix")')
case (psb_err_invalid_cd_state_)

@ -7,8 +7,8 @@ subroutine psb_d_mat_renum(alg,mat,info,perm)
integer, intent(out) :: info
integer, allocatable, optional, intent(out) :: perm(:)
integer :: err_act
character(len=20) :: name
integer :: err_act, nr, nc
character(len=20) :: name
info = psb_success_
name = 'mat_renum'
@ -16,6 +16,14 @@ subroutine psb_d_mat_renum(alg,mat,info,perm)
info = psb_success_
nr = mat%get_nrows()
nc = mat%get_ncols()
if (nr /= nc) then
info = psb_err_rectangular_mat_unsupported_
call psb_errpush(info,name,i_err=(/nr,nc,0,0,0/))
goto 9999
end if
select case (alg)
case(psb_mat_renum_gps_)

Loading…
Cancel
Save