|
|
@ -42,18 +42,20 @@
|
|
|
|
! x(:,:) - complex, allocatable The matrix to be assembled.
|
|
|
|
! x(:,:) - complex, allocatable The matrix to be assembled.
|
|
|
|
! desc_a - type(psb_desc_type). The communication descriptor.
|
|
|
|
! desc_a - type(psb_desc_type). The communication descriptor.
|
|
|
|
! info - integer. return code
|
|
|
|
! info - integer. return code
|
|
|
|
subroutine psb_casb(x, desc_a, info)
|
|
|
|
subroutine psb_casb(x, desc_a, info, scratch)
|
|
|
|
use psb_base_mod, psb_protect_name => psb_casb
|
|
|
|
use psb_base_mod, psb_protect_name => psb_casb
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
complex(psb_spk_), allocatable, intent(inout) :: x(:,:)
|
|
|
|
complex(psb_spk_), allocatable, intent(inout) :: x(:,:)
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
logical, intent(in), optional :: scratch
|
|
|
|
|
|
|
|
|
|
|
|
! local variables
|
|
|
|
! local variables
|
|
|
|
integer(psb_ipk_) :: ictxt,np,me,nrow,ncol, err_act
|
|
|
|
integer(psb_ipk_) :: ictxt,np,me,nrow,ncol, err_act
|
|
|
|
integer(psb_ipk_) :: i1sz, i2sz
|
|
|
|
integer(psb_ipk_) :: i1sz, i2sz
|
|
|
|
integer(psb_ipk_) :: debug_level, debug_unit
|
|
|
|
integer(psb_ipk_) :: debug_level, debug_unit
|
|
|
|
|
|
|
|
logical :: scratch_
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
|
|
|
|
|
|
|
|
if(psb_get_errstatus() /= 0) return
|
|
|
|
if(psb_get_errstatus() /= 0) return
|
|
|
@ -62,6 +64,8 @@ subroutine psb_casb(x, desc_a, info)
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
debug_unit = psb_get_debug_unit()
|
|
|
|
debug_unit = psb_get_debug_unit()
|
|
|
|
debug_level = psb_get_debug_level()
|
|
|
|
debug_level = psb_get_debug_level()
|
|
|
|
|
|
|
|
scratch_ = .false.
|
|
|
|
|
|
|
|
if (present(scratch)) scratch_ = scratch
|
|
|
|
|
|
|
|
|
|
|
|
if (.not.psb_is_ok_desc(desc_a)) then
|
|
|
|
if (.not.psb_is_ok_desc(desc_a)) then
|
|
|
|
info=psb_err_input_matrix_unassembled_
|
|
|
|
info=psb_err_input_matrix_unassembled_
|
|
|
@ -107,13 +111,15 @@ subroutine psb_casb(x, desc_a, info)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
! ..update halo elements..
|
|
|
|
if (.not.scratch_) then
|
|
|
|
call psb_halo(x,desc_a,info)
|
|
|
|
! ..update halo elements..
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
call psb_halo(x,desc_a,info)
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
ch_err='psb_halo'
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
ch_err='psb_halo'
|
|
|
|
goto 9999
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
if (debug_level >= psb_debug_ext_) &
|
|
|
|
if (debug_level >= psb_debug_ext_) &
|
|
|
|
& write(debug_unit,*) me,' ',trim(name),': end'
|
|
|
|
& write(debug_unit,*) me,' ',trim(name),': end'
|
|
|
@ -170,18 +176,20 @@ end subroutine psb_casb
|
|
|
|
! x(:) - complex, allocatable The matrix to be assembled.
|
|
|
|
! x(:) - complex, allocatable The matrix to be assembled.
|
|
|
|
! desc_a - type(psb_desc_type). The communication descriptor.
|
|
|
|
! desc_a - type(psb_desc_type). The communication descriptor.
|
|
|
|
! info - integer. Return code
|
|
|
|
! info - integer. Return code
|
|
|
|
subroutine psb_casbv(x, desc_a, info)
|
|
|
|
subroutine psb_casbv(x, desc_a, info, scratch)
|
|
|
|
use psb_base_mod, psb_protect_name => psb_casbv
|
|
|
|
use psb_base_mod, psb_protect_name => psb_casbv
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
complex(psb_spk_), allocatable, intent(inout) :: x(:)
|
|
|
|
complex(psb_spk_), allocatable, intent(inout) :: x(:)
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
logical, intent(in), optional :: scratch
|
|
|
|
|
|
|
|
|
|
|
|
! local variables
|
|
|
|
! local variables
|
|
|
|
integer(psb_ipk_) :: ictxt,np,me
|
|
|
|
integer(psb_ipk_) :: ictxt,np,me
|
|
|
|
integer(psb_ipk_) :: int_err(5), i1sz,nrow,ncol, err_act
|
|
|
|
integer(psb_ipk_) :: int_err(5), i1sz,nrow,ncol, err_act
|
|
|
|
integer(psb_ipk_) :: debug_level, debug_unit
|
|
|
|
integer(psb_ipk_) :: debug_level, debug_unit
|
|
|
|
|
|
|
|
logical :: scratch_
|
|
|
|
character(len=20) :: name,ch_err
|
|
|
|
character(len=20) :: name,ch_err
|
|
|
|
|
|
|
|
|
|
|
|
info = psb_success_
|
|
|
|
info = psb_success_
|
|
|
@ -191,6 +199,8 @@ subroutine psb_casbv(x, desc_a, info)
|
|
|
|
ictxt = desc_a%get_context()
|
|
|
|
ictxt = desc_a%get_context()
|
|
|
|
debug_unit = psb_get_debug_unit()
|
|
|
|
debug_unit = psb_get_debug_unit()
|
|
|
|
debug_level = psb_get_debug_level()
|
|
|
|
debug_level = psb_get_debug_level()
|
|
|
|
|
|
|
|
scratch_ = .false.
|
|
|
|
|
|
|
|
if (present(scratch)) scratch_ = scratch
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt, me, np)
|
|
|
|
call psb_info(ictxt, me, np)
|
|
|
|
|
|
|
|
|
|
|
@ -221,13 +231,15 @@ subroutine psb_casbv(x, desc_a, info)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
! ..update halo elements..
|
|
|
|
if (.not.scratch_) then
|
|
|
|
call psb_halo(x,desc_a,info)
|
|
|
|
! ..update halo elements..
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
call psb_halo(x,desc_a,info)
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
ch_err='f90_pshalo'
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
ch_err='f90_pshalo'
|
|
|
|
goto 9999
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
if (debug_level >= psb_debug_ext_) &
|
|
|
|
if (debug_level >= psb_debug_ext_) &
|
|
|
|
& write(debug_unit,*) me,' ',trim(name),': end'
|
|
|
|
& write(debug_unit,*) me,' ',trim(name),': end'
|
|
|
|