|
|
@ -90,7 +90,7 @@ subroutine psb_zspsm(alpha,a,x,beta,y,desc_a,info,&
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
complex(kind(1.d0)), intent(in), optional, target :: d(:)
|
|
|
|
complex(kind(1.d0)), intent(in), optional, target :: d(:)
|
|
|
|
complex(kind(1.d0)), optional, pointer :: work(:)
|
|
|
|
complex(kind(1.d0)), optional, target :: work(:)
|
|
|
|
character, intent(in), optional :: trans, unitd
|
|
|
|
character, intent(in), optional :: trans, unitd
|
|
|
|
integer, intent(in), optional :: choice
|
|
|
|
integer, intent(in), optional :: choice
|
|
|
|
integer, intent(in), optional :: k, jx, jy
|
|
|
|
integer, intent(in), optional :: k, jx, jy
|
|
|
@ -106,6 +106,7 @@ subroutine psb_zspsm(alpha,a,x,beta,y,desc_a,info,&
|
|
|
|
complex(kind(1.d0)),pointer :: iwork(:), xp(:,:), yp(:,:), id(:)
|
|
|
|
complex(kind(1.d0)),pointer :: iwork(:), xp(:,:), yp(:,:), id(:)
|
|
|
|
character :: itrans
|
|
|
|
character :: itrans
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
|
|
|
|
logical :: aliw
|
|
|
|
|
|
|
|
|
|
|
|
name='psb_zspsm'
|
|
|
|
name='psb_zspsm'
|
|
|
|
if(psb_get_errstatus().ne.0) return
|
|
|
|
if(psb_get_errstatus().ne.0) return
|
|
|
@ -159,16 +160,16 @@ subroutine psb_zspsm(alpha,a,x,beta,y,desc_a,info,&
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
if (present(unitd)) then
|
|
|
|
if (present(unitd)) then
|
|
|
|
lunitd = unitd
|
|
|
|
lunitd = toupper(unitd)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
lunitd = 'U'
|
|
|
|
lunitd = 'U'
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
if (present(trans)) then
|
|
|
|
if (present(trans)) then
|
|
|
|
if ((trans.eq.'N').or.(trans.eq.'T')&
|
|
|
|
itrans = toupper(trans)
|
|
|
|
& .or.(trans.eq.'n').or.(trans.eq.'t')) then
|
|
|
|
if((itrans.eq.'N').or.(itrans.eq.'T')) then
|
|
|
|
itrans = trans
|
|
|
|
! Ok
|
|
|
|
else if ((trans.eq.'C').or.(trans.eq.'c')) then
|
|
|
|
else if (itrans.eq.'C') then
|
|
|
|
info = 3020
|
|
|
|
info = 3020
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
@ -194,29 +195,32 @@ subroutine psb_zspsm(alpha,a,x,beta,y,desc_a,info,&
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
! check for presence/size of a work area
|
|
|
|
! check for presence/size of a work area
|
|
|
|
|
|
|
|
iwork => null()
|
|
|
|
liwork= 2*ncol
|
|
|
|
liwork= 2*ncol
|
|
|
|
if (a%pr(1) /= 0) llwork = liwork + m * ik
|
|
|
|
if (a%pr(1) /= 0) llwork = liwork + m * ik
|
|
|
|
if (a%pl(1) /= 0) llwork = llwork + m * ik
|
|
|
|
if (a%pl(1) /= 0) llwork = llwork + m * ik
|
|
|
|
if (present(work)) then
|
|
|
|
if (present(work)) then
|
|
|
|
if(size(work).lt.liwork) then
|
|
|
|
if (size(work) >= liwork) then
|
|
|
|
call psb_realloc(liwork,work,info)
|
|
|
|
aliw =.false.
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
aliw=.true.
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
aliw=.true.
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (aliw) then
|
|
|
|
|
|
|
|
call psb_realloc(liwork,iwork,info)
|
|
|
|
if(info.ne.0) then
|
|
|
|
if(info.ne.0) then
|
|
|
|
info=4010
|
|
|
|
info=4010
|
|
|
|
ch_err='psb_realloc'
|
|
|
|
ch_err='psb_realloc'
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
iwork => work
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call psb_realloc(liwork,iwork,info)
|
|
|
|
iwork => work
|
|
|
|
if(info.ne.0) then
|
|
|
|
endif
|
|
|
|
info=4010
|
|
|
|
|
|
|
|
ch_err='psb_realloc'
|
|
|
|
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
iwork(1)=0.d0
|
|
|
|
iwork(1)=0.d0
|
|
|
|
|
|
|
|
|
|
|
|
if(present(d)) then
|
|
|
|
if(present(d)) then
|
|
|
@ -301,7 +305,7 @@ subroutine psb_zspsm(alpha,a,x,beta,y,desc_a,info,&
|
|
|
|
end select
|
|
|
|
end select
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
if(.not.present(work)) deallocate(iwork)
|
|
|
|
if(aliw) deallocate(iwork)
|
|
|
|
if(.not.present(d)) deallocate(id)
|
|
|
|
if(.not.present(d)) deallocate(id)
|
|
|
|
|
|
|
|
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
@ -388,6 +392,7 @@ subroutine psb_zspsv(alpha,a,x,beta,y,desc_a,info,&
|
|
|
|
use psi_mod
|
|
|
|
use psi_mod
|
|
|
|
use psb_check_mod
|
|
|
|
use psb_check_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
|
|
|
|
use psb_string_mod
|
|
|
|
|
|
|
|
|
|
|
|
complex(kind(1.D0)), intent(in) :: alpha, beta
|
|
|
|
complex(kind(1.D0)), intent(in) :: alpha, beta
|
|
|
|
complex(kind(1.d0)), intent(in), target :: x(:)
|
|
|
|
complex(kind(1.d0)), intent(in), target :: x(:)
|
|
|
@ -396,7 +401,7 @@ subroutine psb_zspsv(alpha,a,x,beta,y,desc_a,info,&
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
complex(kind(1.d0)), intent(in), optional, target :: d(:)
|
|
|
|
complex(kind(1.d0)), intent(in), optional, target :: d(:)
|
|
|
|
complex(kind(1.d0)), optional, pointer :: work(:)
|
|
|
|
complex(kind(1.d0)), optional, target :: work(:)
|
|
|
|
character, intent(in), optional :: trans, unitd
|
|
|
|
character, intent(in), optional :: trans, unitd
|
|
|
|
integer, intent(in), optional :: choice
|
|
|
|
integer, intent(in), optional :: choice
|
|
|
|
|
|
|
|
|
|
|
@ -411,6 +416,7 @@ subroutine psb_zspsv(alpha,a,x,beta,y,desc_a,info,&
|
|
|
|
complex(kind(1.d0)),pointer :: iwork(:), xp(:), yp(:), id(:)
|
|
|
|
complex(kind(1.d0)),pointer :: iwork(:), xp(:), yp(:), id(:)
|
|
|
|
character :: itrans
|
|
|
|
character :: itrans
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
|
|
|
|
logical :: aliw
|
|
|
|
|
|
|
|
|
|
|
|
name='psb_zspsv'
|
|
|
|
name='psb_zspsv'
|
|
|
|
if(psb_get_errstatus().ne.0) return
|
|
|
|
if(psb_get_errstatus().ne.0) return
|
|
|
@ -448,23 +454,20 @@ subroutine psb_zspsv(alpha,a,x,beta,y,desc_a,info,&
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
if (present(unitd)) then
|
|
|
|
if (present(unitd)) then
|
|
|
|
lunitd = unitd
|
|
|
|
lunitd = toupper(unitd)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
lunitd = 'U'
|
|
|
|
lunitd = 'U'
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
if (present(trans)) then
|
|
|
|
if (present(trans)) then
|
|
|
|
if((trans.eq.'N').or.(trans.eq.'T')) then
|
|
|
|
itrans = toupper(trans)
|
|
|
|
itrans = trans
|
|
|
|
if((itrans.eq.'N').or.(itrans.eq.'T').or.(itrans.eq.'C')) then
|
|
|
|
else if (trans.eq.'C') then
|
|
|
|
! Ok
|
|
|
|
info = 3020
|
|
|
|
else
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
info = 70
|
|
|
|
goto 9999
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
else
|
|
|
|
goto 9999
|
|
|
|
info = 70
|
|
|
|
end if
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
itrans = 'N'
|
|
|
|
itrans = 'N'
|
|
|
|
endif
|
|
|
|
endif
|
|
|
@ -481,30 +484,34 @@ subroutine psb_zspsv(alpha,a,x,beta,y,desc_a,info,&
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iwork => null()
|
|
|
|
! check for presence/size of a work area
|
|
|
|
! check for presence/size of a work area
|
|
|
|
liwork= 2*ncol
|
|
|
|
liwork= 2*ncol
|
|
|
|
if (a%pr(1) /= 0) llwork = liwork + m * ik
|
|
|
|
if (a%pr(1) /= 0) llwork = liwork + m * ik
|
|
|
|
if (a%pl(1) /= 0) llwork = llwork + m * ik
|
|
|
|
if (a%pl(1) /= 0) llwork = llwork + m * ik
|
|
|
|
|
|
|
|
|
|
|
|
if (present(work)) then
|
|
|
|
if (present(work)) then
|
|
|
|
if(size(work).lt.liwork) then
|
|
|
|
if (size(work) >= liwork) then
|
|
|
|
call psb_realloc(liwork,work,info)
|
|
|
|
aliw =.false.
|
|
|
|
if(info.ne.0) then
|
|
|
|
else
|
|
|
|
info=4010
|
|
|
|
aliw=.true.
|
|
|
|
ch_err='psb_realloc'
|
|
|
|
endif
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
iwork => work
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call psb_realloc(liwork,iwork,info)
|
|
|
|
aliw=.true.
|
|
|
|
if(info.ne.0) then
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (aliw) then
|
|
|
|
|
|
|
|
call psb_realloc(liwork,iwork,info)
|
|
|
|
|
|
|
|
if(info.ne.0) then
|
|
|
|
info=4010
|
|
|
|
info=4010
|
|
|
|
ch_err='psb_realloc'
|
|
|
|
ch_err='psb_realloc'
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
else
|
|
|
|
|
|
|
|
iwork => work
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
iwork(1)=0.d0
|
|
|
|
iwork(1)=0.d0
|
|
|
|
|
|
|
|
|
|
|
|
if(present(d)) then
|
|
|
|
if(present(d)) then
|
|
|
@ -588,7 +595,7 @@ subroutine psb_zspsv(alpha,a,x,beta,y,desc_a,info,&
|
|
|
|
end select
|
|
|
|
end select
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
if(.not.present(work)) deallocate(iwork)
|
|
|
|
if (aliw) deallocate(iwork)
|
|
|
|
if(.not.present(d)) deallocate(id)
|
|
|
|
if(.not.present(d)) deallocate(id)
|
|
|
|
|
|
|
|
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|