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.
psblas3-type-indexed
Salvatore Filippone 13 years ago
parent 74957e72b4
commit c8a5934771

@ -503,7 +503,7 @@ subroutine psb_chalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
if(err /= 0) goto 9999 if(err /= 0) goto 9999
if(present(alpha)) then if(present(alpha)) then
if(alpha /= 1.0) then if(alpha /= cone) then
call x%scal(alpha) call x%scal(alpha)
end if end if
end if end if
@ -547,7 +547,7 @@ subroutine psb_chalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
goto 9999 goto 9999
end if end if
if(info /= psb_success_) then if (info /= psb_success_) then
ch_err='PSI_swapdata' ch_err='PSI_swapdata'
call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err) call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
goto 9999 goto 9999

@ -363,7 +363,7 @@ subroutine psb_covrlv(x,desc_a,info,work,update,mode)
! exchange overlap elements ! exchange overlap elements
if (do_swap) then if (do_swap) then
call psi_swapdata(mode_,cone,x(:),& call psi_swapdata(mode_,cone,x,&
& desc_a,iwork,info,data=psb_comm_ovr_) & desc_a,iwork,info,data=psb_comm_ovr_)
end if end if
if (info == psb_success_) call psi_ovrl_upd(x,desc_a,update_,info) if (info == psb_success_) call psi_ovrl_upd(x,desc_a,update_,info)

