|
|
@ -83,14 +83,15 @@ subroutine mld_sprecaply(prec,x,y,desc_data,info,trans,work)
|
|
|
|
type(mld_sprec_type), intent(in) :: prec
|
|
|
|
type(mld_sprec_type), intent(in) :: prec
|
|
|
|
real(psb_spk_),intent(inout) :: x(:)
|
|
|
|
real(psb_spk_),intent(inout) :: x(:)
|
|
|
|
real(psb_spk_),intent(inout) :: y(:)
|
|
|
|
real(psb_spk_),intent(inout) :: y(:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
character(len=1), optional :: trans
|
|
|
|
character(len=1), optional :: trans
|
|
|
|
real(psb_spk_),intent(inout), optional, target :: work(:)
|
|
|
|
real(psb_spk_),intent(inout), optional, target :: work(:)
|
|
|
|
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
! Local variables
|
|
|
|
character :: trans_
|
|
|
|
character :: trans_
|
|
|
|
real(psb_spk_), pointer :: work_(:)
|
|
|
|
real(psb_spk_), pointer :: work_(:)
|
|
|
|
integer :: ictxt,np,me,err_act,iwsz
|
|
|
|
integer(psb_mpik_) :: ictxt,np,me
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: err_act,iwsz
|
|
|
|
character(len=20) :: name
|
|
|
|
character(len=20) :: name
|
|
|
|
|
|
|
|
|
|
|
|
name='mld_sprecaply'
|
|
|
|
name='mld_sprecaply'
|
|
|
@ -112,7 +113,8 @@ subroutine mld_sprecaply(prec,x,y,desc_data,info,trans,work)
|
|
|
|
iwsz = max(1,4*desc_data%get_local_cols())
|
|
|
|
iwsz = max(1,4*desc_data%get_local_cols())
|
|
|
|
allocate(work_(iwsz),stat=info)
|
|
|
|
allocate(work_(iwsz),stat=info)
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),&
|
|
|
|
call psb_errpush(psb_err_alloc_request_,name, &
|
|
|
|
|
|
|
|
& i_err=(/iwsz,izero,izero,izero,izero/),&
|
|
|
|
& a_err='real(psb_spk_)')
|
|
|
|
& a_err='real(psb_spk_)')
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
@ -145,7 +147,7 @@ subroutine mld_sprecaply(prec,x,y,desc_data,info,trans,work)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
info = psb_err_from_subroutine_ai_
|
|
|
|
info = psb_err_from_subroutine_ai_
|
|
|
|
call psb_errpush(info,name,a_err='Invalid size of precv',&
|
|
|
|
call psb_errpush(info,name,a_err='Invalid size of precv',&
|
|
|
|
& i_Err=(/size(prec%precv),0,0,0,0/))
|
|
|
|
& i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/))
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
@ -215,11 +217,12 @@ subroutine mld_sprecaply1(prec,x,desc_data,info,trans)
|
|
|
|
type(psb_desc_type),intent(in) :: desc_data
|
|
|
|
type(psb_desc_type),intent(in) :: desc_data
|
|
|
|
type(mld_sprec_type), intent(in) :: prec
|
|
|
|
type(mld_sprec_type), intent(in) :: prec
|
|
|
|
real(psb_spk_),intent(inout) :: x(:)
|
|
|
|
real(psb_spk_),intent(inout) :: x(:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
character(len=1), optional :: trans
|
|
|
|
character(len=1), optional :: trans
|
|
|
|
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
! Local variables
|
|
|
|
integer :: ictxt,np,me, err_act
|
|
|
|
integer(psb_mpik_) :: ictxt,np,me
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: err_act
|
|
|
|
real(psb_spk_), pointer :: WW(:), w1(:)
|
|
|
|
real(psb_spk_), pointer :: WW(:), w1(:)
|
|
|
|
character(len=20) :: name
|
|
|
|
character(len=20) :: name
|
|
|
|
|
|
|
|
|
|
|
@ -234,7 +237,8 @@ subroutine mld_sprecaply1(prec,x,desc_data,info,trans)
|
|
|
|
allocate(ww(size(x)),w1(size(x)),stat=info)
|
|
|
|
allocate(ww(size(x)),w1(size(x)),stat=info)
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
info=psb_err_alloc_request_
|
|
|
|
info=psb_err_alloc_request_
|
|
|
|
call psb_errpush(info,name,i_err=(/2*size(x),0,0,0,0/),&
|
|
|
|
call psb_errpush(info,name, &
|
|
|
|
|
|
|
|
& i_err=(/itwo*size(x),izero,izero,izero,izero/),&
|
|
|
|
& a_err='real(psb_spk_)')
|
|
|
|
& a_err='real(psb_spk_)')
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
@ -279,21 +283,22 @@ subroutine mld_sprecaply2_vect(prec,x,y,desc_data,info,trans,work)
|
|
|
|
type(mld_sprec_type), intent(inout) :: prec
|
|
|
|
type(mld_sprec_type), intent(inout) :: prec
|
|
|
|
type(psb_s_vect_type),intent(inout) :: x
|
|
|
|
type(psb_s_vect_type),intent(inout) :: x
|
|
|
|
type(psb_s_vect_type),intent(inout) :: y
|
|
|
|
type(psb_s_vect_type),intent(inout) :: y
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
character(len=1), optional :: trans
|
|
|
|
character(len=1), optional :: trans
|
|
|
|
real(psb_spk_),intent(inout), optional, target :: work(:)
|
|
|
|
real(psb_spk_),intent(inout), optional, target :: work(:)
|
|
|
|
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
! Local variables
|
|
|
|
character :: trans_
|
|
|
|
character :: trans_
|
|
|
|
real(psb_spk_), pointer :: work_(:)
|
|
|
|
real(psb_spk_), pointer :: work_(:)
|
|
|
|
integer :: ictxt,np,me,err_act,iwsz
|
|
|
|
integer(psb_mpik_) :: ictxt,np,me
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: err_act,iwsz
|
|
|
|
character(len=20) :: name
|
|
|
|
character(len=20) :: name
|
|
|
|
|
|
|
|
|
|
|
|
name='mld_sprecaply'
|
|
|
|
name='mld_sprecaply'
|
|
|
|
info = psb_success_
|
|
|
|
info = psb_success_
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
|
|
|
|
|
|
|
ictxt = psb_cd_get_context(desc_data)
|
|
|
|
ictxt = desc_data%get_context()
|
|
|
|
call psb_info(ictxt, me, np)
|
|
|
|
call psb_info(ictxt, me, np)
|
|
|
|
|
|
|
|
|
|
|
|
if (present(trans)) then
|
|
|
|
if (present(trans)) then
|
|
|
@ -305,10 +310,11 @@ subroutine mld_sprecaply2_vect(prec,x,y,desc_data,info,trans,work)
|
|
|
|
if (present(work)) then
|
|
|
|
if (present(work)) then
|
|
|
|
work_ => work
|
|
|
|
work_ => work
|
|
|
|
else
|
|
|
|
else
|
|
|
|
iwsz = max(1,4*psb_cd_get_local_cols(desc_data))
|
|
|
|
iwsz = max(1,4*desc_data%get_local_cols())
|
|
|
|
allocate(work_(iwsz),stat=info)
|
|
|
|
allocate(work_(iwsz),stat=info)
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),&
|
|
|
|
call psb_errpush(psb_err_alloc_request_,name, &
|
|
|
|
|
|
|
|
& i_err=(/iwsz,izero,izero,izero,izero/),&
|
|
|
|
& a_err='real(psb_spk_)')
|
|
|
|
& a_err='real(psb_spk_)')
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
@ -343,7 +349,7 @@ subroutine mld_sprecaply2_vect(prec,x,y,desc_data,info,trans,work)
|
|
|
|
|
|
|
|
|
|
|
|
info = psb_err_from_subroutine_ai_
|
|
|
|
info = psb_err_from_subroutine_ai_
|
|
|
|
call psb_errpush(info,name,a_err='Invalid size of precv',&
|
|
|
|
call psb_errpush(info,name,a_err='Invalid size of precv',&
|
|
|
|
& i_Err=(/size(prec%precv),0,0,0,0/))
|
|
|
|
& i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/))
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
@ -369,6 +375,7 @@ subroutine mld_sprecaply2_vect(prec,x,y,desc_data,info,trans,work)
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine mld_sprecaply2_vect
|
|
|
|
end subroutine mld_sprecaply2_vect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work)
|
|
|
|
subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work)
|
|
|
|
|
|
|
|
|
|
|
|
use psb_base_mod
|
|
|
|
use psb_base_mod
|
|
|
@ -380,7 +387,7 @@ subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work)
|
|
|
|
type(psb_desc_type),intent(in) :: desc_data
|
|
|
|
type(psb_desc_type),intent(in) :: desc_data
|
|
|
|
type(mld_sprec_type), intent(inout) :: prec
|
|
|
|
type(mld_sprec_type), intent(inout) :: prec
|
|
|
|
type(psb_s_vect_type),intent(inout) :: x
|
|
|
|
type(psb_s_vect_type),intent(inout) :: x
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
character(len=1), optional :: trans
|
|
|
|
character(len=1), optional :: trans
|
|
|
|
real(psb_spk_),intent(inout), optional, target :: work(:)
|
|
|
|
real(psb_spk_),intent(inout), optional, target :: work(:)
|
|
|
|
|
|
|
|
|
|
|
@ -388,14 +395,15 @@ subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work)
|
|
|
|
character :: trans_
|
|
|
|
character :: trans_
|
|
|
|
type(psb_s_vect_type) :: ww
|
|
|
|
type(psb_s_vect_type) :: ww
|
|
|
|
real(psb_spk_), pointer :: work_(:)
|
|
|
|
real(psb_spk_), pointer :: work_(:)
|
|
|
|
integer :: ictxt,np,me,err_act,iwsz
|
|
|
|
integer(psb_mpik_) :: ictxt,np,me
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: err_act,iwsz
|
|
|
|
character(len=20) :: name
|
|
|
|
character(len=20) :: name
|
|
|
|
|
|
|
|
|
|
|
|
name='mld_sprecaply'
|
|
|
|
name='mld_sprecaply'
|
|
|
|
info = psb_success_
|
|
|
|
info = psb_success_
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
|
|
|
|
|
|
|
ictxt = psb_cd_get_context(desc_data)
|
|
|
|
ictxt = desc_data%get_context()
|
|
|
|
call psb_info(ictxt, me, np)
|
|
|
|
call psb_info(ictxt, me, np)
|
|
|
|
|
|
|
|
|
|
|
|
if (present(trans)) then
|
|
|
|
if (present(trans)) then
|
|
|
@ -407,18 +415,19 @@ subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work)
|
|
|
|
if (present(work)) then
|
|
|
|
if (present(work)) then
|
|
|
|
work_ => work
|
|
|
|
work_ => work
|
|
|
|
else
|
|
|
|
else
|
|
|
|
iwsz = max(1,4*psb_cd_get_local_cols(desc_data))
|
|
|
|
iwsz = max(1,4*desc_data%get_local_cols())
|
|
|
|
allocate(work_(iwsz),stat=info)
|
|
|
|
allocate(work_(iwsz),stat=info)
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
if (info /= psb_success_) then
|
|
|
|
call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),&
|
|
|
|
call psb_errpush(psb_err_alloc_request_,name, &
|
|
|
|
&a_err='real(psb_dpk_)')
|
|
|
|
& i_err=(/iwsz,izero,izero,izero,izero/),&
|
|
|
|
|
|
|
|
& a_err='real(psb_spk_)')
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
if (.not.(allocated(prec%precv))) then
|
|
|
|
if (.not.(allocated(prec%precv))) then
|
|
|
|
!! Error 1: should call mld_dprecbld
|
|
|
|
!! Error 1: should call mld_sprecbld
|
|
|
|
info=3112
|
|
|
|
info=3112
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
@ -446,7 +455,7 @@ subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work)
|
|
|
|
|
|
|
|
|
|
|
|
info = psb_err_from_subroutine_ai_
|
|
|
|
info = psb_err_from_subroutine_ai_
|
|
|
|
call psb_errpush(info,name,a_err='Invalid size of precv',&
|
|
|
|
call psb_errpush(info,name,a_err='Invalid size of precv',&
|
|
|
|
& i_Err=(/size(prec%precv),0,0,0,0/))
|
|
|
|
& i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/))
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|