mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 04:42:08 +00:00
psblas3:
base/comm/psb_chalo.f90 base/comm/psb_covrl.f90 base/comm/psb_dhalo.f90 base/comm/psb_dovrl.f90 base/comm/psb_shalo.f90 base/comm/psb_sovrl.f90 base/comm/psb_zhalo.f90 base/comm/psb_zovrl.f90 Preprocessed versions.
This commit is contained in:
@@ -503,7 +503,7 @@ subroutine psb_chalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
if(err /= 0) goto 9999
|
||||
|
||||
if(present(alpha)) then
|
||||
if(alpha /= 1.0) then
|
||||
if(alpha /= cone) then
|
||||
call x%scal(alpha)
|
||||
end if
|
||||
end if
|
||||
@@ -547,7 +547,7 @@ subroutine psb_chalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if(info /= psb_success_) then
|
||||
if (info /= psb_success_) then
|
||||
ch_err='PSI_swapdata'
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
|
||||
goto 9999
|
||||
|
||||
@@ -363,7 +363,7 @@ subroutine psb_covrlv(x,desc_a,info,work,update,mode)
|
||||
|
||||
! exchange overlap elements
|
||||
if (do_swap) then
|
||||
call psi_swapdata(mode_,cone,x(:),&
|
||||
call psi_swapdata(mode_,cone,x,&
|
||||
& desc_a,iwork,info,data=psb_comm_ovr_)
|
||||
end if
|
||||
if (info == psb_success_) call psi_ovrl_upd(x,desc_a,update_,info)
|
||||
|
||||
+43
-40
@@ -33,16 +33,16 @@
|
||||
!
|
||||
! Subroutine: psb_dhalom
|
||||
! This subroutine performs the exchange of the halo elements in a
|
||||
! distributed dense matrix between all the processes.
|
||||
! distributed dense matrix between all the processes.
|
||||
!
|
||||
! Arguments:
|
||||
! x - real,dimension(:,:). The local part of the dense matrix.
|
||||
! desc_a - type(psb_desc_type). The communication descriptor.
|
||||
! info - integer. return code.
|
||||
! alpha - real(optional). Scale factor.
|
||||
! info - integer. Return code
|
||||
! alpha - real(optional). Scale factor.
|
||||
! jx - integer(optional). The starting column of the global matrix.
|
||||
! ik - integer(optional). The number of columns to gather.
|
||||
! work - real(optional). Work area.
|
||||
! work - real(optional). Work area.
|
||||
! tran - character(optional). Transpose exchange.
|
||||
! mode - integer(optional). Communication mode (see Swapdata)
|
||||
! data - integer Which index list in desc_a should be used
|
||||
@@ -62,12 +62,12 @@ subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_dpk_), intent(in), optional :: alpha
|
||||
real(psb_dpk_), optional, target, intent(inout) :: work(:)
|
||||
real(psb_dpk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: mode,jx,ik,data
|
||||
character, intent(in), optional :: tran
|
||||
|
||||
! locals
|
||||
integer :: ictxt, np, me,&
|
||||
integer :: ictxt, np, me, &
|
||||
& err_act, m, n, iix, jjx, ix, ijx, k, maxk, nrow, imode, i,&
|
||||
& err, liwork,data_
|
||||
real(psb_dpk_),pointer :: iwork(:), xp(:,:)
|
||||
@@ -89,7 +89,7 @@ subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
|
||||
ix = 1
|
||||
if (present(jx)) then
|
||||
ijx = jx
|
||||
@@ -118,6 +118,11 @@ subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
else
|
||||
tran_ = 'N'
|
||||
endif
|
||||
if (present(mode)) then
|
||||
imode = mode
|
||||
else
|
||||
imode = IOR(psb_swap_send_,psb_swap_recv_)
|
||||
endif
|
||||
|
||||
if (present(data)) then
|
||||
data_ = data
|
||||
@@ -125,13 +130,6 @@ subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
data_ = psb_comm_halo_
|
||||
endif
|
||||
|
||||
|
||||
if (present(mode)) then
|
||||
imode = mode
|
||||
else
|
||||
imode = IOR(psb_swap_send_,psb_swap_recv_)
|
||||
endif
|
||||
|
||||
! check vector correctness
|
||||
call psb_chkvect(m,1,size(x,1),ix,ijx,desc_a,info,iix,jjx)
|
||||
if(info /= psb_success_) then
|
||||
@@ -160,8 +158,8 @@ subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
liwork=nrow
|
||||
if (present(work)) then
|
||||
if(size(work) >= liwork) then
|
||||
iwork => work
|
||||
aliw=.false.
|
||||
iwork => work
|
||||
else
|
||||
aliw=.true.
|
||||
allocate(iwork(liwork),stat=info)
|
||||
@@ -174,8 +172,8 @@ subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
end if
|
||||
else
|
||||
aliw=.true.
|
||||
!!$ write(psb_err_unit,*) 'halom ',liwork
|
||||
allocate(iwork(liwork),stat=info)
|
||||
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_realloc'
|
||||
@@ -199,12 +197,13 @@ subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
end if
|
||||
|
||||
if(info /= psb_success_) then
|
||||
ch_err='PSI_dSwapdata'
|
||||
ch_err='PSI_cswapdata'
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if (aliw) deallocate(iwork)
|
||||
nullify(iwork)
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
@@ -256,18 +255,20 @@ end subroutine psb_dhalom
|
||||
!
|
||||
! Subroutine: psb_dhalov
|
||||
! This subroutine performs the exchange of the halo elements in a
|
||||
! distributed dense vector between all the processes.
|
||||
! distributed dense vector between all the processes.
|
||||
!
|
||||
! Arguments:
|
||||
! x - real,dimension(:). The local part of the dense vector.
|
||||
! desc_a - type(psb_desc_type). The communication descriptor.
|
||||
! info - integer. Return code
|
||||
! alpha - real(optional). Scale factor.
|
||||
! work - real(optional). Work area.
|
||||
! alpha - real(optional). Scale factor.
|
||||
! jx - integer(optional). The starting column of the global matrix.
|
||||
! ik - integer(optional). The number of columns to gather.
|
||||
! work - real(optional). Work area.
|
||||
! tran - character(optional). Transpose exchange.
|
||||
! mode - integer(optional). Communication mode (see Swapdata)
|
||||
! data - integer Which index list in desc_a should be used
|
||||
! to retrieve rows, default psb_comm_halo_
|
||||
! data - integer Which index list in desc_a should be used
|
||||
! to retrieve rows, default psb_comm_halo_
|
||||
! psb_comm_halo_ use halo_index
|
||||
! psb_comm_ext_ use ext_index
|
||||
! psb_comm_ovrl_ use ovrl_index
|
||||
@@ -279,18 +280,17 @@ subroutine psb_dhalov(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
use psi_mod
|
||||
implicit none
|
||||
|
||||
real(psb_dpk_), intent(inout) :: x(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_dpk_), intent(in), optional :: alpha
|
||||
real(psb_dpk_), target, optional, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: mode,data
|
||||
character, intent(in), optional :: tran
|
||||
real(psb_dpk_), intent(inout) :: x(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_dpk_), intent(in), optional :: alpha
|
||||
real(psb_dpk_), target, optional, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: mode,data
|
||||
character, intent(in), optional :: tran
|
||||
|
||||
! locals
|
||||
integer :: ictxt, np, me,&
|
||||
& err_act, m, n, iix, jjx, ix, ijx, nrow, imode,&
|
||||
& err, liwork,data_
|
||||
integer :: ictxt, np, me, err_act, &
|
||||
& m, n, iix, jjx, ix, ijx, nrow, imode, err, liwork,data_
|
||||
real(psb_dpk_),pointer :: iwork(:)
|
||||
character :: tran_
|
||||
character(len=20) :: name, ch_err
|
||||
@@ -360,8 +360,8 @@ subroutine psb_dhalov(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
liwork=nrow
|
||||
if (present(work)) then
|
||||
if(size(work) >= liwork) then
|
||||
iwork => work
|
||||
aliw=.false.
|
||||
iwork => work
|
||||
else
|
||||
aliw=.true.
|
||||
allocate(iwork(liwork),stat=info)
|
||||
@@ -403,6 +403,7 @@ subroutine psb_dhalov(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
end if
|
||||
|
||||
if (aliw) deallocate(iwork)
|
||||
nullify(iwork)
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
@@ -417,15 +418,16 @@ subroutine psb_dhalov(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
return
|
||||
end subroutine psb_dhalov
|
||||
|
||||
|
||||
subroutine psb_dhalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
use psb_base_mod, psb_protect_name => psb_dhalo_vect
|
||||
use psi_mod
|
||||
implicit none
|
||||
|
||||
type(psb_d_vect_type), intent(inout) :: x
|
||||
type(psb_d_vect_type), intent(inout) :: x
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_dpk_), intent(in), optional :: alpha
|
||||
real(psb_dpk_), intent(in), optional :: alpha
|
||||
real(psb_dpk_), target, optional, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: mode,data
|
||||
character, intent(in), optional :: tran
|
||||
@@ -435,9 +437,9 @@ subroutine psb_dhalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
& err_act, m, n, iix, jjx, ix, ijx, nrow, imode,&
|
||||
& err, liwork,data_
|
||||
real(psb_dpk_),pointer :: iwork(:)
|
||||
character :: tran_
|
||||
character(len=20) :: name, ch_err
|
||||
logical :: aliw
|
||||
character :: tran_
|
||||
character(len=20) :: name, ch_err
|
||||
logical :: aliw
|
||||
|
||||
name='psb_dhalov'
|
||||
if(psb_get_errstatus() /= 0) return
|
||||
@@ -501,7 +503,7 @@ subroutine psb_dhalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
if(err /= 0) goto 9999
|
||||
|
||||
if(present(alpha)) then
|
||||
if(alpha /= 1.d0) then
|
||||
if(alpha /= done) then
|
||||
call x%scal(alpha)
|
||||
end if
|
||||
end if
|
||||
@@ -545,13 +547,14 @@ subroutine psb_dhalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if(info /= psb_success_) then
|
||||
if (info /= psb_success_) then
|
||||
ch_err='PSI_swapdata'
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if (aliw) deallocate(iwork)
|
||||
nullify(iwork)
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
+20
-20
@@ -29,14 +29,15 @@
|
||||
!!$ POSSIBILITY OF SUCH DAMAGE.
|
||||
!!$
|
||||
!!$
|
||||
!
|
||||
! File: psb_dovrl.f90
|
||||
!
|
||||
! Subroutine: psb_dovrlm
|
||||
! This subroutine performs the exchange of the overlap elements in a
|
||||
! distributed dense matrix between all the processes.
|
||||
! distributed dense matrix between all the processes.
|
||||
!
|
||||
! Arguments:
|
||||
! x(:,:) - real The local part of the dense matrix.
|
||||
! x(:,:) - real The local part of the dense matrix.
|
||||
! desc_a - type(psb_desc_type). The communication descriptor.
|
||||
! info - integer. Return code.
|
||||
! jx - integer(optional). The starting column of the global matrix
|
||||
@@ -68,11 +69,11 @@ subroutine psb_dovrlm(x,desc_a,info,jx,ik,work,update,mode)
|
||||
use psi_mod
|
||||
implicit none
|
||||
|
||||
real(psb_dpk_), intent(inout), target :: x(:,:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_dpk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: update,jx,ik,mode
|
||||
real(psb_dpk_), intent(inout), target :: x(:,:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_dpk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: update,jx,ik,mode
|
||||
|
||||
! locals
|
||||
integer :: ictxt, np, me, &
|
||||
@@ -172,7 +173,7 @@ subroutine psb_dovrlm(x,desc_a,info,jx,ik,work,update,mode)
|
||||
goto 9999
|
||||
end if
|
||||
else
|
||||
iwork => work
|
||||
iwork => work
|
||||
end if
|
||||
! exchange overlap elements
|
||||
if(do_swap) then
|
||||
@@ -201,7 +202,6 @@ subroutine psb_dovrlm(x,desc_a,info,jx,ik,work,update,mode)
|
||||
end if
|
||||
return
|
||||
end subroutine psb_dovrlm
|
||||
|
||||
!!$
|
||||
!!$ Parallel Sparse BLAS version 3.0
|
||||
!!$ (C) Copyright 2006, 2007, 2008, 2009, 2010
|
||||
@@ -236,10 +236,10 @@ end subroutine psb_dovrlm
|
||||
!
|
||||
! Subroutine: psb_dovrlv
|
||||
! This subroutine performs the exchange of the overlap elements in a
|
||||
! distributed dense vector between all the processes.
|
||||
! distributed dense vector between all the processes.
|
||||
!
|
||||
! Arguments:
|
||||
! x(:) - real The local part of the dense vector.
|
||||
! x(:) - real The local part of the dense vector.
|
||||
! desc_a - type(psb_desc_type). The communication descriptor.
|
||||
! info - integer. Return code.
|
||||
! work - real(optional). A work area.
|
||||
@@ -264,17 +264,16 @@ end subroutine psb_dovrlm
|
||||
! previous call with swap_send)
|
||||
!
|
||||
!
|
||||
!
|
||||
subroutine psb_dovrlv(x,desc_a,info,work,update,mode)
|
||||
use psb_base_mod, psb_protect_name => psb_dovrlv
|
||||
use psi_mod
|
||||
implicit none
|
||||
|
||||
real(psb_dpk_), intent(inout), target :: x(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_dpk_), intent(inout), target :: x(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_dpk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: update,mode
|
||||
integer, intent(in), optional :: update,mode
|
||||
|
||||
! locals
|
||||
integer :: ictxt, np, me, &
|
||||
@@ -364,7 +363,7 @@ subroutine psb_dovrlv(x,desc_a,info,work,update,mode)
|
||||
|
||||
! exchange overlap elements
|
||||
if (do_swap) then
|
||||
call psi_swapdata(mode_,done,x(:),&
|
||||
call psi_swapdata(mode_,done,x,&
|
||||
& desc_a,iwork,info,data=psb_comm_ovr_)
|
||||
end if
|
||||
if (info == psb_success_) call psi_ovrl_upd(x,desc_a,update_,info)
|
||||
@@ -389,16 +388,17 @@ subroutine psb_dovrlv(x,desc_a,info,work,update,mode)
|
||||
return
|
||||
end subroutine psb_dovrlv
|
||||
|
||||
|
||||
subroutine psb_dovrl_vect(x,desc_a,info,work,update,mode)
|
||||
use psb_base_mod, psb_protect_name => psb_dovrl_vect
|
||||
use psi_mod
|
||||
implicit none
|
||||
|
||||
type(psb_d_vect_type), intent(inout) :: x
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_dpk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: update,mode
|
||||
integer, intent(in), optional :: update,mode
|
||||
|
||||
! locals
|
||||
integer :: ictxt, np, me, &
|
||||
|
||||
+35
-34
@@ -33,16 +33,16 @@
|
||||
!
|
||||
! Subroutine: psb_shalom
|
||||
! This subroutine performs the exchange of the halo elements in a
|
||||
! distributed dense matrix between all the processes.
|
||||
! distributed dense matrix between all the processes.
|
||||
!
|
||||
! Arguments:
|
||||
! x - real,dimension(:,:). The local part of the dense matrix.
|
||||
! desc_a - type(psb_desc_type). The communication descriptor.
|
||||
! info - integer. return code.
|
||||
! alpha - real(optional). Scale factor.
|
||||
! info - integer. Return code
|
||||
! alpha - real(optional). Scale factor.
|
||||
! jx - integer(optional). The starting column of the global matrix.
|
||||
! ik - integer(optional). The number of columns to gather.
|
||||
! work - real(optional). Work area.
|
||||
! work - real(optional). Work area.
|
||||
! tran - character(optional). Transpose exchange.
|
||||
! mode - integer(optional). Communication mode (see Swapdata)
|
||||
! data - integer Which index list in desc_a should be used
|
||||
@@ -59,18 +59,18 @@ subroutine psb_shalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
implicit none
|
||||
|
||||
real(psb_spk_), intent(inout), target :: x(:,:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_spk_), intent(in), optional :: alpha
|
||||
real(psb_spk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: mode,jx,ik,data
|
||||
character, intent(in), optional :: tran
|
||||
integer, intent(in), optional :: mode,jx,ik,data
|
||||
character, intent(in), optional :: tran
|
||||
|
||||
! locals
|
||||
integer :: ictxt, np, me,&
|
||||
integer :: ictxt, np, me, &
|
||||
& err_act, m, n, iix, jjx, ix, ijx, k, maxk, nrow, imode, i,&
|
||||
& err, liwork,data_
|
||||
real(psb_spk_),pointer :: iwork(:), xp(:,:)
|
||||
real(psb_spk_),pointer :: iwork(:), xp(:,:)
|
||||
character :: tran_
|
||||
character(len=20) :: name, ch_err
|
||||
logical :: aliw
|
||||
@@ -89,7 +89,7 @@ subroutine psb_shalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
|
||||
ix = 1
|
||||
if (present(jx)) then
|
||||
ijx = jx
|
||||
@@ -172,8 +172,8 @@ subroutine psb_shalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
end if
|
||||
else
|
||||
aliw=.true.
|
||||
!!$ write(psb_err_unit,*) 'halom ',liwork
|
||||
allocate(iwork(liwork),stat=info)
|
||||
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_realloc'
|
||||
@@ -197,7 +197,7 @@ subroutine psb_shalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
end if
|
||||
|
||||
if(info /= psb_success_) then
|
||||
ch_err='PSI_sSwapdata'
|
||||
ch_err='PSI_cswapdata'
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
@@ -255,18 +255,20 @@ end subroutine psb_shalom
|
||||
!
|
||||
! Subroutine: psb_shalov
|
||||
! This subroutine performs the exchange of the halo elements in a
|
||||
! distributed dense vector between all the processes.
|
||||
! distributed dense vector between all the processes.
|
||||
!
|
||||
! Arguments:
|
||||
! x - real,dimension(:). The local part of the dense vector.
|
||||
! desc_a - type(psb_desc_type). The communication descriptor.
|
||||
! info - integer. Return code
|
||||
! alpha - real(optional). Scale factor.
|
||||
! work - real(optional). Work area.
|
||||
! alpha - real(optional). Scale factor.
|
||||
! jx - integer(optional). The starting column of the global matrix.
|
||||
! ik - integer(optional). The number of columns to gather.
|
||||
! work - real(optional). Work area.
|
||||
! tran - character(optional). Transpose exchange.
|
||||
! mode - integer(optional). Communication mode (see Swapdata)
|
||||
! data - integer Which index list in desc_a should be used
|
||||
! to retrieve rows, default psb_comm_halo_
|
||||
! data - integer Which index list in desc_a should be used
|
||||
! to retrieve rows, default psb_comm_halo_
|
||||
! psb_comm_halo_ use halo_index
|
||||
! psb_comm_ext_ use ext_index
|
||||
! psb_comm_ovrl_ use ovrl_index
|
||||
@@ -278,18 +280,17 @@ subroutine psb_shalov(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
use psi_mod
|
||||
implicit none
|
||||
|
||||
real(psb_spk_), intent(inout) :: x(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_spk_), intent(in), optional :: alpha
|
||||
real(psb_spk_), intent(inout) :: x(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_spk_), intent(in), optional :: alpha
|
||||
real(psb_spk_), target, optional, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: mode,data
|
||||
character, intent(in), optional :: tran
|
||||
integer, intent(in), optional :: mode,data
|
||||
character, intent(in), optional :: tran
|
||||
|
||||
! locals
|
||||
integer :: ictxt, np, me,&
|
||||
& err_act, m, n, iix, jjx, ix, ijx, nrow, imode,&
|
||||
& err, liwork,data_
|
||||
integer :: ictxt, np, me, err_act, &
|
||||
& m, n, iix, jjx, ix, ijx, nrow, imode, err, liwork,data_
|
||||
real(psb_spk_),pointer :: iwork(:)
|
||||
character :: tran_
|
||||
character(len=20) :: name, ch_err
|
||||
@@ -423,10 +424,10 @@ subroutine psb_shalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
use psi_mod
|
||||
implicit none
|
||||
|
||||
type(psb_s_vect_type), intent(inout) :: x
|
||||
type(psb_s_vect_type), intent(inout) :: x
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_spk_), intent(in), optional :: alpha
|
||||
real(psb_spk_), intent(in), optional :: alpha
|
||||
real(psb_spk_), target, optional, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: mode,data
|
||||
character, intent(in), optional :: tran
|
||||
@@ -436,9 +437,9 @@ subroutine psb_shalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
& err_act, m, n, iix, jjx, ix, ijx, nrow, imode,&
|
||||
& err, liwork,data_
|
||||
real(psb_spk_),pointer :: iwork(:)
|
||||
character :: tran_
|
||||
character(len=20) :: name, ch_err
|
||||
logical :: aliw
|
||||
character :: tran_
|
||||
character(len=20) :: name, ch_err
|
||||
logical :: aliw
|
||||
|
||||
name='psb_shalov'
|
||||
if(psb_get_errstatus() /= 0) return
|
||||
@@ -502,7 +503,7 @@ subroutine psb_shalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
if(err /= 0) goto 9999
|
||||
|
||||
if(present(alpha)) then
|
||||
if(alpha /= 1.0) then
|
||||
if(alpha /= sone) then
|
||||
call x%scal(alpha)
|
||||
end if
|
||||
end if
|
||||
@@ -546,7 +547,7 @@ subroutine psb_shalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if(info /= psb_success_) then
|
||||
if (info /= psb_success_) then
|
||||
ch_err='PSI_swapdata'
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
|
||||
goto 9999
|
||||
|
||||
+19
-20
@@ -29,14 +29,15 @@
|
||||
!!$ POSSIBILITY OF SUCH DAMAGE.
|
||||
!!$
|
||||
!!$
|
||||
!
|
||||
! File: psb_sovrl.f90
|
||||
!
|
||||
! Subroutine: psb_sovrlm
|
||||
! This subroutine performs the exchange of the overlap elements in a
|
||||
! distributed dense matrix between all the processes.
|
||||
! distributed dense matrix between all the processes.
|
||||
!
|
||||
! Arguments:
|
||||
! x(:,:) - real The local part of the dense matrix.
|
||||
! x(:,:) - real The local part of the dense matrix.
|
||||
! desc_a - type(psb_desc_type). The communication descriptor.
|
||||
! info - integer. Return code.
|
||||
! jx - integer(optional). The starting column of the global matrix
|
||||
@@ -68,11 +69,11 @@ subroutine psb_sovrlm(x,desc_a,info,jx,ik,work,update,mode)
|
||||
use psi_mod
|
||||
implicit none
|
||||
|
||||
real(psb_spk_), intent(inout), target :: x(:,:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_spk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: update,jx,ik,mode
|
||||
real(psb_spk_), intent(inout), target :: x(:,:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_spk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: update,jx,ik,mode
|
||||
|
||||
! locals
|
||||
integer :: ictxt, np, me, &
|
||||
@@ -201,7 +202,6 @@ subroutine psb_sovrlm(x,desc_a,info,jx,ik,work,update,mode)
|
||||
end if
|
||||
return
|
||||
end subroutine psb_sovrlm
|
||||
|
||||
!!$
|
||||
!!$ Parallel Sparse BLAS version 3.0
|
||||
!!$ (C) Copyright 2006, 2007, 2008, 2009, 2010
|
||||
@@ -236,10 +236,10 @@ end subroutine psb_sovrlm
|
||||
!
|
||||
! Subroutine: psb_sovrlv
|
||||
! This subroutine performs the exchange of the overlap elements in a
|
||||
! distributed dense vector between all the processes.
|
||||
! distributed dense vector between all the processes.
|
||||
!
|
||||
! Arguments:
|
||||
! x(:) - real The local part of the dense vector.
|
||||
! x(:) - real The local part of the dense vector.
|
||||
! desc_a - type(psb_desc_type). The communication descriptor.
|
||||
! info - integer. Return code.
|
||||
! work - real(optional). A work area.
|
||||
@@ -264,17 +264,16 @@ end subroutine psb_sovrlm
|
||||
! previous call with swap_send)
|
||||
!
|
||||
!
|
||||
!
|
||||
subroutine psb_sovrlv(x,desc_a,info,work,update,mode)
|
||||
use psb_base_mod, psb_protect_name => psb_sovrlv
|
||||
use psi_mod
|
||||
implicit none
|
||||
|
||||
real(psb_spk_), intent(inout), target :: x(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_spk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: update,mode
|
||||
real(psb_spk_), intent(inout), target :: x(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_spk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: update,mode
|
||||
|
||||
! locals
|
||||
integer :: ictxt, np, me, &
|
||||
@@ -364,7 +363,7 @@ subroutine psb_sovrlv(x,desc_a,info,work,update,mode)
|
||||
|
||||
! exchange overlap elements
|
||||
if (do_swap) then
|
||||
call psi_swapdata(mode_,sone,x(:),&
|
||||
call psi_swapdata(mode_,sone,x,&
|
||||
& desc_a,iwork,info,data=psb_comm_ovr_)
|
||||
end if
|
||||
if (info == psb_success_) call psi_ovrl_upd(x,desc_a,update_,info)
|
||||
@@ -396,10 +395,10 @@ subroutine psb_sovrl_vect(x,desc_a,info,work,update,mode)
|
||||
implicit none
|
||||
|
||||
type(psb_s_vect_type), intent(inout) :: x
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
real(psb_spk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: update,mode
|
||||
integer, intent(in), optional :: update,mode
|
||||
|
||||
! locals
|
||||
integer :: ictxt, np, me, &
|
||||
|
||||
@@ -58,10 +58,10 @@ subroutine psb_zhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
use psi_mod
|
||||
implicit none
|
||||
|
||||
complex(psb_dpk_), intent(inout), target :: x(:,:)
|
||||
complex(psb_dpk_), intent(inout), target :: x(:,:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
complex(psb_dpk_), intent(in), optional :: alpha
|
||||
complex(psb_dpk_), intent(in), optional :: alpha
|
||||
complex(psb_dpk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: mode,jx,ik,data
|
||||
character, intent(in), optional :: tran
|
||||
@@ -197,7 +197,7 @@ subroutine psb_zhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
||||
end if
|
||||
|
||||
if(info /= psb_success_) then
|
||||
ch_err='PSI_zswapdata'
|
||||
ch_err='PSI_cswapdata'
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
@@ -503,7 +503,7 @@ subroutine psb_zhalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
if(err /= 0) goto 9999
|
||||
|
||||
if(present(alpha)) then
|
||||
if(alpha /= 1.0) then
|
||||
if(alpha /= zone) then
|
||||
call x%scal(alpha)
|
||||
end if
|
||||
end if
|
||||
@@ -547,7 +547,7 @@ subroutine psb_zhalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if(info /= psb_success_) then
|
||||
if (info /= psb_success_) then
|
||||
ch_err='PSI_swapdata'
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
|
||||
goto 9999
|
||||
|
||||
@@ -72,7 +72,7 @@ subroutine psb_zovrlm(x,desc_a,info,jx,ik,work,update,mode)
|
||||
complex(psb_dpk_), intent(inout), target :: x(:,:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
complex(psb_dpk_), optional, target, intent(inout) :: work(:)
|
||||
complex(psb_dpk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: update,jx,ik,mode
|
||||
|
||||
! locals
|
||||
@@ -269,11 +269,11 @@ subroutine psb_zovrlv(x,desc_a,info,work,update,mode)
|
||||
use psi_mod
|
||||
implicit none
|
||||
|
||||
complex(psb_dpk_), intent(inout), target :: x(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
complex(psb_dpk_), intent(inout), target :: x(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
integer, intent(out) :: info
|
||||
complex(psb_dpk_), optional, target, intent(inout) :: work(:)
|
||||
integer, intent(in), optional :: update,mode
|
||||
integer, intent(in), optional :: update,mode
|
||||
|
||||
! locals
|
||||
integer :: ictxt, np, me, &
|
||||
@@ -363,7 +363,7 @@ subroutine psb_zovrlv(x,desc_a,info,work,update,mode)
|
||||
|
||||
! exchange overlap elements
|
||||
if (do_swap) then
|
||||
call psi_swapdata(mode_,zone,x(:),&
|
||||
call psi_swapdata(mode_,zone,x,&
|
||||
& desc_a,iwork,info,data=psb_comm_ovr_)
|
||||
end if
|
||||
if (info == psb_success_) call psi_ovrl_upd(x,desc_a,update_,info)
|
||||
@@ -409,7 +409,7 @@ subroutine psb_zovrl_vect(x,desc_a,info,work,update,mode)
|
||||
character(len=20) :: name, ch_err
|
||||
logical :: aliw
|
||||
|
||||
name='psb_covrlv'
|
||||
name='psb_zovrlv'
|
||||
if(psb_get_errstatus() /= 0) return
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
Reference in New Issue
Block a user