@ -38,7 +38,7 @@
! Arguments: ! Arguments:
! x - real,dimension(:,:). The local part of the dense matrix. ! x - real,dimension(:,:). The local part of the dense matrix.
! 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
! alpha - real(optional). Scale factor. ! alpha - real(optional). Scale factor.
! jx - integer(optional). The starting column of the global matrix. ! jx - integer(optional). The starting column of the global matrix.
! ik - integer(optional). The number of columns to gather. ! ik - integer(optional). The number of columns to gather.
@ -67,7 +67,7 @@ subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
character, intent(in), optional :: tran character, intent(in), optional :: tran
! locals ! locals
integer :: ictxt, np, me,& integer :: ictxt, np, me, &
& err_act, m, n, iix, jjx, ix, ijx, k, maxk, nrow, imode, i,& & err_act, m, n, iix, jjx, ix, ijx, k, maxk, nrow, imode, i,&
& err, liwork,data_ & err, liwork,data_
real(psb_dpk_),pointer :: iwork(:), xp(:,:) real(psb_dpk_),pointer :: iwork(:), xp(:,:)
@ -118,6 +118,11 @@ subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
else else
tran_ = 'N' tran_ = 'N'
endif endif
if (present(mode)) then
imode = mode
else
imode = IOR(psb_swap_send_,psb_swap_recv_)
endif
if (present(data)) then if (present(data)) then
data_ = data data_ = data
@ -125,13 +130,6 @@ subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
data_ = psb_comm_halo_ data_ = psb_comm_halo_
endif endif
if (present(mode)) then
imode = mode
else
imode = IOR(psb_swap_send_,psb_swap_recv_)
endif
! check vector correctness ! check vector correctness
call psb_chkvect(m,1,size(x,1),ix,ijx,desc_a,info,iix,jjx) call psb_chkvect(m,1,size(x,1),ix,ijx,desc_a,info,iix,jjx)
if(info /= psb_success_) then 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 liwork=nrow
if (present(work)) then if (present(work)) then
if(size(work) >= liwork) then if(size(work) >= liwork) then
iwork => work
aliw=.false. aliw=.false.
iwork => work
else else
aliw=.true. aliw=.true.
allocate(iwork(liwork),stat=info) 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 end if
else else
aliw=.true. aliw=.true.
!!$ write(psb_err_unit,*) 'halom ',liwork
allocate(iwork(liwork),stat=info) allocate(iwork(liwork),stat=info)
if(info /= psb_success_) then if(info /= psb_success_) then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
ch_err='psb_realloc' ch_err='psb_realloc'
@ -199,12 +197,13 @@ subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
end if end if
if(info /= psb_success_) then 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) call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
goto 9999 goto 9999
end if end if
if (aliw) deallocate(iwork) if (aliw) deallocate(iwork)
nullify(iwork)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -263,6 +262,8 @@ end subroutine psb_dhalom
! 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
! alpha - real(optional). Scale factor. ! 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. ! tran - character(optional). Transpose exchange.
! mode - integer(optional). Communication mode (see Swapdata) ! mode - integer(optional). Communication mode (see Swapdata)
@ -288,9 +289,8 @@ subroutine psb_dhalov(x,desc_a,info,alpha,work,tran,mode,data)
character, intent(in), optional :: tran character, intent(in), optional :: tran
! locals ! locals
integer :: ictxt, np, me,& integer :: ictxt, np, me, err_act, &
& err_act, m, n, iix, jjx, ix, ijx, nrow, imode,& & m, n, iix, jjx, ix, ijx, nrow, imode, err, liwork,data_
& err, liwork,data_
real(psb_dpk_),pointer :: iwork(:) real(psb_dpk_),pointer :: iwork(:)
character :: tran_ character :: tran_
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -360,8 +360,8 @@ subroutine psb_dhalov(x,desc_a,info,alpha,work,tran,mode,data)
liwork=nrow liwork=nrow
if (present(work)) then if (present(work)) then
if(size(work) >= liwork) then if(size(work) >= liwork) then
iwork => work
aliw=.false. aliw=.false.
iwork => work
else else
aliw=.true. aliw=.true.
allocate(iwork(liwork),stat=info) allocate(iwork(liwork),stat=info)
@ -403,6 +403,7 @@ subroutine psb_dhalov(x,desc_a,info,alpha,work,tran,mode,data)
end if end if
if (aliw) deallocate(iwork) if (aliw) deallocate(iwork)
nullify(iwork)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return
@ -417,6 +418,7 @@ subroutine psb_dhalov(x,desc_a,info,alpha,work,tran,mode,data)
return return
end subroutine psb_dhalov end subroutine psb_dhalov
subroutine psb_dhalo_vect(x,desc_a,info,alpha,work,tran,mode,data) subroutine psb_dhalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
use psb_base_mod, psb_protect_name => psb_dhalo_vect use psb_base_mod, psb_protect_name => psb_dhalo_vect
use psi_mod use psi_mod
@ -501,7 +503,7 @@ subroutine psb_dhalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
if(err /= 0) goto 9999 if(err /= 0) goto 9999
if(present(alpha)) then if(present(alpha)) then
if(alpha /= 1.d0) then if(alpha /= done) then
call x%scal(alpha) call x%scal(alpha)
end if end if
end if end if
@ -545,13 +547,14 @@ subroutine psb_dhalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
goto 9999 goto 9999
end if end if
if(info /= psb_success_) then if (info /= psb_success_) then
ch_err='PSI_swapdata' ch_err='PSI_swapdata'
call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err) call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
goto 9999 goto 9999
end if end if
if (aliw) deallocate(iwork) if (aliw) deallocate(iwork)
nullify(iwork)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -29,6 +29,7 @@
!!$ POSSIBILITY OF SUCH DAMAGE. !!$ POSSIBILITY OF SUCH DAMAGE.
!!$ !!$
!!$ !!$
!
! File: psb_dovrl.f90 ! File: psb_dovrl.f90
! !
! Subroutine: psb_dovrlm ! Subroutine: psb_dovrlm
@ -201,7 +202,6 @@ subroutine psb_dovrlm(x,desc_a,info,jx,ik,work,update,mode)
end if end if
return return
end subroutine psb_dovrlm end subroutine psb_dovrlm
!!$ !!$
!!$ Parallel Sparse BLAS version 3.0 !!$ Parallel Sparse BLAS version 3.0
!!$ (C) Copyright 2006, 2007, 2008, 2009, 2010 !!$ (C) Copyright 2006, 2007, 2008, 2009, 2010
@ -264,7 +264,6 @@ end subroutine psb_dovrlm
! previous call with swap_send) ! previous call with swap_send)
! !
! !
!
subroutine psb_dovrlv(x,desc_a,info,work,update,mode) subroutine psb_dovrlv(x,desc_a,info,work,update,mode)
use psb_base_mod, psb_protect_name => psb_dovrlv use psb_base_mod, psb_protect_name => psb_dovrlv
use psi_mod use psi_mod
@ -364,7 +363,7 @@ subroutine psb_dovrlv(x,desc_a,info,work,update,mode)
! exchange overlap elements ! exchange overlap elements
if (do_swap) then if (do_swap) then
call psi_swapdata(mode_,done,x(:),& call psi_swapdata(mode_,done,x,&
& desc_a,iwork,info,data=psb_comm_ovr_) & desc_a,iwork,info,data=psb_comm_ovr_)
end if end if
if (info == psb_success_) call psi_ovrl_upd(x,desc_a,update_,info) if (info == psb_success_) call psi_ovrl_upd(x,desc_a,update_,info)
@ -389,6 +388,7 @@ subroutine psb_dovrlv(x,desc_a,info,work,update,mode)
return return
end subroutine psb_dovrlv end subroutine psb_dovrlv
subroutine psb_dovrl_vect(x,desc_a,info,work,update,mode) subroutine psb_dovrl_vect(x,desc_a,info,work,update,mode)
use psb_base_mod, psb_protect_name => psb_dovrl_vect use psb_base_mod, psb_protect_name => psb_dovrl_vect
use psi_mod use psi_mod

