psblas-3.3-maint:

Merged changes from trunk in preparation for 3.3.1
psblas-3.3.1-1
Salvatore Filippone 12 years ago
commit 1c4843308d

@ -1,5 +1,12 @@
Changelog. A lot less detailed than usual, at least for past
history.
2015/01/05: Fix silly bug in format conversion csr_from_coo.
2014/12/21: Change error handling routines to make them more flexible for
C binding. More compact prologues/epilogues.
2014/11/12: Fix silly bug in MMIO: cycling through rank-2 dense read/write was
transposing!
2014/10/22: Implement norm-1 and norm-infinity at base_sparse_mat relying
on srwsum/aclsum.

@ -127,7 +127,7 @@ subroutine psb_cgatherm(globx, locx, desc_a, info, iroot)
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,k,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
@ -160,13 +160,8 @@ subroutine psb_cgatherm(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cgatherm
@ -298,21 +293,21 @@ subroutine psb_cgatherv(globx, locx, desc_a, info, iroot)
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
goto 9999
end if
globx(:)=czero
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)
globx(idx) = locx(i)
end do
! adjust overlapped elements
do i=1, size(desc_a%ovrlap_elem,1)
if (me /= desc_a%ovrlap_elem(i,3)) then
@ -321,19 +316,14 @@ subroutine psb_cgatherv(globx, locx, desc_a, info, iroot)
globx(idx) = czero
end if
end do
call psb_sum(ictxt,globx(1:m),root=root)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cgatherv
@ -446,13 +436,8 @@ subroutine psb_cgather_vect(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cgather_vect

@ -208,14 +208,9 @@ subroutine psb_chalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_chalom
@ -409,14 +404,9 @@ subroutine psb_chalov(x,desc_a,info,alpha,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_chalov
@ -560,12 +550,7 @@ subroutine psb_chalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_chalo_vect

@ -193,14 +193,9 @@ subroutine psb_covrlm(x,desc_a,info,jx,ik,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_covrlm
!!$
!!$ Parallel Sparse BLAS version 3.1
@ -378,14 +373,9 @@ subroutine psb_covrlv(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_covrlv
@ -508,13 +498,8 @@ subroutine psb_covrl_vect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_covrl_vect

@ -233,14 +233,9 @@ subroutine psb_cscatterm(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cscatterm
@ -468,13 +463,8 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cscatterv

@ -149,12 +149,8 @@ subroutine psb_csp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
9999 continue
call psb_errpush(info,name)
call psb_erractionrestore(err_act)
if (err_act.eq.psb_act_abort_) then
call psb_error()
return
end if
return
call psb_error_handler(ictxt,err_act)
return
end subroutine psb_csp_allgather

@ -127,7 +127,7 @@ subroutine psb_dgatherm(globx, locx, desc_a, info, iroot)
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,k,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
@ -160,13 +160,8 @@ subroutine psb_dgatherm(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dgatherm
@ -298,21 +293,21 @@ subroutine psb_dgatherv(globx, locx, desc_a, info, iroot)
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
goto 9999
end if
globx(:)=dzero
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)
globx(idx) = locx(i)
end do
! adjust overlapped elements
do i=1, size(desc_a%ovrlap_elem,1)
if (me /= desc_a%ovrlap_elem(i,3)) then
@ -321,19 +316,14 @@ subroutine psb_dgatherv(globx, locx, desc_a, info, iroot)
globx(idx) = dzero
end if
end do
call psb_sum(ictxt,globx(1:m),root=root)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dgatherv
@ -446,13 +436,8 @@ subroutine psb_dgather_vect(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dgather_vect

@ -208,14 +208,9 @@ subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dhalom
@ -409,14 +404,9 @@ subroutine psb_dhalov(x,desc_a,info,alpha,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dhalov
@ -560,12 +550,7 @@ subroutine psb_dhalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dhalo_vect

@ -193,14 +193,9 @@ subroutine psb_dovrlm(x,desc_a,info,jx,ik,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dovrlm
!!$
!!$ Parallel Sparse BLAS version 3.1
@ -378,14 +373,9 @@ subroutine psb_dovrlv(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dovrlv
@ -508,13 +498,8 @@ subroutine psb_dovrl_vect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dovrl_vect

@ -233,14 +233,9 @@ subroutine psb_dscatterm(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dscatterm
@ -468,13 +463,8 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dscatterv

@ -149,12 +149,8 @@ subroutine psb_dsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
9999 continue
call psb_errpush(info,name)
call psb_erractionrestore(err_act)
if (err_act.eq.psb_act_abort_) then
call psb_error()
return
end if
return
call psb_error_handler(ictxt,err_act)
return
end subroutine psb_dsp_allgather

@ -160,14 +160,9 @@ subroutine psb_igatherm(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_igatherm
@ -319,14 +314,9 @@ subroutine psb_igatherv(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_igatherv
@ -437,13 +427,8 @@ subroutine psb_igather_vect(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_igather_vect

@ -212,14 +212,9 @@ subroutine psb_ihalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_ihalom
@ -415,14 +410,9 @@ subroutine psb_ihalov(x,desc_a,info,alpha,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_ihalov
@ -568,12 +558,7 @@ subroutine psb_ihalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_ihalo_vect

@ -191,14 +191,9 @@ subroutine psb_iovrlm(x,desc_a,info,jx,ik,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_iovrlm
!!$
@ -379,14 +374,9 @@ subroutine psb_iovrlv(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_iovrlv
subroutine psb_iovrl_vect(x,desc_a,info,work,update,mode)
@ -508,13 +498,8 @@ subroutine psb_iovrl_vect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_iovrl_vect

@ -217,14 +217,9 @@ subroutine psb_iscatterm(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_iscatterm
@ -424,13 +419,8 @@ subroutine psb_iscatterv(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_iscatterv

@ -127,7 +127,7 @@ subroutine psb_sgatherm(globx, locx, desc_a, info, iroot)
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,k,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
@ -160,13 +160,8 @@ subroutine psb_sgatherm(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_sgatherm
@ -298,21 +293,21 @@ subroutine psb_sgatherv(globx, locx, desc_a, info, iroot)
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
goto 9999
end if
globx(:)=szero
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)
globx(idx) = locx(i)
end do
! adjust overlapped elements
do i=1, size(desc_a%ovrlap_elem,1)
if (me /= desc_a%ovrlap_elem(i,3)) then
@ -321,19 +316,14 @@ subroutine psb_sgatherv(globx, locx, desc_a, info, iroot)
globx(idx) = szero
end if
end do
call psb_sum(ictxt,globx(1:m),root=root)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_sgatherv
@ -446,13 +436,8 @@ subroutine psb_sgather_vect(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_sgather_vect

@ -208,14 +208,9 @@ subroutine psb_shalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_shalom
@ -409,14 +404,9 @@ subroutine psb_shalov(x,desc_a,info,alpha,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_shalov
@ -560,12 +550,7 @@ subroutine psb_shalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_shalo_vect

@ -193,14 +193,9 @@ subroutine psb_sovrlm(x,desc_a,info,jx,ik,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_sovrlm
!!$
!!$ Parallel Sparse BLAS version 3.1
@ -378,14 +373,9 @@ subroutine psb_sovrlv(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_sovrlv
@ -508,13 +498,8 @@ subroutine psb_sovrl_vect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_sovrl_vect

@ -233,14 +233,9 @@ subroutine psb_sscatterm(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_sscatterm
@ -468,13 +463,8 @@ subroutine psb_sscatterv(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_sscatterv

@ -149,12 +149,8 @@ subroutine psb_ssp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
9999 continue
call psb_errpush(info,name)
call psb_erractionrestore(err_act)
if (err_act.eq.psb_act_abort_) then
call psb_error()
return
end if
return
call psb_error_handler(ictxt,err_act)
return
end subroutine psb_ssp_allgather

@ -127,7 +127,7 @@ subroutine psb_zgatherm(globx, locx, desc_a, info, iroot)
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,k,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
@ -160,13 +160,8 @@ subroutine psb_zgatherm(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_zgatherm
@ -298,21 +293,21 @@ subroutine psb_zgatherv(globx, locx, desc_a, info, iroot)
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
goto 9999
end if
globx(:)=zzero
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)
globx(idx) = locx(i)
end do
! adjust overlapped elements
do i=1, size(desc_a%ovrlap_elem,1)
if (me /= desc_a%ovrlap_elem(i,3)) then
@ -321,19 +316,14 @@ subroutine psb_zgatherv(globx, locx, desc_a, info, iroot)
globx(idx) = zzero
end if
end do
call psb_sum(ictxt,globx(1:m),root=root)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_zgatherv
@ -446,13 +436,8 @@ subroutine psb_zgather_vect(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_zgather_vect

@ -208,14 +208,9 @@ subroutine psb_zhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_zhalom
@ -409,14 +404,9 @@ subroutine psb_zhalov(x,desc_a,info,alpha,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_zhalov
@ -560,12 +550,7 @@ subroutine psb_zhalo_vect(x,desc_a,info,alpha,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_zhalo_vect

@ -193,14 +193,9 @@ subroutine psb_zovrlm(x,desc_a,info,jx,ik,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_zovrlm
!!$
!!$ Parallel Sparse BLAS version 3.1
@ -378,14 +373,9 @@ subroutine psb_zovrlv(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_zovrlv
@ -508,13 +498,8 @@ subroutine psb_zovrl_vect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_zovrl_vect

@ -233,14 +233,9 @@ subroutine psb_zscatterm(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_zscatterm
@ -468,13 +463,8 @@ subroutine psb_zscatterv(globx, locx, desc_a, info, iroot)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_zscatterv

@ -149,12 +149,8 @@ subroutine psb_zsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
9999 continue
call psb_errpush(info,name)
call psb_erractionrestore(err_act)
if (err_act.eq.psb_act_abort_) then
call psb_error()
return
end if
return
call psb_error_handler(ictxt,err_act)
return
end subroutine psb_zsp_allgather

@ -316,14 +316,8 @@ subroutine psb_indx_map_fnd_owner(idx,iprc,idxmap,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_ret_) then
return
else
call psb_error(ictxt)
end if
return
end subroutine psb_indx_map_fnd_owner

@ -141,15 +141,8 @@ subroutine psi_bld_tmphalo(desc,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_ret_) then
return
else
call psb_error(ictxt)
end if
return
end subroutine psi_bld_tmphalo

@ -143,15 +143,8 @@ subroutine psi_bld_tmpovrl(iv,desc,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_ret_) then
return
else
call psb_error(ictxt)
end if
return
end subroutine psi_bld_tmpovrl

@ -123,12 +123,8 @@ subroutine psi_compute_size(desc_data, index_in, dl_lda, info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
9999 call psb_error_handler(ictxt,err_act)
return
end subroutine psi_compute_size

@ -112,11 +112,8 @@ subroutine psi_crea_bnd_elem(bndel,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
9999 call psb_error_handler(err_act)
return
end subroutine psi_crea_bnd_elem

@ -152,11 +152,7 @@ subroutine psi_crea_index(desc_a,index_in,index_out,glob_idx,nxch,nsnd,nrcv,info
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
9999 call psb_error_handler(ictxt,err_act)
return
end subroutine psi_crea_index

@ -139,12 +139,8 @@ subroutine psi_crea_ovr_elem(me,desc_overlap,ovr_elem,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
9999 call psb_error_handler(err_act)
return
end subroutine psi_crea_ovr_elem

@ -147,13 +147,9 @@ subroutine psi_cswapdatam(flag,n,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_cswapdatam
subroutine psi_cswapidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
@ -519,13 +515,9 @@ subroutine psi_cswapidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_cswapidxm
!
@ -645,13 +637,9 @@ subroutine psi_cswapdatav(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_cswapdatav
@ -1005,13 +993,9 @@ subroutine psi_cswapidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_cswapidxv
subroutine psi_cswapdata_vect(flag,beta,y,desc_a,work,info,data)
@ -1082,13 +1066,9 @@ subroutine psi_cswapdata_vect(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_cswapdata_vect
@ -1444,13 +1424,9 @@ subroutine psi_cswapidx_vect(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_cswapidx_vect
@ -1807,12 +1783,8 @@ subroutine psi_cswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrc
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_cswap_vidx_vect

@ -152,13 +152,9 @@ subroutine psi_cswaptranm(flag,n,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_cswaptranm
subroutine psi_ctranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
@ -526,13 +522,9 @@ subroutine psi_ctranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_ctranidxm
!
!
@ -655,13 +647,9 @@ subroutine psi_cswaptranv(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_cswaptranv
@ -1031,13 +1019,9 @@ subroutine psi_ctranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_ctranidxv
@ -1107,13 +1091,9 @@ subroutine psi_cswaptran_vect(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_cswaptran_vect
@ -1480,13 +1460,9 @@ subroutine psi_ctranidx_vect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_ctranidx_vect

@ -181,12 +181,8 @@ subroutine psi_cnv_dsc(halo_in,ovrlap_in,ext_in,cdesc, info, mold)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
9999 call psb_error_handler(ictxt,err_act)
return
end subroutine psi_cnv_dsc
@ -493,13 +489,8 @@ subroutine psi_bld_ovr_mst(me,ovrlap_elem,mst_idx,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine psi_bld_ovr_mst

@ -337,11 +337,8 @@ subroutine psi_desc_index(desc,index_in,dep_list,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
9999 call psb_error_handler(ictxt,err_act)
return
end subroutine psi_desc_index

@ -147,13 +147,9 @@ subroutine psi_dswapdatam(flag,n,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dswapdatam
subroutine psi_dswapidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
@ -519,13 +515,9 @@ subroutine psi_dswapidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dswapidxm
!
@ -645,13 +637,9 @@ subroutine psi_dswapdatav(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dswapdatav
@ -1005,13 +993,9 @@ subroutine psi_dswapidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dswapidxv
subroutine psi_dswapdata_vect(flag,beta,y,desc_a,work,info,data)
@ -1082,13 +1066,9 @@ subroutine psi_dswapdata_vect(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dswapdata_vect
@ -1444,13 +1424,9 @@ subroutine psi_dswapidx_vect(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dswapidx_vect
@ -1807,12 +1783,8 @@ subroutine psi_dswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrc
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dswap_vidx_vect

@ -152,13 +152,9 @@ subroutine psi_dswaptranm(flag,n,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dswaptranm
subroutine psi_dtranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
@ -526,13 +522,9 @@ subroutine psi_dtranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dtranidxm
!
!
@ -655,13 +647,9 @@ subroutine psi_dswaptranv(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dswaptranv
@ -1031,13 +1019,9 @@ subroutine psi_dtranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dtranidxv
@ -1107,13 +1091,9 @@ subroutine psi_dswaptran_vect(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dswaptran_vect
@ -1480,13 +1460,9 @@ subroutine psi_dtranidx_vect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_dtranidx_vect

@ -288,12 +288,8 @@ subroutine psi_extract_dep_list(ictxt,is_bld,is_upd,desc_str,dep_list,&
9999 continue
call psb_errpush(info,name,i_err=int_err)
call psb_erractionrestore(err_act)
if (err_act == psb_act_ret_) then
return
else
call psb_error()
endif
call psb_error_handler(err_act)
return
end subroutine psi_extract_dep_list

@ -118,14 +118,8 @@ subroutine psi_fnd_owner(nv,idx,iprc,desc,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_ret_) then
return
else
call psb_error(ictxt)
end if
return
end subroutine psi_fnd_owner

@ -147,13 +147,9 @@ subroutine psi_iswapdatam(flag,n,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_iswapdatam
subroutine psi_iswapidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
@ -519,13 +515,9 @@ subroutine psi_iswapidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_iswapidxm
!
@ -645,13 +637,9 @@ subroutine psi_iswapdatav(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_iswapdatav
@ -1005,13 +993,9 @@ subroutine psi_iswapidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_iswapidxv
subroutine psi_iswapdata_vect(flag,beta,y,desc_a,work,info,data)
@ -1040,6 +1024,7 @@ subroutine psi_iswapdata_vect(flag,beta,y,desc_a,work,info,data)
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
info=psb_success_
@ -1068,25 +1053,22 @@ subroutine psi_iswapdata_vect(flag,beta,y,desc_a,work,info,data)
data_ = psb_comm_halo_
end if
call desc_a%get_list(data_,d_idx,totxch,idxr,idxs,info)
!!$ call desc_a%get_list(data_,d_idx,totxch,idxr,idxs,info)
call desc_a%get_list(data_,d_vidx,totxch,idxr,idxs,info)
if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,name,a_err='psb_cd_get_list')
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_iswapdata_vect
@ -1442,12 +1424,367 @@ subroutine psi_iswapidx_vect(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end subroutine psi_iswapidx_vect
subroutine psi_iswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_iswap_vidx_vect
use psb_error_mod
use psb_desc_mod
use psb_penv_mod
use psb_i_base_vect_mod
#ifdef MPI_MOD
use mpi
#endif
implicit none
#ifdef MPI_H
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
class(psb_i_base_vect_type) :: y
integer(psb_ipk_) :: beta
integer(psb_ipk_), target :: work(:)
class(psb_i_base_vect_type), intent(in) :: idx
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpik_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpik_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
& snd_pt, rcv_pt, pnti, n
integer(psb_ipk_) :: ierr(5)
logical :: swap_mpi, swap_sync, swap_send, swap_recv,&
& albf,do_send,do_recv
logical, parameter :: usersend=.false.
integer(psb_ipk_), pointer, dimension(:) :: sndbuf, rcvbuf
#ifdef HAVE_VOLATILE
volatile :: sndbuf, rcvbuf
#endif
character(len=20) :: name
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
goto 9999
endif
n=1
swap_mpi = iand(flag,psb_swap_mpi_) /= 0
swap_sync = iand(flag,psb_swap_sync_) /= 0
swap_send = iand(flag,psb_swap_send_) /= 0
swap_recv = iand(flag,psb_swap_recv_) /= 0
do_send = swap_mpi .or. swap_sync .or. swap_send
do_recv = swap_mpi .or. swap_sync .or. swap_recv
totrcv_ = totrcv * n
totsnd_ = totsnd * n
if (swap_mpi) then
allocate(sdsz(0:np-1), rvsz(0:np-1), bsdidx(0:np-1),&
& brvidx(0:np-1), rvhd(0:np-1), sdhd(0:np-1), prcid(0:np-1),&
& stat=info)
if(info /= psb_success_) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
end if
rvhd(:) = mpi_request_null
sdsz(:) = 0
rvsz(:) = 0
! prepare info for communications
pnti = 1
snd_pt = 1
rcv_pt = 1
do i=1, totxch
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(proc_to_comm),ictxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
bsdidx(proc_to_comm) = snd_pt
sdsz(proc_to_comm) = nesd
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
pnti = pnti + nerv + nesd + 3
end do
else
allocate(rvhd(totxch),prcid(totxch),stat=info)
if(info /= psb_success_) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
end if
end if
totrcv_ = max(totrcv_,1)
totsnd_ = max(totsnd_,1)
if((totrcv_+totsnd_) < size(work)) then
sndbuf => work(1:totsnd_)
rcvbuf => work(totsnd_+1:totsnd_+totrcv_)
albf=.false.
else
allocate(sndbuf(totsnd_),rcvbuf(totrcv_), stat=info)
if(info /= psb_success_) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
end if
albf=.true.
end if
if (do_send) then
! Pack send buffers
pnti = 1
snd_pt = 1
do i=1, totxch
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
idx_pt = 1+pnti+nerv+psb_n_elem_send_
call y%gth(idx_pt,nesd,idx,&
& sndbuf(snd_pt:snd_pt+nesd-1))
snd_pt = snd_pt + nesd
pnti = pnti + nerv + nesd + 3
end do
end if
! Case SWAP_MPI
if (swap_mpi) then
! swap elements using mpi_alltoallv
call mpi_alltoallv(sndbuf,sdsz,bsdidx,&
& psb_mpi_ipk_integer,rcvbuf,rvsz,&
& brvidx,psb_mpi_ipk_integer,icomm,iret)
if(iret /= mpi_success) then
ierr(1) = iret
info=psb_err_mpi_error_
call psb_errpush(info,name,i_err=ierr)
goto 9999
end if
else if (swap_sync) then
pnti = 1
snd_pt = 1
rcv_pt = 1
do i=1, totxch
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
write(psb_err_unit,*) &
& 'Fatal error in swapdata: mismatch on self send',&
& nerv,nesd
end if
rcvbuf(rcv_pt:rcv_pt+nerv-1) = sndbuf(snd_pt:snd_pt+nesd-1)
end if
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
pnti = pnti + nerv + nesd + 3
end do
else if (swap_send .and. swap_recv) then
! First I post all the non blocking receives
pnti = 1
snd_pt = 1
rcv_pt = 1
do i=1, totxch
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),nerv,&
& psb_mpi_ipk_integer,prcid(i),&
& p2ptag, icomm,rvhd(i),iret)
end if
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
pnti = pnti + nerv + nesd + 3
end do
! Then I post all the blocking sends
if (usersend) call mpi_barrier(icomm,iret)
pnti = 1
snd_pt = 1
rcv_pt = 1
do i=1, totxch
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
p2ptag = psb_int_swap_tag
if ((nesd>0).and.(proc_to_comm /= me)) then
if (usersend) then
call mpi_rsend(sndbuf(snd_pt),nesd,&
& psb_mpi_ipk_integer,prcid(i),&
& p2ptag,icomm,iret)
else
call mpi_send(sndbuf(snd_pt),nesd,&
& psb_mpi_ipk_integer,prcid(i),&
& p2ptag,icomm,iret)
end if
if(iret /= mpi_success) then
ierr(1) = iret
info=psb_err_mpi_error_
call psb_errpush(info,name,i_err=ierr)
goto 9999
end if
end if
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
pnti = pnti + nerv + nesd + 3
end do
pnti = 1
do i=1, totxch
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
p2ptag = psb_int_swap_tag
if ((proc_to_comm /= me).and.(nerv>0)) then
call mpi_wait(rvhd(i),p2pstat,iret)
if(iret /= mpi_success) then
ierr(1) = iret
info=psb_err_mpi_error_
call psb_errpush(info,name,i_err=ierr)
goto 9999
end if
else if (proc_to_comm == me) then
if (nesd /= nerv) then
write(psb_err_unit,*) &
& 'Fatal error in swapdata: mismatch on self send',&
& nerv,nesd
end if
rcvbuf(rcv_pt:rcv_pt+nerv-1) = sndbuf(snd_pt:snd_pt+nesd-1)
end if
pnti = pnti + nerv + nesd + 3
end do
else if (swap_send) then
pnti = 1
snd_pt = 1
rcv_pt = 1
do i=1, totxch
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
if (nesd>0) call psb_snd(ictxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
pnti = pnti + nerv + nesd + 3
end do
else if (swap_recv) then
pnti = 1
snd_pt = 1
rcv_pt = 1
do i=1, totxch
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
if (nerv>0) call psb_rcv(ictxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
pnti = pnti + nerv + nesd + 3
end do
end if
if (do_recv) then
pnti = 1
snd_pt = 1
rcv_pt = 1
do i=1, totxch
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
idx_pt = 1+pnti+psb_n_elem_recv_
call y%sct(idx_pt,nerv,idx,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1),beta)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
pnti = pnti + nerv + nesd + 3
end do
end if
if (swap_mpi) then
deallocate(sdsz,rvsz,bsdidx,brvidx,rvhd,prcid,sdhd,&
& stat=info)
else
deallocate(rvhd,prcid,stat=info)
end if
if(info /= psb_success_) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
end if
if(albf) deallocate(sndbuf,rcvbuf,stat=info)
if(info /= psb_success_) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
end if
call psb_erractionrestore(err_act)
return
end subroutine psi_iswapidx_vect
9999 call psb_error_handler(ictxt,err_act)
return
end subroutine psi_iswap_vidx_vect

@ -152,13 +152,9 @@ subroutine psi_iswaptranm(flag,n,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_iswaptranm
subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
@ -526,13 +522,9 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_itranidxm
!
!
@ -655,13 +647,9 @@ subroutine psi_iswaptranv(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_iswaptranv
@ -1031,13 +1019,9 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_itranidxv
@ -1107,13 +1091,9 @@ subroutine psi_iswaptran_vect(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_iswaptran_vect
@ -1480,13 +1460,9 @@ subroutine psi_itranidx_vect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_itranidx_vect

@ -65,13 +65,8 @@ subroutine psi_sovrl_restrr1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_sovrl_restrr1
@ -118,13 +113,8 @@ subroutine psi_sovrl_restrr2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_sovrl_restrr2
@ -165,13 +155,8 @@ subroutine psi_dovrl_restrr1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_dovrl_restrr1
@ -219,13 +204,8 @@ subroutine psi_dovrl_restrr2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_dovrl_restrr2
@ -266,13 +246,8 @@ subroutine psi_covrl_restrr1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_covrl_restrr1
@ -319,13 +294,8 @@ subroutine psi_covrl_restrr2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_covrl_restrr2
@ -366,13 +336,8 @@ subroutine psi_zovrl_restrr1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_zovrl_restrr1
@ -419,13 +384,8 @@ subroutine psi_zovrl_restrr2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_zovrl_restrr2
@ -466,13 +426,8 @@ subroutine psi_iovrl_restrr1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_iovrl_restrr1
@ -519,13 +474,8 @@ subroutine psi_iovrl_restrr2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_iovrl_restrr2
@ -559,19 +509,14 @@ subroutine psi_iovrl_restr_vect(x,xs,desc_a,info)
endif
isz = size(desc_a%ovrlap_elem,1)
call x%sct(isz,desc_a%ovrlap_elem(:,1),xs,izero)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_iovrl_restr_vect
@ -604,19 +549,14 @@ subroutine psi_sovrl_restr_vect(x,xs,desc_a,info)
endif
isz = size(desc_a%ovrlap_elem,1)
call x%sct(isz,desc_a%ovrlap_elem(:,1),xs,szero)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_sovrl_restr_vect
@ -649,19 +589,14 @@ subroutine psi_dovrl_restr_vect(x,xs,desc_a,info)
endif
isz = size(desc_a%ovrlap_elem,1)
call x%sct(isz,desc_a%ovrlap_elem(:,1),xs,dzero)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_dovrl_restr_vect
@ -696,19 +631,14 @@ subroutine psi_covrl_restr_vect(x,xs,desc_a,info)
endif
isz = size(desc_a%ovrlap_elem,1)
call x%sct(isz,desc_a%ovrlap_elem(:,1),xs,czero)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_covrl_restr_vect
@ -741,19 +671,14 @@ subroutine psi_zovrl_restr_vect(x,xs,desc_a,info)
endif
isz = size(desc_a%ovrlap_elem,1)
call x%sct(isz,desc_a%ovrlap_elem(:,1),xs,zzero)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_zovrl_restr_vect

@ -73,13 +73,8 @@ subroutine psi_sovrl_saver1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_sovrl_saver1
@ -127,13 +122,8 @@ subroutine psi_sovrl_saver2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_sovrl_saver2
@ -181,13 +171,8 @@ subroutine psi_dovrl_saver1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_dovrl_saver1
@ -236,13 +221,8 @@ subroutine psi_dovrl_saver2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_dovrl_saver2
@ -289,13 +269,8 @@ subroutine psi_covrl_saver1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_covrl_saver1
@ -344,13 +319,8 @@ subroutine psi_covrl_saver2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_covrl_saver2
@ -399,13 +369,8 @@ subroutine psi_zovrl_saver1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_zovrl_saver1
@ -455,13 +420,8 @@ subroutine psi_zovrl_saver2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_zovrl_saver2
@ -510,13 +470,8 @@ subroutine psi_iovrl_saver1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_iovrl_saver1
@ -567,13 +522,8 @@ subroutine psi_iovrl_saver2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_iovrl_saver2
@ -614,19 +564,14 @@ subroutine psi_iovrl_save_vect(x,xs,desc_a,info)
call psb_errpush(info,name)
goto 9999
endif
call x%gth(isz,desc_a%ovrlap_elem(:,1),xs)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_iovrl_save_vect
@ -665,19 +610,14 @@ subroutine psi_sovrl_save_vect(x,xs,desc_a,info)
call psb_errpush(info,name)
goto 9999
endif
call x%gth(isz,desc_a%ovrlap_elem(:,1),xs)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_sovrl_save_vect
@ -716,19 +656,14 @@ subroutine psi_dovrl_save_vect(x,xs,desc_a,info)
call psb_errpush(info,name)
goto 9999
endif
call x%gth(isz,desc_a%ovrlap_elem(:,1),xs)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_dovrl_save_vect
@ -767,19 +702,14 @@ subroutine psi_covrl_save_vect(x,xs,desc_a,info)
call psb_errpush(info,name)
goto 9999
endif
call x%gth(isz,desc_a%ovrlap_elem(:,1),xs)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_covrl_save_vect
@ -818,18 +748,13 @@ subroutine psi_zovrl_save_vect(x,xs,desc_a,info)
call psb_errpush(info,name)
goto 9999
endif
call x%gth(isz,desc_a%ovrlap_elem(:,1),xs)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_zovrl_save_vect

@ -91,13 +91,8 @@ subroutine psi_sovrl_updr1(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_sovrl_updr1
@ -163,13 +158,8 @@ subroutine psi_sovrl_updr2(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_sovrl_updr2
@ -234,13 +224,8 @@ subroutine psi_dovrl_updr1(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_dovrl_updr1
@ -306,13 +291,8 @@ subroutine psi_dovrl_updr2(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_dovrl_updr2
@ -377,13 +357,8 @@ subroutine psi_covrl_updr1(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_covrl_updr1
@ -449,13 +424,8 @@ subroutine psi_covrl_updr2(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_covrl_updr2
@ -520,13 +490,8 @@ subroutine psi_zovrl_updr1(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_zovrl_updr1
@ -592,13 +557,8 @@ subroutine psi_zovrl_updr2(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_zovrl_updr2
@ -664,13 +624,8 @@ subroutine psi_iovrl_updr1(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_iovrl_updr1
@ -737,13 +692,8 @@ subroutine psi_iovrl_updr2(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_iovrl_updr2
@ -822,13 +772,8 @@ subroutine psi_iovrl_upd_vect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_iovrl_upd_vect
@ -906,13 +851,8 @@ subroutine psi_sovrl_upd_vect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_sovrl_upd_vect
@ -990,13 +930,8 @@ subroutine psi_dovrl_upd_vect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_dovrl_upd_vect
@ -1075,13 +1010,8 @@ subroutine psi_covrl_upd_vect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_covrl_upd_vect
@ -1159,13 +1089,8 @@ subroutine psi_zovrl_upd_vect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psi_zovrl_upd_vect

@ -83,14 +83,10 @@ subroutine psi_sort_dl(dep_list,l_dep_list,np,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
9999 call psb_error_handler(err_act)
return
end subroutine psi_sort_dl

@ -147,13 +147,9 @@ subroutine psi_sswapdatam(flag,n,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_sswapdatam
subroutine psi_sswapidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
@ -519,13 +515,9 @@ subroutine psi_sswapidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_sswapidxm
!
@ -645,13 +637,9 @@ subroutine psi_sswapdatav(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_sswapdatav
@ -1005,13 +993,9 @@ subroutine psi_sswapidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_sswapidxv
subroutine psi_sswapdata_vect(flag,beta,y,desc_a,work,info,data)
@ -1082,13 +1066,9 @@ subroutine psi_sswapdata_vect(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_sswapdata_vect
@ -1444,13 +1424,9 @@ subroutine psi_sswapidx_vect(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_sswapidx_vect
@ -1807,12 +1783,8 @@ subroutine psi_sswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrc
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_sswap_vidx_vect

@ -152,13 +152,9 @@ subroutine psi_sswaptranm(flag,n,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_sswaptranm
subroutine psi_stranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
@ -526,13 +522,9 @@ subroutine psi_stranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_stranidxm
!
!
@ -655,13 +647,9 @@ subroutine psi_sswaptranv(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_sswaptranv
@ -1031,13 +1019,9 @@ subroutine psi_stranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_stranidxv
@ -1107,13 +1091,9 @@ subroutine psi_sswaptran_vect(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_sswaptran_vect
@ -1480,13 +1460,9 @@ subroutine psi_stranidx_vect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_stranidx_vect

@ -147,13 +147,9 @@ subroutine psi_zswapdatam(flag,n,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_zswapdatam
subroutine psi_zswapidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
@ -519,13 +515,9 @@ subroutine psi_zswapidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_zswapidxm
!
@ -645,13 +637,9 @@ subroutine psi_zswapdatav(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_zswapdatav
@ -1005,13 +993,9 @@ subroutine psi_zswapidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_zswapidxv
subroutine psi_zswapdata_vect(flag,beta,y,desc_a,work,info,data)
@ -1082,13 +1066,9 @@ subroutine psi_zswapdata_vect(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_zswapdata_vect
@ -1444,13 +1424,9 @@ subroutine psi_zswapidx_vect(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_zswapidx_vect
@ -1807,12 +1783,8 @@ subroutine psi_zswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrc
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_zswap_vidx_vect

@ -152,13 +152,9 @@ subroutine psi_zswaptranm(flag,n,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_zswaptranm
subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
@ -526,13 +522,9 @@ subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_ztranidxm
!
!
@ -655,13 +647,9 @@ subroutine psi_zswaptranv(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_zswaptranv
@ -1031,13 +1019,9 @@ subroutine psi_ztranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_ztranidxv
@ -1107,13 +1091,9 @@ subroutine psi_zswaptran_vect(flag,beta,y,desc_a,work,info,data)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_zswaptran_vect
@ -1480,13 +1460,9 @@ subroutine psi_ztranidx_vect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
9999 call psb_error_handler(ictxt,err_act)
return
end if
return
end subroutine psi_ztranidx_vect

@ -1,8 +0,0 @@
module psb_parts_mod
interface
subroutine psb_parts(glob_index,nrow,np,pv,nv)
integer(psb_ipk_), intent (in) :: glob_index,np,nrow
integer(psb_ipk_), intent (out) :: nv, pv(*)
end subroutine psb_parts
end interface
end module psb_parts_mod

@ -1,8 +0,0 @@
interface
!.....user passed subroutine.....
subroutine parts(glob_index,nrow,np,pv,nv)
import :: psb_ipk_
integer(psb_ipk_), intent (in) :: glob_index,np,nrow
integer(psb_ipk_), intent (out) :: nv, pv(*)
end subroutine parts
end interface

@ -153,7 +153,7 @@ module psb_c_base_mat_mod
procedure, pass(a) :: mv_from_coo => psb_c_mv_coo_from_coo
procedure, pass(a) :: mv_to_fmt => psb_c_mv_coo_to_fmt
procedure, pass(a) :: mv_from_fmt => psb_c_mv_coo_from_fmt
procedure, pass(a) :: csput_a => psb_c_coo_csput_a
procedure, pass(a) :: csput_a => psb_c_coo_csput_a
procedure, pass(a) :: get_diag => psb_c_coo_get_diag
procedure, pass(a) :: csgetrow => psb_c_coo_csgetrow
procedure, pass(a) :: csgetptn => psb_c_coo_csgetptn

@ -247,10 +247,9 @@ contains
ierr(1) = 2
info = psb_err_missing_override_method_
call psb_errpush(info,name,i_err=ierr)
call psb_get_erraction(err_act)
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_erractionsave(err_act)
call psb_error_handler(err_act)
end select

@ -182,7 +182,6 @@ module psb_cd_tools_mod
subroutine psb_cd_switch_ovl_indxmap(desc,info)
import :: psb_ipk_, psb_desc_type
implicit None
include 'parts.fh'
type(psb_desc_type), intent(inout) :: desc
integer(psb_ipk_), intent(out) :: info
end subroutine psb_cd_switch_ovl_indxmap

@ -162,13 +162,8 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine psb_chkvect
@ -282,13 +277,8 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine psb_chkglobvect
@ -423,13 +413,8 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine psb_chkmat

@ -153,7 +153,7 @@ module psb_d_base_mat_mod
procedure, pass(a) :: mv_from_coo => psb_d_mv_coo_from_coo
procedure, pass(a) :: mv_to_fmt => psb_d_mv_coo_to_fmt
procedure, pass(a) :: mv_from_fmt => psb_d_mv_coo_from_fmt
procedure, pass(a) :: csput_a => psb_d_coo_csput_a
procedure, pass(a) :: csput_a => psb_d_coo_csput_a
procedure, pass(a) :: get_diag => psb_d_coo_get_diag
procedure, pass(a) :: csgetrow => psb_d_coo_csgetrow
procedure, pass(a) :: csgetptn => psb_d_coo_csgetptn

@ -247,10 +247,9 @@ contains
ierr(1) = 2
info = psb_err_missing_override_method_
call psb_errpush(info,name,i_err=ierr)
call psb_get_erraction(err_act)
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_erractionsave(err_act)
call psb_error_handler(err_act)
end select

@ -672,15 +672,11 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_ret_) then
return
else
call psb_error(ictxt)
end if
9999 call psb_error_handler(err_act)
return
end subroutine psb_cd_get_list
@ -752,15 +748,10 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(err_act)
if (err_act == psb_act_ret_) then
return
else
call psb_error(ictxt)
end if
return
end subroutine psb_cd_v_get_list
!
@ -792,18 +783,8 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_ret_) then
return
else
if (ictxt == -1) then
call psb_error()
else
call psb_error(ictxt)
end if
end if
9999 call psb_error_handler(err_act)
return
end subroutine psb_cdfree
@ -944,15 +925,10 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(err_act)
if (err_act == psb_act_ret_) then
return
else
call psb_error()
end if
return
end subroutine psb_cdtransfer
@ -1053,14 +1029,8 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_ret_) then
return
else
call psb_error(ictxt)
end if
return
end subroutine psb_cd_clone
@ -1159,13 +1129,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
Return
9999 call psb_error_handler(ictxt,err_act)
return
end Subroutine psb_cd_get_recv_idx
@ -1208,14 +1174,11 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_l2gs1
subroutine cd_l2gs2(idxin,idxout,desc,info,mask,owned)
@ -1248,14 +1211,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_l2gs2
@ -1288,13 +1246,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_l2gv1
@ -1327,13 +1281,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_l2gv2
@ -1366,13 +1316,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_g2ls1
@ -1406,14 +1352,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_g2ls2
@ -1446,14 +1387,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_g2lv1
@ -1488,14 +1424,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_g2lv2
@ -1529,14 +1460,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_g2ls1_ins
@ -1571,14 +1497,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_g2ls2_ins
@ -1613,14 +1534,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_g2lv1_ins
@ -1655,13 +1571,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_g2lv2_ins
@ -1694,13 +1606,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
Return
9999 call psb_error_handler(err_act)
return
end subroutine cd_fnd_owner

@ -9,6 +9,57 @@ subroutine psb_errcomm(ictxt, err)
end subroutine psb_errcomm
subroutine psb_ser_error_handler(err_act)
use psb_error_mod, psb_protect_name => psb_ser_error_handler
use psb_penv_mod
implicit none
integer(psb_ipk_), intent(inout) :: err_act
call psb_erractionrestore(err_act)
if (err_act /= psb_act_ret_) &
& call psb_error()
if (err_act == psb_act_abort_) stop
return
end subroutine psb_ser_error_handler
subroutine psb_par_error_handler(ictxt,err_act)
use psb_error_mod, psb_protect_name => psb_par_error_handler
use psb_penv_mod
implicit none
integer(psb_mpik_), intent(in) :: ictxt
integer(psb_ipk_), intent(in) :: err_act
call psb_erractionrestore(err_act)
if (err_act == psb_act_print_) &
& call psb_error(ictxt, abrt=.false.)
if (err_act == psb_act_abort_) &
& call psb_error(ictxt, abrt=.true.)
return
end subroutine psb_par_error_handler
subroutine psb_par_error_print_stack(ictxt)
use psb_error_mod, psb_protect_name => psb_par_error_print_stack
use psb_penv_mod
integer(psb_mpik_), intent(in) :: ictxt
call psb_error(ictxt, abrt=.false.)
end subroutine psb_par_error_print_stack
subroutine psb_ser_error_print_stack()
use psb_error_mod, psb_protect_name => psb_ser_error_print_stack
call psb_error()
end subroutine psb_ser_error_print_stack
! handles the occurence of an error in a serial routine
subroutine psb_serror()
use psb_const_mod
@ -25,21 +76,21 @@ subroutine psb_serror()
do while (psb_get_numerr() > izero)
write(psb_err_unit,'(50("="))')
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
call psb_errmsg(err_c, r_name, i_e_d, a_e_d)
call psb_errmsg(psb_err_unit,err_c, r_name, i_e_d, a_e_d)
! write(psb_err_unit,'(50("="))')
end do
else
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
call psb_errmsg(err_c, r_name, i_e_d, a_e_d)
call psb_errmsg(psb_err_unit,err_c, r_name, i_e_d, a_e_d)
do while (psb_get_numerr() > 0)
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
end do
end if
end if
#if defined(HAVE_FLUSH_STMT)
flush(0)
flush(psb_err_unit)
#endif
@ -47,18 +98,23 @@ end subroutine psb_serror
! handles the occurence of an error in a parallel routine
subroutine psb_perror(ictxt)
subroutine psb_perror(ictxt,abrt)
use psb_const_mod
use psb_error_mod
use psb_penv_mod
implicit none
integer(psb_mpik_), intent(in) :: ictxt
integer(psb_ipk_) :: err_c
character(len=20) :: r_name
character(len=40) :: a_e_d
integer(psb_ipk_) :: i_e_d(5)
integer(psb_mpik_), intent(in) :: ictxt
logical, intent(in), optional :: abrt
integer(psb_ipk_) :: err_c
character(len=20) :: r_name
character(len=40) :: a_e_d
integer(psb_ipk_) :: i_e_d(5)
integer(psb_mpik_) :: iam, np
logical :: abrt_
abrt_=.true.
if (present(abrt)) abrt_=abrt
call psb_info(ictxt,iam,np)
if (psb_errstatus_fatal()) then
@ -67,27 +123,27 @@ subroutine psb_perror(ictxt)
do while (psb_get_numerr() > izero)
write(psb_err_unit,'(50("="))')
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
call psb_errmsg(err_c, r_name, i_e_d, a_e_d,iam)
call psb_errmsg(psb_err_unit,err_c, r_name, i_e_d, a_e_d,iam)
! write(psb_err_unit,'(50("="))')
end do
#if defined(HAVE_FLUSH_STMT)
flush(0)
flush(psb_err_unit)
#endif
call psb_abort(ictxt,-1)
if (abrt_) call psb_abort(ictxt,-1)
else
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
call psb_errmsg(err_c, r_name, i_e_d, a_e_d,iam)
call psb_errmsg(psb_err_unit,err_c, r_name, i_e_d, a_e_d,iam)
do while (psb_get_numerr() > 0)
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
end do
#if defined(HAVE_FLUSH_STMT)
flush(0)
flush(psb_err_unit)
#endif
call psb_abort(ictxt,-1)
if (abrt_) call psb_abort(ictxt,-1)
end if
end if

@ -32,7 +32,9 @@
module psb_error_mod
use psb_const_mod
integer(psb_ipk_), parameter, public :: psb_act_ret_=0, psb_act_abort_=1
integer(psb_ipk_), parameter, public :: psb_act_ret_=0
integer(psb_ipk_), parameter, public :: psb_act_print_=1
integer(psb_ipk_), parameter, public :: psb_act_abort_=2
integer(psb_ipk_), parameter, public :: psb_debug_ext_=1, psb_debug_outer_=2
integer(psb_ipk_), parameter, public :: psb_debug_comp_=3, psb_debug_inner_=4
integer(psb_ipk_), parameter, public :: psb_debug_serial_=8, psb_debug_serial_comp_=9
@ -40,6 +42,8 @@ module psb_error_mod
integer(psb_ipk_), parameter, public :: psb_no_err_ = 0
integer(psb_ipk_), parameter, public :: psb_err_warning_ = 1
integer(psb_ipk_), parameter, public :: psb_err_fatal_ = 2
integer(psb_ipk_), parameter, public :: psb_max_errmsg_len_ = 132
!
! Error handling
@ -47,24 +51,53 @@ module psb_error_mod
public psb_errpush, psb_error, psb_get_errstatus,&
& psb_errstatus_fatal, psb_errstatus_warning,&
& psb_errstatus_ok, psb_warning_push,&
& psb_errpop, psb_errmsg, psb_errcomm, psb_get_numerr, &
& psb_errpop, psb_errcomm, psb_get_numerr, &
& psb_get_errverbosity, psb_set_errverbosity, &
& psb_erractionsave, psb_erractionrestore, &
& psb_get_erraction, psb_set_erraction, &
& psb_set_erract_return, psb_set_erract_print, psb_set_erract_abort,&
& psb_is_erract_return, psb_is_erract_print, psb_is_erract_abort,&
& psb_get_debug_level, psb_set_debug_level,&
& psb_get_debug_unit, psb_set_debug_unit,&
& psb_get_serial_debug_level, psb_set_serial_debug_level
& psb_get_serial_debug_level, psb_set_serial_debug_level,&
& psb_clean_errstack, psb_error_handler, &
& psb_ser_error_handler, psb_par_error_handler, &
& psb_ser_error_print_stack, psb_par_error_print_stack,&
& psb_error_print_stack, psb_errmsg, psb_ach_errmsg
interface psb_error_handler
subroutine psb_ser_error_handler(err_act)
import :: psb_ipk_
integer(psb_ipk_), intent(in) :: err_act
end subroutine psb_ser_error_handler
subroutine psb_par_error_handler(ictxt,err_act)
import :: psb_ipk_,psb_mpik_
integer(psb_mpik_), intent(in) :: ictxt
integer(psb_ipk_), intent(in) :: err_act
end subroutine psb_par_error_handler
end interface
interface psb_error
subroutine psb_serror()
end subroutine psb_serror
subroutine psb_perror(ictxt)
subroutine psb_perror(ictxt,abrt)
import :: psb_mpik_
integer(psb_mpik_), intent(in) :: ictxt
integer(psb_mpik_), intent(in) :: ictxt
logical, intent(in), optional :: abrt
end subroutine psb_perror
end interface
interface psb_error_print_stack
subroutine psb_par_error_print_stack(ictxt)
import :: psb_ipk_,psb_mpik_
integer(psb_mpik_), intent(in) :: ictxt
end subroutine psb_par_error_print_stack
subroutine psb_ser_error_print_stack()
end subroutine psb_ser_error_print_stack
end interface
interface psb_errcomm
subroutine psb_errcomm(ictxt, err)
import :: psb_mpik_, psb_ipk_
@ -73,6 +106,14 @@ module psb_error_mod
end subroutine psb_errcomm
end interface psb_errcomm
interface psb_errpop
module procedure psb_errpop, psb_ach_errpop
end interface
interface psb_errmsg
module procedure psb_errmsg, psb_ach_errmsg
end interface
#if defined(LONG_INTEGERS)
interface psb_error
module procedure psb_perror_ipk
@ -93,8 +134,10 @@ module psb_error_mod
character(len=20) :: routine=''
! array of integer data to complete the error msg
integer(psb_ipk_),dimension(5) :: i_err_data=0
! real(psb_dpk_)(dim=10) :: r_err_data=0.d0 ! array of real data to complete the error msg
! complex(dim=10) :: c_err_data=0.c0 ! array of complex data to complete the error msg
! real(psb_dpk_)(dim=10) :: r_err_data=0.d0
! array of real data to complete the error msg
! complex(dim=10) :: c_err_data=0.c0
! array of complex data to complete the error msg
! array of character data to complete the error msg
character(len=40) :: a_err_data=''
! pointer to the next element in the stack
@ -113,11 +156,11 @@ module psb_error_mod
end type psb_errstack
type(psb_errstack), save :: error_stack
integer(psb_ipk_), save :: error_status = psb_no_err_
integer(psb_ipk_), save :: verbosity_level = 1
integer(psb_ipk_), save :: err_action = psb_act_abort_
integer(psb_ipk_), save :: debug_level=0, debug_unit, serial_debug_level=0
type(psb_errstack), save :: error_stack
integer(psb_ipk_), save :: error_status = psb_no_err_
integer(psb_ipk_), save :: verbosity_level = 1
integer(psb_ipk_), save :: err_action = psb_act_abort_
integer(psb_ipk_), save :: debug_level = 0, debug_unit, serial_debug_level=0
contains
@ -158,6 +201,30 @@ contains
err_action=err_act
end subroutine psb_set_erraction
! sets the action to take upon error occurrence
subroutine psb_set_erract_return()
err_action = psb_act_ret_
end subroutine psb_set_erract_return
subroutine psb_set_erract_print()
err_action = psb_act_print_
end subroutine psb_set_erract_print
subroutine psb_set_erract_abort()
err_action = psb_act_abort_
end subroutine psb_set_erract_abort
function psb_is_erract_return() result(res)
logical :: res
res = (err_action == psb_act_ret_)
end function psb_is_erract_return
function psb_is_erract_print() result(res)
logical :: res
res = (err_action == psb_act_print_)
end function psb_is_erract_print
function psb_is_erract_abort() result(res)
logical :: res
res = (err_action == psb_act_abort_)
end function psb_is_erract_abort
! restores error action previously saved with psb_erractionsave
subroutine psb_erractionrestore(err_act)
@ -322,323 +389,658 @@ contains
end subroutine psb_warning_push
! pops an error from the error stack
subroutine psb_ach_errpop(achmsg)
character(len=psb_max_errmsg_len_), allocatable, intent(out) :: achmsg(:)
integer(psb_ipk_) :: err_c
character(len=20) :: r_name
character(len=40) :: a_e_d
integer(psb_ipk_) :: i_e_d(5)
type(psb_errstack_node), pointer :: old_node
if (error_stack%n_elems > 0) then
err_c = error_stack%top%err_code
r_name = error_stack%top%routine
i_e_d = error_stack%top%i_err_data
a_e_d = error_stack%top%a_err_data
call psb_errmsg(achmsg,err_c, r_name, i_e_d, a_e_d)
old_node => error_stack%top
error_stack%top => old_node%next
error_stack%n_elems = error_stack%n_elems - 1
deallocate(old_node)
end if
if (error_stack%n_elems == 0) error_status=0
end subroutine psb_ach_errpop
! pops an error from the error stack
subroutine psb_errpop(err_c, r_name, i_e_d, a_e_d)
integer(psb_ipk_), intent(out) :: err_c
integer(psb_ipk_), intent(out) :: err_c
character(len=20), intent(out) :: r_name
character(len=40), intent(out) :: a_e_d
integer(psb_ipk_), intent(out) :: i_e_d(5)
integer(psb_ipk_), intent(out) :: i_e_d(5)
type(psb_errstack_node), pointer :: old_node
err_c = error_stack%top%err_code
r_name = error_stack%top%routine
i_e_d = error_stack%top%i_err_data
a_e_d = error_stack%top%a_err_data
if (error_stack%n_elems > 0) then
err_c = error_stack%top%err_code
r_name = error_stack%top%routine
i_e_d = error_stack%top%i_err_data
a_e_d = error_stack%top%a_err_data
old_node => error_stack%top
error_stack%top => old_node%next
error_stack%n_elems = error_stack%n_elems - 1
deallocate(old_node)
end if
if (error_stack%n_elems == 0) error_status=psb_no_err_
old_node => error_stack%top
error_stack%top => old_node%next
error_stack%n_elems = error_stack%n_elems - 1
if (error_stack%n_elems == 0) error_status=0
end subroutine psb_errpop
deallocate(old_node)
! Clean the error stack
subroutine psb_clean_errstack()
end subroutine psb_errpop
integer(psb_ipk_) :: err_c
character(len=20) :: r_name
character(len=40) :: a_e_d
integer(psb_ipk_) :: i_e_d(5)
do while (psb_get_numerr() > 0)
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
end do
end subroutine psb_clean_errstack
! prints the error msg associated to a specific error code
subroutine psb_errmsg(err_c, r_name, i_e_d, a_e_d,me)
subroutine psb_ach_errmsg(achmsg,err_c, r_name, i_e_d, a_e_d,me)
integer(psb_ipk_), intent(in) :: err_c
character(len=psb_max_errmsg_len_), allocatable, intent(out) :: achmsg(:)
integer(psb_ipk_), intent(in) :: err_c
character(len=20), intent(in) :: r_name
character(len=40), intent(in) :: a_e_d
integer(psb_ipk_), intent(in) :: i_e_d(5)
integer(psb_mpik_), optional :: me
integer(psb_ipk_), intent(in) :: i_e_d(5)
integer(psb_mpik_), optional :: me
character(len=psb_max_errmsg_len_) :: tmpmsg
if(present(me)) then
write(psb_err_unit,&
write(tmpmsg,&
& '("Process: ",i0,". PSBLAS Error (",i0,") in subroutine: ",a20)')&
& me,err_c,trim(r_name)
else
write(psb_err_unit,'("PSBLAS Error (",i0,") in subroutine: ",a)')&
write(tmpmsg,'("PSBLAS Error (",i0,") in subroutine: ",a)')&
& err_c,trim(r_name)
end if
select case (err_c)
case(:psb_success_)
write(psb_err_unit,'("error on calling sperror. err_c must be greater than 0")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("error on calling perror. err_c must be greater than 0")')
case(psb_err_pivot_too_small_)
write(psb_err_unit,'("pivot too small: ",i0,1x,a)')i_e_d(1),trim(a_e_d)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("pivot too small: ",i0,1x,a)')i_e_d(1),trim(a_e_d)
case(psb_err_invalid_ovr_num_)
write(psb_err_unit,'("Invalid number of ovr:",i0)')i_e_d(1)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Invalid number of ovr:",i0)')i_e_d(1)
case(psb_err_invalid_input_)
write(psb_err_unit,'("Invalid input")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Invalid input")')
case(psb_err_iarg_neg_)
write(psb_err_unit,'("input argument n. ",i0," cannot be less than 0")')i_e_d(1)
write(psb_err_unit,'("current value is ",i0)')i_e_d(2)
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("input argument n. ",i0," cannot be less than 0")')i_e_d(1)
write(achmsg(3),'("current value is ",i0)')i_e_d(2)
case(psb_err_iarg_pos_)
write(psb_err_unit,'("input argument n. ",i0," cannot be greater than 0")')i_e_d(1)
write(psb_err_unit,'("current value is ",i0)')i_e_d(2)
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("input argument n. ",i0," cannot be greater than 0")')i_e_d(1)
write(achmsg(3),'("current value is ",i0)')i_e_d(2)
case(psb_err_input_value_invalid_i_)
write(psb_err_unit,'("input argument n. ",i0," has an invalid value")')i_e_d(1)
write(psb_err_unit,'("current value is ",i0)')i_e_d(2)
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("input argument n. ",i0," has an invalid value")')i_e_d(1)
write(achmsg(3),'("current value is ",i0)')i_e_d(2)
case(psb_err_input_asize_invalid_i_)
write(psb_err_unit,'("Size of input array argument n. ",i0," is invalid.")')i_e_d(1)
write(psb_err_unit,'("Current value is ",i0)')i_e_d(2)
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("Size of input array argument n. ",i0," is invalid.")')i_e_d(1)
write(achmsg(3),'("Current value is ",i0)')i_e_d(2)
case(psb_err_input_asize_small_i_)
write(psb_err_unit,'("Size of input array argument n. ",i0," is too small.")')i_e_d(1)
write(psb_err_unit,'("Current value is ",i0," Should be at least ",i0)') i_e_d(2),i_e_d(3)
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("Size of input array argument n. ",i0," is too small.")')i_e_d(1)
write(achmsg(3),'("Current value is ",i0," Should be at least ",i0)') i_e_d(2),i_e_d(3)
case(psb_err_iarg_invalid_i_)
write(psb_err_unit,'("input argument n. ",i0," has an invalid value")')i_e_d(1)
write(psb_err_unit,'("current value is ",a)')a_e_d(2:2)
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("input argument n. ",i0," has an invalid value")')i_e_d(1)
write(achmsg(3),'("current value is ",a)')a_e_d(2:2)
case(psb_err_iarg_not_gtia_ii_)
write(psb_err_unit,&
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("input argument n. ",i0," must be equal or greater than input argument n. ",i0)') &
& i_e_d(1), i_e_d(3)
write(psb_err_unit,'("current values are ",i0," < ",i0)')&
write(achmsg(3),'("current values are ",i0," < ",i0)')&
& i_e_d(2),i_e_d(5)
case(psb_err_iarg_not_gteia_ii_)
write(psb_err_unit,'("input argument n. ",i0," must be greater than or equal to ",i0)')&
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("input argument n. ",i0," must be greater than or equal to ",i0)')&
& i_e_d(1),i_e_d(2)
write(psb_err_unit,'("current value is ",i0," < ",i0)')&
write(achmsg(3),'("current value is ",i0," < ",i0)')&
& i_e_d(3), i_e_d(2)
case(psb_err_iarg_invalid_value_)
write(psb_err_unit,'("input argument n. ",i0," in entry # ",i0," has an invalid value")')&
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("input argument n. ",i0," in entry # ",i0," has an invalid value")')&
& i_e_d(1:2)
write(psb_err_unit,'("current value is ",a)')trim(a_e_d)
write(achmsg(3),'("current value is ",a)')trim(a_e_d)
case(psb_err_asb_nrc_error_)
write(psb_err_unit,'("Impossible error in ASB: nrow>ncol,")')
write(psb_err_unit,'("Actual values are ",i0," > ",i0)')i_e_d(1:2)
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("Impossible error in ASB: nrow>ncol,")')
write(achmsg(3),'("Actual values are ",i0," > ",i0)')i_e_d(1:2)
! ... csr format error ...
case(psb_err_iarg2_neg_)
write(psb_err_unit,'("input argument ia2(1) is less than 0")')
write(psb_err_unit,'("current value is ",i0)')i_e_d(1)
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("input argument ia2(1) is less than 0")')
write(achmsg(3),'("current value is ",i0)')i_e_d(1)
! ... csr format error ...
case(psb_err_ia2_not_increasing_)
write(psb_err_unit,'("indices in ia2 array are not in increasing order")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("indices in ia2 array are not in increasing order")')
case(psb_err_ia1_not_increasing_)
write(psb_err_unit,'("indices in ia1 array are not in increasing order")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("indices in ia1 array are not in increasing order")')
! ... csr format error ...
case(psb_err_ia1_badindices_)
write(psb_err_unit,'("indices in ia1 array are not within problem dimension")')
write(psb_err_unit,'("problem dimension is ",i0)')i_e_d(1)
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("indices in ia1 array are not within problem dimension")')
write(achmsg(3),'("problem dimension is ",i0)')i_e_d(1)
case(psb_err_invalid_args_combination_)
write(psb_err_unit,'("invalid combination of input arguments")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("invalid combination of input arguments")')
case(psb_err_invalid_pid_arg_)
write(psb_err_unit,'("Invalid process identifier in input array argument n. ",i0,".")')&
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("Invalid process identifier in input array argument n. ",i0,".")')&
& i_e_d(1)
write(psb_err_unit,'("Current value is ",i0)')i_e_d(2)
write(achmsg(3),'("Current value is ",i0)')i_e_d(2)
case(psb_err_iarg_n_mbgtian_)
write(psb_err_unit,'("input argument n. ",i0," must be greater than input argument n. ",i0)')&
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("input argument n. ",i0," must be greater than input argument n. ",i0)')&
& i_e_d(1:2)
write(psb_err_unit,'("current values are ",i0," < ",i0)') i_e_d(3:4)
write(achmsg(3),'("current values are ",i0," < ",i0)') i_e_d(3:4)
case(psb_err_dupl_cd_vl)
write(psb_err_unit,'("there are duplicated entries in vl (input to cdall)")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("there are duplicated entries in vl (input to cdall)")')
! ... coo format error ...
! ... coo format error ...
case(psb_err_duplicate_coo)
write(psb_err_unit,'("there are duplicated elements in coo format")')
write(psb_err_unit,'("and you have chosen psb_dupl_err_ ")')
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),'("there are duplicated elements in coo format")')
write(achmsg(3),'("and you have chosen psb_dupl_err_ ")')
case(psb_err_invalid_input_format_)
write(psb_err_unit,'("Invalid input format ",a3)')&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Invalid input format ",a3)')&
& a_e_d(1:3)
case(psb_err_unsupported_format_)
write(psb_err_unit,'("Format ",a3," not yet supported here")')&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Format ",a3," not yet supported here")')&
&a_e_d(1:3)
case(psb_err_format_unknown_)
write(psb_err_unit,'("Format ",a3," is unknown")')&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Format ",a3," is unknown")')&
& a_e_d(1:3)
case(psb_err_iarray_outside_bounds_)
write(psb_err_unit,'("indices in input array are not within problem dimension ",2(i0,2x))')&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("indices in input array are not within problem dimension ",2(i0,2x))')&
&i_e_d(1:2)
case(psb_err_iarray_outside_process_)
write(psb_err_unit,'("indices in input array are not belonging to the calling process ",i0)')&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("indices in input array are not belonging to the calling process ",i0)')&
& i_e_d(1)
case(psb_err_forgot_geall_)
write(psb_err_unit,'("To call this routine you must first call psb_geall on the same matrix")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("To call this routine you must first call psb_geall on the same matrix")')
case(psb_err_forgot_spall_)
write(psb_err_unit,'("To call this routine you must first call psb_spall on the same matrix")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("To call this routine you must first call psb_spall on the same matrix")')
case(psb_err_wrong_ins_)
write(0,'("Something went wrong before this call to ",a,", probably in cdins/spins")')&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("Something went wrong before this call to ",a,", probably in cdins/spins")')&
& trim(r_name)
case(psb_err_iarg_mbeeiarra_i_)
write(psb_err_unit,&
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("Input argument n. ",i0," must be equal to entry n. ",i0," in array input argument n.",i0)') &
& i_e_d(1),i_e_d(4),i_e_d(3)
write(psb_err_unit,'("Current values are ",i0," != ",i0)')i_e_d(2), i_e_d(5)
write(achmsg(3),'("Current values are ",i0," != ",i0)')i_e_d(2), i_e_d(5)
case(psb_err_mpi_error_)
write(psb_err_unit,'("MPI error:",i0)')i_e_d(1)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("MPI error:",i0)')i_e_d(1)
case(psb_err_parm_differs_among_procs_)
write(psb_err_unit,'("Parameter n. ",i0," must be equal on all processes. ",i0)')i_e_d(1)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("Parameter n. ",i0," must be equal on all processes. ",i0)')i_e_d(1)
case(psb_err_entry_out_of_bounds_)
write(psb_err_unit,'("Entry n. ",i0," out of ",i0," should be between 1 and ",i0," but is ",i0)')&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("Entry n. ",i0," out of ",i0," should be between 1 and ",i0," but is ",i0)')&
& i_e_d(1),i_e_d(3),i_e_d(4),i_e_d(2)
case(psb_err_inconsistent_index_lists_)
write(psb_err_unit,'("Index lists are inconsistent: some indices are orphans")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Index lists are inconsistent: some indices are orphans")')
case(psb_err_partfunc_toomuchprocs_)
write(psb_err_unit,&
allocate(achmsg(4))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("partition function passed as input argument n. ",i0," returns number of processes")')&
&i_e_d(1)
write(psb_err_unit,&
write(achmsg(3),&
& '("greater than No of grid s processes on global point ",i0,". Actual number of grid s ")')&
&i_e_d(4)
write(psb_err_unit,'("processes is ",i0,", number returned is ",i0)')i_e_d(2),i_e_d(3)
write(achmsg(4),'("processes is ",i0,", number returned is ",i0)')i_e_d(2),i_e_d(3)
case(psb_err_partfunc_toofewprocs_)
write(psb_err_unit,'("partition function passed as input argument n. ",i0," returns number of processes")')&
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("partition function passed as input argument n. ",i0," returns number of processes")')&
&i_e_d(1)
write(psb_err_unit,'("less or equal to 0 on global point ",i0,". Number returned is ",i0)')&
write(achmsg(3),&
&'("less or equal to 0 on global point ",i0,". Number returned is ",i0)')&
&i_e_d(3),i_e_d(2)
case(psb_err_partfunc_wrong_pid_)
write(psb_err_unit,&
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("partition function passed as input argument n. ",i0," returns wrong processes identifier")')&
& i_e_d(1)
write(psb_err_unit,'("on global point ",i0,". Current value returned is : ",i0)')&
write(achmsg(3),&
& '("on global point ",i0,". Current value returned is : ",i0)')&
& i_e_d(3),i_e_d(2)
case(psb_err_no_optional_arg_)
write(psb_err_unit,'("One of the optional arguments ",a," must be present")')&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("One of the optional arguments ",a," must be present")')&
& trim(a_e_d)
case(psb_err_arg_m_required_)
write(psb_err_unit,'("Argument M is required when argument PARTS is specified")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Argument M is required when argument PARTS is specified")')
case(psb_err_spmat_invalid_state_)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("Sparse Matrix and descriptors are in an invalid state for this subroutine call: ",i0)')&
&i_e_d(1)
case(psb_err_missing_override_method_)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("Base class method ",a," called: the class for ",a," is missing an overriding implementation")')&
& trim(r_name), trim(a_e_d)
case(psb_err_invalid_dynamic_type_)
write(psb_err_unit,'("input argument n. ",i0," has a dynamic type not allowed here.")')&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("input argument n. ",i0," has a dynamic type not allowed here.")')&
& i_e_d(1)
case (psb_err_rectangular_mat_unsupported_)
write(psb_err_unit,&
case(psb_err_rectangular_mat_unsupported_)
write(achmsg(2),&
&'("This routine does not support rectangular matrices: ",i0, " /= ",i0)') &
& i_e_d(1), i_e_d(2)
case (psb_err_invalid_mat_state_)
write(psb_err_unit,'("Invalid state for sparse matrix")')
case (psb_err_invalid_cd_state_)
write(psb_err_unit,'("Invalid state for communication descriptor")')
case (psb_err_invalid_a_and_cd_state_)
write(psb_err_unit,'("Invalid combined state for A and DESC_A")')
case (psb_err_invalid_vect_state_)
write(psb_err_unit,'("Invalid state for vector")')
case(psb_err_invalid_mat_state_)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Invalid state for sparse matrix")')
case(psb_err_invalid_cd_state_)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Invalid state for communication descriptor")')
case(psb_err_invalid_a_and_cd_state_)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Invalid combined state for A and DESC_A")')
case(psb_err_invalid_vect_state_)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Invalid state for vector")')
case(1125:1999)
write(psb_err_unit,'("computational error. code: ",i0)')err_c
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("computational error. code: ",i0)')err_c
case(psb_err_context_error_)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(0,'("Parallel context error. Number of processes=-1")')
case(psb_err_initerror_neugh_procs_)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("Initialization error: not enough processes available in the parallel environment")')
case(psb_err_invalid_matrix_input_state_)
write(psb_err_unit,'("Invalid input state for matrix.")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Invalid input state for matrix.")')
case(psb_err_input_no_regen_)
write(psb_err_unit,'("Input state for matrix is not adequate for regeneration.")')
case (2233:2999)
write(psb_err_unit,'("resource error. code: ",i0)')err_c
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Input state for matrix is not adequate for regeneration.")')
case(2233:2999)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("resource error. code: ",i0)')err_c
case(3000:3009)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("sparse matrix representation ",a3," not yet implemented")')&
&a_e_d(1:3)
case(psb_err_lld_case_not_implemented_)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("Case lld not equal matrix_data[N_COL_] is not yet implemented.")')
case(psb_err_transpose_unsupported_)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("transpose option for sparse matrix representation ",a3," not implemented")')&
& a_e_d(1:3)
case(psb_err_transpose_c_unsupported_)
write(psb_err_unit,'("Case trans = C is not yet implemented.")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Case trans = C is not yet implemented.")')
case(psb_err_transpose_not_n_unsupported_)
write(psb_err_unit,'("Case trans /= N is not yet implemented.")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Case trans /= N is not yet implemented.")')
case(psb_err_only_unit_diag_)
write(psb_err_unit,'("Only unit diagonal so far for triangular matrices. ")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Only unit diagonal so far for triangular matrices. ")')
case(3023)
write(psb_err_unit,'("Cases DESCRA(1:1)=S DESCRA(1:1)=T not yet implemented. ")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Cases DESCRA(1:1)=S DESCRA(1:1)=T not yet implemented. ")')
case(3024)
write(psb_err_unit,'("Cases DESCRA(1:1)=G not yet implemented. ")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Cases DESCRA(1:1)=G not yet implemented. ")')
case(psb_err_ja_nix_ia_niy_unsupported_)
write(psb_err_unit,'("Case ja /= ix or ia/=iy is not yet implemented.")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Case ja /= ix or ia/=iy is not yet implemented.")')
case(psb_err_ix_n1_iy_n1_unsupported_)
write(psb_err_unit,'("Case ix /= 1 or iy /= 1 is not yet implemented.")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Case ix /= 1 or iy /= 1 is not yet implemented.")')
case(3050)
write(psb_err_unit,'("Case ix /= iy is not yet implemented.")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Case ix /= iy is not yet implemented.")')
case(3060)
write(psb_err_unit,'("Case ix /= 1 is not yet implemented.")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Case ix /= 1 is not yet implemented.")')
case(3070)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("This operation is only implemented with no overlap.")')
case(3080)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("Decompostion type ",i0," not yet supported.")')&
& i_e_d(1)
case(3090)
write(psb_err_unit,'("Insert matrix mode not yet implemented.")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Insert matrix mode not yet implemented.")')
case(3100)
write(psb_err_unit,&
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("Error on index. Element has not been inserted")')
write(psb_err_unit,&
write(achmsg(3),&
& '("local index is: ",i0," and global index is:",i0)')&
& i_e_d(1:2)
case(psb_err_input_matrix_unassembled_)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("Before you call this routine, you must assembly sparse matrix")')
case(3111)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("Before you call this routine, you must initialize the preconditioner")')
case(3112)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("Before you call this routine, you must build the preconditioner")')
case(3113:3998)
write(psb_err_unit,'("miscellaneus error. code: ",i0)')err_c
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("miscellaneus error. code: ",i0)')err_c
case(psb_err_missing_aux_lib_)
write(psb_err_unit,&
allocate(achmsg(3))
achmsg(1) = tmpmsg
write(achmsg(2),&
&'("This method requires an external support library.")')
write(psb_err_unit,&
write(achmsg(3),&
&'("Fix configure and rebuild the software.")')
case(psb_err_alloc_dealloc_)
write(psb_err_unit,'("Allocation/deallocation error")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Allocation/deallocation error")')
case(psb_err_internal_error_)
write(psb_err_unit,'("Internal error: ",a)') &
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Internal error: ",a)') &
& trim(a_e_d)
case(psb_err_from_subroutine_)
write(psb_err_unit,'("Error from call to subroutine ",a)')&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Error from call to subroutine ",a)')&
& trim(a_e_d)
case(psb_err_from_subroutine_non_)
write(psb_err_unit,'("Error from call to a subroutine ")')
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Error from call to a subroutine ")')
case(psb_err_from_subroutine_i_)
write(psb_err_unit,'("Error ",i0," from call to a subroutine ")')&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Error ",i0," from call to a subroutine ")')&
& i_e_d(1)
case(psb_err_from_subroutine_ai_)
write(psb_err_unit,'("Error from call to subroutine ",a," ",i0)')&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Error from call to subroutine ",a," ",i0)')&
& trim(a_e_d),i_e_d(1)
case(psb_err_alloc_request_)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("Error on allocation request for ",i0," items of type ",a)')&
& i_e_d(1),trim(a_e_d)
case(4110)
write(psb_err_unit,&
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),&
& '("Error ",i0," from call to an external package in subroutine ",a)')&
&i_e_d(1),trim(a_e_d)
case (psb_err_invalid_istop_)
write(psb_err_unit,'("Invalid ISTOP: ",i0)')i_e_d(1)
case (5002)
write(psb_err_unit,'("Invalid PREC: ",i0)')i_e_d(1)
case (5003)
write(psb_err_unit,'("Invalid PREC: ",a3)')a_e_d(1:3)
case(psb_err_invalid_istop_)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Invalid ISTOP: ",i0)')i_e_d(1)
case(5002)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Invalid PREC: ",i0)')i_e_d(1)
case(5003)
allocate(achmsg(2))
achmsg(1) = tmpmsg
write(achmsg(2),'("Invalid PREC: ",a3)')a_e_d(1:3)
case default
write(psb_err_unit,'("unknown error (",i0,") in subroutine ",a)')&
allocate(achmsg(4))
achmsg(1) = tmpmsg
write(achmsg(2),'("unknown error (",i0,") in subroutine ",a)')&
& err_c,trim(r_name)
write(psb_err_unit,'(5(i0,2x))') i_e_d
write(psb_err_unit,'(a)') trim(a_e_d)
write(achmsg(3),'(5(i0,2x))') i_e_d
write(achmsg(4),'(a)') trim(a_e_d)
end select
end subroutine psb_errmsg
end subroutine psb_ach_errmsg
! prints the error msg associated to a specific error code
subroutine psb_errmsg(iunit, err_c, r_name, i_e_d, a_e_d,me)
integer(psb_ipk_), intent(in) :: iunit
integer(psb_ipk_), intent(in) :: err_c
character(len=20), intent(in) :: r_name
character(len=40), intent(in) :: a_e_d
integer(psb_ipk_), intent(in) :: i_e_d(5)
integer(psb_mpik_), optional :: me
integer(psb_ipk_) :: i
character(len=psb_max_errmsg_len_), allocatable :: achmsg(:)
call psb_ach_errmsg(achmsg,err_c, r_name, i_e_d, a_e_d,me)
do i=1,size(achmsg)
write(iunit,'(a)'),trim(achmsg(i))
end do
end subroutine psb_errmsg
end module psb_error_mod

@ -1170,12 +1170,10 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
9999 call psb_error_handler(err_act)
return
end subroutine block_clone
@ -1222,11 +1220,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act /= psb_act_ret_) then
call psb_error()
end if
9999 call psb_error_handler(err_act)
return
end subroutine block_reinit
@ -1270,11 +1266,9 @@ contains
!!$ call psb_erractionrestore(err_act)
!!$ return
!!$
!!$9999 continue
!!$ call psb_erractionrestore(err_act)
!!$ if (err_act /= psb_act_ret_) then
!!$ call psb_error()
!!$ end if
!!$
!!$9999 call psb_error_handler(err_act)
!!$
!!$ return
!!$ end subroutine block_reinit
!!$

@ -241,11 +241,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act /= psb_act_ret_) then
call psb_error()
end if
9999 call psb_error_handler(err_act)
return
end subroutine glist_clone

@ -715,14 +715,8 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_ret_) then
return
else
call psb_error(ictxt)
end if
return
end subroutine hash_g2lv1_ins
@ -1421,12 +1415,10 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
9999 call psb_error_handler(err_act)
return
end subroutine hash_clone
@ -1485,7 +1477,7 @@ contains
call idxmap%g2lip_ins(idx(nr+1:nc),info,lidx=lidx(nr+1:nc))
end if
if (info /= psb_success_) then
info = psb_err_from_subroutine_
call psb_errpush(info,name)
@ -1494,11 +1486,9 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act /= psb_act_ret_) then
call psb_error()
end if
9999 call psb_error_handler(err_act)
return
end subroutine hash_reinit

@ -75,7 +75,9 @@ module psb_i_base_vect_mod
! Assembly does almost nothing here, but is important
! in derived classes.
!
procedure, pass(x) :: ins => i_base_ins
procedure, pass(x) :: ins_a => i_base_ins_a
procedure, pass(x) :: ins_v => i_base_ins_v
generic, public :: ins => ins_a, ins_v
procedure, pass(x) :: zero => i_base_zero
procedure, pass(x) :: asb => i_base_asb
procedure, pass(x) :: free => i_base_free
@ -295,7 +297,7 @@ contains
!! \param info return code
!!
!
subroutine i_base_ins(n,irl,val,dupl,x,info)
subroutine i_base_ins_a(n,irl,val,dupl,x,info)
use psi_serial_mod
implicit none
class(psb_i_base_vect_type), intent(inout) :: x
@ -346,12 +348,41 @@ contains
! !$ goto 9999
end select
end if
call x%set_host()
if (info /= 0) then
call psb_errpush(info,'base_vect_ins')
return
end if
end subroutine i_base_ins
end subroutine i_base_ins_a
subroutine i_base_ins_v(n,irl,val,dupl,x,info)
use psi_serial_mod
implicit none
class(psb_i_base_vect_type), intent(inout) :: x
integer(psb_ipk_), intent(in) :: n, dupl
class(psb_i_base_vect_type), intent(inout) :: irl
class(psb_i_base_vect_type), intent(inout) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: i, isz
info = 0
if (psb_errstatus_fatal()) return
if (irl%is_dev()) call irl%sync()
if (val%is_dev()) call val%sync()
if (x%is_dev()) call x%sync()
call x%ins(n,irl%v,val%v,dupl,info)
if (info /= 0) then
call psb_errpush(info,'base_vect_ins')
return
end if
end subroutine i_base_ins_v
!
!> Function base_zero

@ -57,6 +57,14 @@ module psb_i_tools_mod
integer(psb_ipk_),intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: n
end subroutine psb_ialloc_vect
subroutine psb_ialloc_vect_r2(x, desc_a,info,n,lb)
import :: psb_desc_type, psb_ipk_, &
& psb_i_base_vect_type, psb_i_vect_type
type(psb_i_vect_type), allocatable, intent(out) :: x(:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_),intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: n, lb
end subroutine psb_ialloc_vect_r2
end interface
@ -82,6 +90,15 @@ module psb_i_tools_mod
class(psb_i_base_vect_type), intent(in), optional :: mold
logical, intent(in), optional :: scratch
end subroutine psb_iasb_vect
subroutine psb_iasb_vect_r2(x, desc_a, info,mold, scratch)
import :: psb_desc_type, psb_ipk_, &
& psb_i_base_vect_type, psb_i_vect_type
type(psb_desc_type), intent(in) :: desc_a
type(psb_i_vect_type), intent(inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
class(psb_i_base_vect_type), intent(in), optional :: mold
logical, intent(in), optional :: scratch
end subroutine psb_iasb_vect_r2
end interface
@ -105,6 +122,13 @@ module psb_i_tools_mod
type(psb_i_vect_type), intent(inout) :: x
integer(psb_ipk_), intent(out) :: info
end subroutine psb_ifree_vect
subroutine psb_ifree_vect_r2(x, desc_a, info)
import :: psb_desc_type, psb_ipk_, &
& psb_i_base_vect_type, psb_i_vect_type
type(psb_desc_type), intent(in) :: desc_a
type(psb_i_vect_type), allocatable, intent(inout) :: x(:)
integer(psb_ipk_), intent(out) :: info
end subroutine psb_ifree_vect_r2
end interface
interface psb_geins
@ -142,6 +166,30 @@ module psb_i_tools_mod
integer(psb_ipk_), optional, intent(in) :: dupl
logical, intent(in), optional :: local
end subroutine psb_iins_vect
subroutine psb_iins_vect_v(m,irw,val,x,desc_a,info,dupl,local)
import :: psb_desc_type, psb_ipk_, &
& psb_i_base_vect_type, psb_i_vect_type
integer(psb_ipk_), intent(in) :: m
type(psb_desc_type), intent(in) :: desc_a
type(psb_i_vect_type), intent(inout) :: x
type(psb_i_vect_type), intent(inout) :: irw
type(psb_i_vect_type), intent(inout) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: dupl
logical, intent(in), optional :: local
end subroutine psb_iins_vect_v
subroutine psb_iins_vect_r2(m,irw,val,x,desc_a,info,dupl,local)
import :: psb_desc_type, psb_ipk_, &
& psb_i_base_vect_type, psb_i_vect_type
integer(psb_ipk_), intent(in) :: m
type(psb_desc_type), intent(in) :: desc_a
type(psb_i_vect_type), intent(inout) :: x(:)
integer(psb_ipk_), intent(in) :: irw(:)
integer(psb_ipk_), intent(in) :: val(:,:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: dupl
logical, intent(in), optional :: local
end subroutine psb_iins_vect_r2
end interface

@ -76,7 +76,9 @@ module psb_i_vect_mod
procedure, pass(y) :: sctb => i_vect_sctb
generic, public :: sct => sctb
procedure, pass(x) :: free => i_vect_free
procedure, pass(x) :: ins => i_vect_ins
procedure, pass(x) :: ins_a => i_vect_ins_a
procedure, pass(x) :: ins_v => i_vect_ins_v
generic, public :: ins => ins_v, ins_a
procedure, pass(x) :: bld_x => i_vect_bld_x
procedure, pass(x) :: bld_n => i_vect_bld_n
generic, public :: bld => bld_x, bld_n
@ -609,7 +611,7 @@ contains
end subroutine i_vect_free
subroutine i_vect_ins(n,irl,val,dupl,x,info)
subroutine i_vect_ins_a(n,irl,val,dupl,x,info)
use psi_serial_mod
implicit none
class(psb_i_vect_type), intent(inout) :: x
@ -628,8 +630,28 @@ contains
call x%v%ins(n,irl,val,dupl,info)
end subroutine i_vect_ins
end subroutine i_vect_ins_a
subroutine i_vect_ins_v(n,irl,val,dupl,x,info)
use psi_serial_mod
implicit none
class(psb_i_vect_type), intent(inout) :: x
integer(psb_ipk_), intent(in) :: n, dupl
class(psb_i_vect_type), intent(inout) :: irl
class(psb_i_vect_type), intent(inout) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: i
info = 0
if (.not.(allocated(x%v).and.allocated(irl%v).and.allocated(val%v))) then
info = psb_err_invalid_vect_state_
return
end if
call x%v%ins(n,irl%v,val%v,dupl,info)
end subroutine i_vect_ins_v
subroutine i_vect_cnv(x,mold)
class(psb_i_vect_type), intent(inout) :: x

@ -462,9 +462,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_l2gs1
@ -490,10 +488,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
call psb_error_handler(err_act)
end subroutine base_l2gs2
@ -517,9 +512,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_l2gv1
@ -543,9 +536,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_l2gv2
@ -570,9 +561,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_g2ls1
@ -598,9 +587,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_g2ls2
@ -625,9 +612,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_g2lv1
@ -653,9 +638,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
@ -682,9 +665,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_g2ls1_ins
@ -710,9 +691,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_g2ls2_ins
@ -738,9 +717,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_g2lv1_ins
@ -766,9 +743,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_g2lv2_ins
@ -791,9 +766,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_asb
@ -849,9 +822,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_init_vl
@ -875,9 +846,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_clone
@ -901,9 +870,7 @@ contains
call psb_errpush(psb_err_missing_override_method_,&
& name,a_err=idxmap%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_error_handler(err_act)
return
end subroutine base_reinit

@ -698,11 +698,8 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act /= psb_act_ret_) then
call psb_error()
end if
9999 call psb_error_handler(err_act)
return
end subroutine list_clone

File diff suppressed because it is too large Load Diff

@ -798,11 +798,8 @@ contains
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act /= psb_act_ret_) then
call psb_error()
end if
9999 call psb_error_handler(err_act)
return
end subroutine repl_clone

@ -153,7 +153,7 @@ module psb_s_base_mat_mod
procedure, pass(a) :: mv_from_coo => psb_s_mv_coo_from_coo
procedure, pass(a) :: mv_to_fmt => psb_s_mv_coo_to_fmt
procedure, pass(a) :: mv_from_fmt => psb_s_mv_coo_from_fmt
procedure, pass(a) :: csput_a => psb_s_coo_csput_a
procedure, pass(a) :: csput_a => psb_s_coo_csput_a
procedure, pass(a) :: get_diag => psb_s_coo_get_diag
procedure, pass(a) :: csgetrow => psb_s_coo_csgetrow
procedure, pass(a) :: csgetptn => psb_s_coo_csgetptn

@ -247,10 +247,9 @@ contains
ierr(1) = 2
info = psb_err_missing_override_method_
call psb_errpush(info,name,i_err=ierr)
call psb_get_erraction(err_act)
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_erractionsave(err_act)
call psb_error_handler(err_act)
end select

@ -22,7 +22,7 @@
!!$ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS
!!$ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
!!$ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
!!$ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
!!$ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSIESS
!!$ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
!!$ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
!!$ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

@ -325,7 +325,6 @@ contains
end do
end if
return
return
end subroutine zrot
!
!

@ -153,7 +153,7 @@ module psb_z_base_mat_mod
procedure, pass(a) :: mv_from_coo => psb_z_mv_coo_from_coo
procedure, pass(a) :: mv_to_fmt => psb_z_mv_coo_to_fmt
procedure, pass(a) :: mv_from_fmt => psb_z_mv_coo_from_fmt
procedure, pass(a) :: csput_a => psb_z_coo_csput_a
procedure, pass(a) :: csput_a => psb_z_coo_csput_a
procedure, pass(a) :: get_diag => psb_z_coo_get_diag
procedure, pass(a) :: csgetrow => psb_z_coo_csgetrow
procedure, pass(a) :: csgetptn => psb_z_coo_csgetptn

@ -247,10 +247,9 @@ contains
ierr(1) = 2
info = psb_err_missing_override_method_
call psb_errpush(info,name,i_err=ierr)
call psb_get_erraction(err_act)
if (err_act /= psb_act_ret_) then
call psb_error()
end if
call psb_erractionsave(err_act)
call psb_error_handler(err_act)
end select

@ -251,6 +251,16 @@ module psi_i_mod
integer(psb_ipk_),target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd,totrcv
end subroutine psi_iswapidx_vect
subroutine psi_iswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,info)
import :: psb_desc_type, psb_ipk_, psb_i_base_vect_type
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
class(psb_i_base_vect_type) :: y
integer(psb_ipk_) :: beta
integer(psb_ipk_), target :: work(:)
class(psb_i_base_vect_type), intent(in) :: idx
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
end subroutine psi_iswap_vidx_vect
end interface

@ -74,12 +74,12 @@ function psb_camax(x,desc_a, info, jx) result(res)
call psb_errpush(info,name)
goto 9999
endif
ix = 1
if (present(jx)) then
ijx = jx
ijx = jx
else
ijx = 1
ijx = 1
endif
m = desc_a%get_global_rows()
@ -87,16 +87,16 @@ function psb_camax(x,desc_a, info, jx) result(res)
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (iix /= 1) then
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
end if
! compute local max
@ -105,20 +105,15 @@ function psb_camax(x,desc_a, info, jx) result(res)
else
res = szero
end if
! compute global max
call psb_amx(ictxt, res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_camax
@ -197,7 +192,7 @@ function psb_camaxv (x,desc_a, info) result(res)
call psb_errpush(info,name)
goto 9999
endif
ix = 1
jx = 1
@ -206,16 +201,16 @@ function psb_camaxv (x,desc_a, info) result(res)
call psb_chkvect(m,ione,ldx,ix,jx,desc_a,info,iix,jjx)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (iix /= 1) then
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
end if
! compute local max
@ -224,20 +219,15 @@ function psb_camaxv (x,desc_a, info) result(res)
else
res = szero
end if
! compute global max
call psb_amx(ictxt, res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_camaxv
@ -312,13 +302,8 @@ function psb_camax_vect(x, desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_camax_vect
@ -407,16 +392,16 @@ subroutine psb_camaxvs(res,x,desc_a, info)
ldx=size(x,1)
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (iix /= 1) then
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
end if
! compute local max
@ -425,20 +410,15 @@ subroutine psb_camaxvs(res,x,desc_a, info)
else
res = szero
end if
! compute global max
call psb_amx(ictxt, res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_camaxvs
@ -515,12 +495,12 @@ subroutine psb_cmamaxs(res,x,desc_a, info,jx)
call psb_errpush(info,name)
goto 9999
endif
ix = 1
if (present(jx)) then
ijx = jx
ijx = jx
else
ijx = 1
ijx = 1
endif
m = desc_a%get_global_rows()
@ -528,16 +508,16 @@ subroutine psb_cmamaxs(res,x,desc_a, info,jx)
ldx = size(x,1)
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (iix /= 1) then
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
end if
res(1:k) = szero
@ -547,19 +527,14 @@ subroutine psb_cmamaxs(res,x,desc_a, info,jx)
res(i) = psb_amax(desc_a%get_local_rows()-iix+1,x(:,jjx+i-1))
end do
end if
! compute global max
call psb_amx(ictxt, res(1:k))
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cmamaxs

@ -119,13 +119,8 @@ function psb_casum (x,desc_a, info, jx) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_casum
@ -197,13 +192,8 @@ function psb_casum_vect(x, desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_casum_vect
@ -322,13 +312,8 @@ function psb_casumv(x,desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_casumv
@ -447,12 +432,7 @@ subroutine psb_casumvs(res,x,desc_a, info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_casumvs

@ -105,13 +105,8 @@ subroutine psb_caxpby_vect(alpha, x, beta, y,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_caxpby_vect
@ -229,13 +224,8 @@ subroutine psb_caxpby(alpha, x, beta,y,desc_a,info, n, jx, jy)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_caxpby
@ -356,12 +346,7 @@ subroutine psb_caxpbyv(alpha, x, beta,y,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_caxpbyv

@ -137,13 +137,8 @@ function psb_cdot_vect(x, y, desc_a,info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_cdot_vect
@ -238,13 +233,8 @@ function psb_cdot(x, y,desc_a, info, jx, jy) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_cdot
@ -368,13 +358,8 @@ function psb_cdotv(x, y,desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_cdotv
@ -495,13 +480,8 @@ subroutine psb_cdotvs(res, x, y,desc_a, info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cdotvs
@ -636,12 +616,7 @@ subroutine psb_cmdots(res, x, y, desc_a, info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cmdots

@ -119,13 +119,8 @@ function psb_cnrm2(x, desc_a, info, jx) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_cnrm2
@ -237,20 +232,15 @@ function psb_cnrm2v(x, desc_a, info) result(res)
else
res = szero
end if
call psb_nrm2(ictxt,res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_cnrm2v
@ -333,13 +323,8 @@ function psb_cnrm2_vect(x, desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_cnrm2_vect
@ -442,7 +427,7 @@ subroutine psb_cnrm2vs(res, x, desc_a, info)
if (desc_a%get_local_rows() > 0) then
ndim = desc_a%get_local_rows()
res = scnrm2( int(ndim,kind=psb_mpik_), x, int(ione,kind=psb_mpik_) )
! adjust because overlapped elements are computed more than once
do i=1,size(desc_a%ovrlap_elem,1)
idx = desc_a%ovrlap_elem(i,1)
@ -460,12 +445,7 @@ subroutine psb_cnrm2vs(res, x, desc_a, info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cnrm2vs

@ -106,12 +106,7 @@ function psb_cnrmi(a,desc_a,info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_cnrmi

@ -348,13 +348,8 @@ subroutine psb_cspmm(alpha,a,x,beta,y,desc_a,info,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cspmm
@ -612,7 +607,7 @@ subroutine psb_cspmv(alpha,a,x,beta,y,desc_a,info,&
call psi_ovrl_save(x,xvsave,desc_a,info)
if (info == psb_success_) call psi_ovrl_upd(x,desc_a,psb_avg_,info)
yp(nrow+1:ncol) = czero
! local Matrix-vector product
if (info == psb_success_) call psb_csmm(alpha,a,x,beta,y,info,trans=trans_)
@ -626,13 +621,13 @@ subroutine psb_cspmv(alpha,a,x,beta,y,desc_a,info,&
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (doswap_) then
call psi_swaptran(ior(psb_swap_send_,psb_swap_recv_),&
& cone,yp,desc_a,iwork,info)
if (info == psb_success_) call psi_swapdata(ior(psb_swap_send_,psb_swap_recv_),&
& cone,yp,desc_a,iwork,info,data=psb_comm_ovr_)
if (debug_level >= psb_debug_comp_) &
& write(debug_unit,*) me,' ',trim(name),' swaptran ', info
if(info /= psb_success_) then
@ -664,13 +659,8 @@ subroutine psb_cspmv(alpha,a,x,beta,y,desc_a,info,&
endif
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cspmv
@ -825,7 +815,7 @@ subroutine psb_cspmv_vect(alpha,a,x,beta,y,desc_a,info,&
!!! THIS SHOULD BE FIXED !!! But beta is almost never /= 0
!!$ yp(nrow+1:ncol) = czero
! local Matrix-vector product
if (info == psb_success_) call psb_csmm(alpha,a,x,beta,y,info,trans=trans_)
@ -839,13 +829,13 @@ subroutine psb_cspmv_vect(alpha,a,x,beta,y,desc_a,info,&
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (doswap_) then
call psi_swaptran(ior(psb_swap_send_,psb_swap_recv_),&
& cone,y%v,desc_a,iwork,info)
if (info == psb_success_) call psi_swapdata(ior(psb_swap_send_,psb_swap_recv_),&
& cone,y%v,desc_a,iwork,info,data=psb_comm_ovr_)
if (debug_level >= psb_debug_comp_) &
& write(debug_unit,*) me,' ',trim(name),' swaptran ', info
if(info /= psb_success_) then
@ -877,12 +867,7 @@ subroutine psb_cspmv_vect(alpha,a,x,beta,y,desc_a,info,&
endif
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cspmv_vect

@ -102,7 +102,7 @@ function psb_cspnrm1(a,desc_a,info) result(res)
!!$ call psb_errpush(info,name,a_err=ch_err)
!!$ goto 9999
!!$ end if
if ((m /= 0).and.(n /= 0)) then
v = a%aclsum(info)
if (info == psb_success_) &
@ -124,12 +124,7 @@ function psb_cspnrm1(a,desc_a,info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_cspnrm1

@ -276,16 +276,11 @@ subroutine psb_cspsm(alpha,a,x,beta,y,desc_a,info,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cspsm
!!$
!!$ Parallel Sparse BLAS version 3.1
!!$ (C) Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013
@ -539,17 +534,12 @@ subroutine psb_cspsv(alpha,a,x,beta,y,desc_a,info,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cspsv
subroutine psb_cspsv_vect(alpha,a,x,beta,y,desc_a,info,&
& trans, scale, choice, diag, work)
use psb_base_mod, psb_protect_name => psb_cspsv_vect
@ -705,13 +695,8 @@ subroutine psb_cspsv_vect(alpha,a,x,beta,y,desc_a,info,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_cspsv_vect

@ -74,12 +74,12 @@ function psb_damax(x,desc_a, info, jx) result(res)
call psb_errpush(info,name)
goto 9999
endif
ix = 1
if (present(jx)) then
ijx = jx
ijx = jx
else
ijx = 1
ijx = 1
endif
m = desc_a%get_global_rows()
@ -87,16 +87,16 @@ function psb_damax(x,desc_a, info, jx) result(res)
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (iix /= 1) then
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
end if
! compute local max
@ -105,20 +105,15 @@ function psb_damax(x,desc_a, info, jx) result(res)
else
res = dzero
end if
! compute global max
call psb_amx(ictxt, res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_damax
@ -197,7 +192,7 @@ function psb_damaxv (x,desc_a, info) result(res)
call psb_errpush(info,name)
goto 9999
endif
ix = 1
jx = 1
@ -206,16 +201,16 @@ function psb_damaxv (x,desc_a, info) result(res)
call psb_chkvect(m,ione,ldx,ix,jx,desc_a,info,iix,jjx)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (iix /= 1) then
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
end if
! compute local max
@ -224,20 +219,15 @@ function psb_damaxv (x,desc_a, info) result(res)
else
res = dzero
end if
! compute global max
call psb_amx(ictxt, res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_damaxv
@ -312,13 +302,8 @@ function psb_damax_vect(x, desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_damax_vect
@ -407,16 +392,16 @@ subroutine psb_damaxvs(res,x,desc_a, info)
ldx=size(x,1)
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (iix /= 1) then
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
end if
! compute local max
@ -425,20 +410,15 @@ subroutine psb_damaxvs(res,x,desc_a, info)
else
res = dzero
end if
! compute global max
call psb_amx(ictxt, res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_damaxvs
@ -515,12 +495,12 @@ subroutine psb_dmamaxs(res,x,desc_a, info,jx)
call psb_errpush(info,name)
goto 9999
endif
ix = 1
if (present(jx)) then
ijx = jx
ijx = jx
else
ijx = 1
ijx = 1
endif
m = desc_a%get_global_rows()
@ -528,16 +508,16 @@ subroutine psb_dmamaxs(res,x,desc_a, info,jx)
ldx = size(x,1)
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (iix /= 1) then
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
end if
res(1:k) = dzero
@ -547,19 +527,14 @@ subroutine psb_dmamaxs(res,x,desc_a, info,jx)
res(i) = psb_amax(desc_a%get_local_rows()-iix+1,x(:,jjx+i-1))
end do
end if
! compute global max
call psb_amx(ictxt, res(1:k))
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dmamaxs

@ -119,13 +119,8 @@ function psb_dasum (x,desc_a, info, jx) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_dasum
@ -197,13 +192,8 @@ function psb_dasum_vect(x, desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_dasum_vect
@ -322,13 +312,8 @@ function psb_dasumv(x,desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_dasumv
@ -447,12 +432,7 @@ subroutine psb_dasumvs(res,x,desc_a, info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dasumvs

@ -105,13 +105,8 @@ subroutine psb_daxpby_vect(alpha, x, beta, y,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_daxpby_vect
@ -229,13 +224,8 @@ subroutine psb_daxpby(alpha, x, beta,y,desc_a,info, n, jx, jy)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_daxpby
@ -356,12 +346,7 @@ subroutine psb_daxpbyv(alpha, x, beta,y,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_daxpbyv

@ -137,13 +137,8 @@ function psb_ddot_vect(x, y, desc_a,info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_ddot_vect
@ -238,13 +233,8 @@ function psb_ddot(x, y,desc_a, info, jx, jy) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_ddot
@ -368,13 +358,8 @@ function psb_ddotv(x, y,desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_ddotv
@ -495,13 +480,8 @@ subroutine psb_ddotvs(res, x, y,desc_a, info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_ddotvs
@ -636,12 +616,7 @@ subroutine psb_dmdots(res, x, y, desc_a, info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dmdots

@ -119,13 +119,8 @@ function psb_dnrm2(x, desc_a, info, jx) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_dnrm2
@ -237,20 +232,15 @@ function psb_dnrm2v(x, desc_a, info) result(res)
else
res = dzero
end if
call psb_nrm2(ictxt,res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_dnrm2v
@ -333,13 +323,8 @@ function psb_dnrm2_vect(x, desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_dnrm2_vect
@ -442,7 +427,7 @@ subroutine psb_dnrm2vs(res, x, desc_a, info)
if (desc_a%get_local_rows() > 0) then
ndim = desc_a%get_local_rows()
res = dnrm2( int(ndim,kind=psb_mpik_), x, int(ione,kind=psb_mpik_) )
! adjust because overlapped elements are computed more than once
do i=1,size(desc_a%ovrlap_elem,1)
idx = desc_a%ovrlap_elem(i,1)
@ -460,12 +445,7 @@ subroutine psb_dnrm2vs(res, x, desc_a, info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dnrm2vs

@ -106,12 +106,7 @@ function psb_dnrmi(a,desc_a,info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_dnrmi

@ -348,13 +348,8 @@ subroutine psb_dspmm(alpha,a,x,beta,y,desc_a,info,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dspmm
@ -612,7 +607,7 @@ subroutine psb_dspmv(alpha,a,x,beta,y,desc_a,info,&
call psi_ovrl_save(x,xvsave,desc_a,info)
if (info == psb_success_) call psi_ovrl_upd(x,desc_a,psb_avg_,info)
yp(nrow+1:ncol) = dzero
! local Matrix-vector product
if (info == psb_success_) call psb_csmm(alpha,a,x,beta,y,info,trans=trans_)
@ -626,13 +621,13 @@ subroutine psb_dspmv(alpha,a,x,beta,y,desc_a,info,&
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (doswap_) then
call psi_swaptran(ior(psb_swap_send_,psb_swap_recv_),&
& done,yp,desc_a,iwork,info)
if (info == psb_success_) call psi_swapdata(ior(psb_swap_send_,psb_swap_recv_),&
& done,yp,desc_a,iwork,info,data=psb_comm_ovr_)
if (debug_level >= psb_debug_comp_) &
& write(debug_unit,*) me,' ',trim(name),' swaptran ', info
if(info /= psb_success_) then
@ -664,13 +659,8 @@ subroutine psb_dspmv(alpha,a,x,beta,y,desc_a,info,&
endif
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dspmv
@ -825,7 +815,7 @@ subroutine psb_dspmv_vect(alpha,a,x,beta,y,desc_a,info,&
!!! THIS SHOULD BE FIXED !!! But beta is almost never /= 0
!!$ yp(nrow+1:ncol) = dzero
! local Matrix-vector product
if (info == psb_success_) call psb_csmm(alpha,a,x,beta,y,info,trans=trans_)
@ -839,13 +829,13 @@ subroutine psb_dspmv_vect(alpha,a,x,beta,y,desc_a,info,&
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (doswap_) then
call psi_swaptran(ior(psb_swap_send_,psb_swap_recv_),&
& done,y%v,desc_a,iwork,info)
if (info == psb_success_) call psi_swapdata(ior(psb_swap_send_,psb_swap_recv_),&
& done,y%v,desc_a,iwork,info,data=psb_comm_ovr_)
if (debug_level >= psb_debug_comp_) &
& write(debug_unit,*) me,' ',trim(name),' swaptran ', info
if(info /= psb_success_) then
@ -877,12 +867,7 @@ subroutine psb_dspmv_vect(alpha,a,x,beta,y,desc_a,info,&
endif
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dspmv_vect

@ -102,7 +102,7 @@ function psb_dspnrm1(a,desc_a,info) result(res)
!!$ call psb_errpush(info,name,a_err=ch_err)
!!$ goto 9999
!!$ end if
if ((m /= 0).and.(n /= 0)) then
v = a%aclsum(info)
if (info == psb_success_) &
@ -124,12 +124,7 @@ function psb_dspnrm1(a,desc_a,info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_dspnrm1

@ -276,16 +276,11 @@ subroutine psb_dspsm(alpha,a,x,beta,y,desc_a,info,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dspsm
!!$
!!$ Parallel Sparse BLAS version 3.1
!!$ (C) Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013
@ -539,17 +534,12 @@ subroutine psb_dspsv(alpha,a,x,beta,y,desc_a,info,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dspsv
subroutine psb_dspsv_vect(alpha,a,x,beta,y,desc_a,info,&
& trans, scale, choice, diag, work)
use psb_base_mod, psb_protect_name => psb_dspsv_vect
@ -705,13 +695,8 @@ subroutine psb_dspsv_vect(alpha,a,x,beta,y,desc_a,info,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_dspsv_vect

@ -74,12 +74,12 @@ function psb_samax(x,desc_a, info, jx) result(res)
call psb_errpush(info,name)
goto 9999
endif
ix = 1
if (present(jx)) then
ijx = jx
ijx = jx
else
ijx = 1
ijx = 1
endif
m = desc_a%get_global_rows()
@ -87,16 +87,16 @@ function psb_samax(x,desc_a, info, jx) result(res)
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (iix /= 1) then
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
end if
! compute local max
@ -105,20 +105,15 @@ function psb_samax(x,desc_a, info, jx) result(res)
else
res = szero
end if
! compute global max
call psb_amx(ictxt, res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_samax
@ -197,7 +192,7 @@ function psb_samaxv (x,desc_a, info) result(res)
call psb_errpush(info,name)
goto 9999
endif
ix = 1
jx = 1
@ -206,16 +201,16 @@ function psb_samaxv (x,desc_a, info) result(res)
call psb_chkvect(m,ione,ldx,ix,jx,desc_a,info,iix,jjx)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (iix /= 1) then
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
end if
! compute local max
@ -224,20 +219,15 @@ function psb_samaxv (x,desc_a, info) result(res)
else
res = szero
end if
! compute global max
call psb_amx(ictxt, res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_samaxv
@ -312,13 +302,8 @@ function psb_samax_vect(x, desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_samax_vect
@ -407,16 +392,16 @@ subroutine psb_samaxvs(res,x,desc_a, info)
ldx=size(x,1)
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (iix /= 1) then
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
end if
! compute local max
@ -425,20 +410,15 @@ subroutine psb_samaxvs(res,x,desc_a, info)
else
res = szero
end if
! compute global max
call psb_amx(ictxt, res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_samaxvs
@ -515,12 +495,12 @@ subroutine psb_smamaxs(res,x,desc_a, info,jx)
call psb_errpush(info,name)
goto 9999
endif
ix = 1
if (present(jx)) then
ijx = jx
ijx = jx
else
ijx = 1
ijx = 1
endif
m = desc_a%get_global_rows()
@ -528,16 +508,16 @@ subroutine psb_smamaxs(res,x,desc_a, info,jx)
ldx = size(x,1)
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
info=psb_err_from_subroutine_
ch_err='psb_chkvect'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
if (iix /= 1) then
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
info=psb_err_ix_n1_iy_n1_unsupported_
call psb_errpush(info,name)
goto 9999
end if
res(1:k) = szero
@ -547,19 +527,14 @@ subroutine psb_smamaxs(res,x,desc_a, info,jx)
res(i) = psb_amax(desc_a%get_local_rows()-iix+1,x(:,jjx+i-1))
end do
end if
! compute global max
call psb_amx(ictxt, res(1:k))
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_smamaxs

@ -119,13 +119,8 @@ function psb_sasum (x,desc_a, info, jx) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_sasum
@ -197,13 +192,8 @@ function psb_sasum_vect(x, desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_sasum_vect
@ -322,13 +312,8 @@ function psb_sasumv(x,desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_sasumv
@ -447,12 +432,7 @@ subroutine psb_sasumvs(res,x,desc_a, info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_sasumvs

@ -105,13 +105,8 @@ subroutine psb_saxpby_vect(alpha, x, beta, y,&
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_saxpby_vect
@ -229,13 +224,8 @@ subroutine psb_saxpby(alpha, x, beta,y,desc_a,info, n, jx, jy)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_saxpby
@ -356,12 +346,7 @@ subroutine psb_saxpbyv(alpha, x, beta,y,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_saxpbyv

@ -137,13 +137,8 @@ function psb_sdot_vect(x, y, desc_a,info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_sdot_vect
@ -238,13 +233,8 @@ function psb_sdot(x, y,desc_a, info, jx, jy) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_sdot
@ -368,13 +358,8 @@ function psb_sdotv(x, y,desc_a, info) result(res)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end function psb_sdotv
@ -495,13 +480,8 @@ subroutine psb_sdotvs(res, x, y,desc_a, info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_sdotvs
@ -636,12 +616,7 @@ subroutine psb_smdots(res, x, y, desc_a, info)
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
9999 call psb_error_handler(ictxt,err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
end if
return
end subroutine psb_smdots

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save