@ -38,7 +38,7 @@
! Arguments: ! Arguments:
! x - real,dimension(:,:). The local part of the dense matrix. ! x - real,dimension(:,:). The local part of the dense matrix.
! 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
! alpha - real(optional). Scale factor. ! alpha - real(optional). Scale factor.
! jx - integer(optional). The starting column of the global matrix. ! jx - integer(optional). The starting column of the global matrix.
! ik - integer(optional). The number of columns to gather. ! ik - integer(optional). The number of columns to gather.
@ -67,7 +67,7 @@ subroutine psb_shalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
character, intent(in), optional :: tran character, intent(in), optional :: tran
! locals ! locals
integer :: ictxt, np, me,& integer :: ictxt, np, me, &
& err_act, m, n, iix, jjx, ix, ijx, k, maxk, nrow, imode, i,& & err_act, m, n, iix, jjx, ix, ijx, k, maxk, nrow, imode, i,&
& err, liwork,data_ & err, liwork,data_
real(psb_spk_),pointer :: iwork(:), xp(:,:) real(psb_spk_),pointer :: iwork(:), xp(:,:)
@ -172,8 +172,8 @@ subroutine psb_shalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
end if end if
else else
aliw=.true. aliw=.true.
!!$ write(psb_err_unit,*) 'halom ',liwork
allocate(iwork(liwork),stat=info) allocate(iwork(liwork),stat=info)
if(info /= psb_success_) then if(info /= psb_success_) then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
ch_err='psb_realloc' ch_err='psb_realloc'
@ -197,7 +197,7 @@ subroutine psb_shalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
end if end if
if(info /= psb_success_) then 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) call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
goto 9999 goto 9999
end if end if
@ -262,6 +262,8 @@ end subroutine psb_shalom
! 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
! alpha - real(optional). Scale factor. ! 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. ! tran - character(optional). Transpose exchange.
! mode - integer(optional). Communication mode (see Swapdata) ! mode - integer(optional). Communication mode (see Swapdata)
@ -287,9 +289,8 @@ subroutine psb_shalov(x,desc_a,info,alpha,work,tran,mode,data)
character, intent(in), optional :: tran character, intent(in), optional :: tran
! locals ! locals
integer :: ictxt, np, me,& integer :: ictxt, np, me, err_act, &
& err_act, m, n, iix, jjx, ix, ijx, nrow, imode,& & m, n, iix, jjx, ix, ijx, nrow, imode, err, liwork,data_
& err, liwork,data_
real(psb_spk_),pointer :: iwork(:) real(psb_spk_),pointer :: iwork(:)
character :: tran_ character :: tran_
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -502,7 +503,7 @@ subroutine psb_shalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
if(err /= 0) goto 9999 if(err /= 0) goto 9999
if(present(alpha)) then if(present(alpha)) then
if(alpha /= 1.0) then if(alpha /= sone) then
call x%scal(alpha) call x%scal(alpha)
end if end if
end if end if
@ -546,7 +547,7 @@ subroutine psb_shalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
goto 9999 goto 9999
end if end if
if(info /= psb_success_) then if (info /= psb_success_) then
ch_err='PSI_swapdata' ch_err='PSI_swapdata'
call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err) call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
goto 9999 goto 9999

@ -29,6 +29,7 @@
!!$ POSSIBILITY OF SUCH DAMAGE. !!$ POSSIBILITY OF SUCH DAMAGE.
!!$ !!$
!!$ !!$
!
! File: psb_sovrl.f90 ! File: psb_sovrl.f90
! !
! Subroutine: psb_sovrlm ! Subroutine: psb_sovrlm
@ -201,7 +202,6 @@ subroutine psb_sovrlm(x,desc_a,info,jx,ik,work,update,mode)
end if end if
return return
end subroutine psb_sovrlm end subroutine psb_sovrlm
!!$ !!$
!!$ Parallel Sparse BLAS version 3.0 !!$ Parallel Sparse BLAS version 3.0
!!$ (C) Copyright 2006, 2007, 2008, 2009, 2010 !!$ (C) Copyright 2006, 2007, 2008, 2009, 2010
@ -264,7 +264,6 @@ end subroutine psb_sovrlm
! previous call with swap_send) ! previous call with swap_send)
! !
! !
!
subroutine psb_sovrlv(x,desc_a,info,work,update,mode) subroutine psb_sovrlv(x,desc_a,info,work,update,mode)
use psb_base_mod, psb_protect_name => psb_sovrlv use psb_base_mod, psb_protect_name => psb_sovrlv
use psi_mod use psi_mod
@ -364,7 +363,7 @@ subroutine psb_sovrlv(x,desc_a,info,work,update,mode)
! exchange overlap elements ! exchange overlap elements
if (do_swap) then if (do_swap) then
call psi_swapdata(mode_,sone,x(:),& call psi_swapdata(mode_,sone,x,&
& desc_a,iwork,info,data=psb_comm_ovr_) & desc_a,iwork,info,data=psb_comm_ovr_)
end if end if
if (info == psb_success_) call psi_ovrl_upd(x,desc_a,update_,info) if (info == psb_success_) call psi_ovrl_upd(x,desc_a,update_,info)

@ -197,7 +197,7 @@ subroutine psb_zhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
end if end if
if(info /= psb_success_) then 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) call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
goto 9999 goto 9999
end if 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(err /= 0) goto 9999
if(present(alpha)) then if(present(alpha)) then
if(alpha /= 1.0) then if(alpha /= zone) then
call x%scal(alpha) call x%scal(alpha)
end if end if
end if end if
@ -547,7 +547,7 @@ subroutine psb_zhalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
goto 9999 goto 9999
end if end if
if(info /= psb_success_) then if (info /= psb_success_) then
ch_err='PSI_swapdata' ch_err='PSI_swapdata'
call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err) call psb_errpush(psb_err_from_subroutine_,name,a_err=ch_err)
goto 9999 goto 9999

@ -363,7 +363,7 @@ subroutine psb_zovrlv(x,desc_a,info,work,update,mode)
! exchange overlap elements ! exchange overlap elements
if (do_swap) then if (do_swap) then
call psi_swapdata(mode_,zone,x(:),& call psi_swapdata(mode_,zone,x,&
& desc_a,iwork,info,data=psb_comm_ovr_) & desc_a,iwork,info,data=psb_comm_ovr_)
end if end if
if (info == psb_success_) call psi_ovrl_upd(x,desc_a,update_,info) 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 character(len=20) :: name, ch_err
logical :: aliw logical :: aliw
name='psb_covrlv' name='psb_zovrlv'
if(psb_get_errstatus() /= 0) return if(psb_get_errstatus() /= 0) return
info=psb_success_ info=psb_success_
call psb_erractionsave(err_act) call psb_erractionsave(err_act)

Loading…
Cancel
Save