|
|
@ -215,144 +215,207 @@ contains
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_ibcasts(ictxt,dat,root)
|
|
|
|
subroutine psb_ibcasts(ictxt,dat,root)
|
|
|
|
integer, intent(in) :: ictxt,root
|
|
|
|
integer, intent(in) :: ictxt
|
|
|
|
integer, intent(inout) :: dat
|
|
|
|
integer, intent(inout) :: dat
|
|
|
|
|
|
|
|
integer, intent(in), optional :: root
|
|
|
|
|
|
|
|
|
|
|
|
integer :: iam, np
|
|
|
|
integer :: iam, np, root_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (present(root)) then
|
|
|
|
|
|
|
|
root_ = root
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
root_ = 0
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
|
|
|
|
|
|
|
|
if (iam==root) then
|
|
|
|
if (iam==root_) then
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root)
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root_)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
end subroutine psb_ibcasts
|
|
|
|
end subroutine psb_ibcasts
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_ibcastv(ictxt,dat,root)
|
|
|
|
subroutine psb_ibcastv(ictxt,dat,root)
|
|
|
|
integer, intent(in) :: ictxt,root
|
|
|
|
integer, intent(in) :: ictxt
|
|
|
|
integer, intent(inout) :: dat(:)
|
|
|
|
integer, intent(inout) :: dat(:)
|
|
|
|
|
|
|
|
integer, intent(in), optional :: root
|
|
|
|
|
|
|
|
|
|
|
|
integer :: iam, np
|
|
|
|
integer :: iam, np, root_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (present(root)) then
|
|
|
|
|
|
|
|
root_ = root
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
root_ = 0
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
|
|
|
|
|
|
|
|
if (iam==root) then
|
|
|
|
if (iam==root_) then
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root)
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root_)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
end subroutine psb_ibcastv
|
|
|
|
end subroutine psb_ibcastv
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_ibcastm(ictxt,dat,root)
|
|
|
|
subroutine psb_ibcastm(ictxt,dat,root)
|
|
|
|
integer, intent(in) :: ictxt,root
|
|
|
|
integer, intent(in) :: ictxt
|
|
|
|
integer, intent(inout) :: dat(:,:)
|
|
|
|
integer, intent(inout) :: dat(:,:)
|
|
|
|
|
|
|
|
integer, intent(in), optional :: root
|
|
|
|
|
|
|
|
|
|
|
|
integer :: iam, np
|
|
|
|
integer :: iam, np, root_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (present(root)) then
|
|
|
|
|
|
|
|
root_ = root
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
root_ = 0
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
|
|
|
|
|
|
|
|
if (iam==root) then
|
|
|
|
if (iam==root_) then
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root)
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root_)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
end subroutine psb_ibcastm
|
|
|
|
end subroutine psb_ibcastm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_dbcasts(ictxt,dat,root)
|
|
|
|
subroutine psb_dbcasts(ictxt,dat,root)
|
|
|
|
integer, intent(in) :: ictxt,root
|
|
|
|
integer, intent(in) :: ictxt
|
|
|
|
real(kind(1.d0)), intent(inout) :: dat
|
|
|
|
real(kind(1.d0)), intent(inout) :: dat
|
|
|
|
|
|
|
|
integer, intent(in), optional :: root
|
|
|
|
|
|
|
|
|
|
|
|
integer :: iam, np
|
|
|
|
integer :: iam, np, root_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (present(root)) then
|
|
|
|
|
|
|
|
root_ = root
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
root_ = 0
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
|
|
|
|
|
|
|
|
if (iam==root) then
|
|
|
|
if (iam==root_) then
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root)
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root_)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
end subroutine psb_dbcasts
|
|
|
|
end subroutine psb_dbcasts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_dbcastv(ictxt,dat,root)
|
|
|
|
subroutine psb_dbcastv(ictxt,dat,root)
|
|
|
|
integer, intent(in) :: ictxt,root
|
|
|
|
integer, intent(in) :: ictxt
|
|
|
|
real(kind(1.d0)), intent(inout) :: dat(:)
|
|
|
|
real(kind(1.d0)), intent(inout) :: dat(:)
|
|
|
|
|
|
|
|
integer, intent(in), optional :: root
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
integer :: iam, np, root_
|
|
|
|
|
|
|
|
|
|
|
|
integer :: iam, np
|
|
|
|
if (present(root)) then
|
|
|
|
|
|
|
|
root_ = root
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
root_ = 0
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
|
|
|
|
|
|
|
|
if (iam==root) then
|
|
|
|
if (iam==root_) then
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root)
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root_)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
end subroutine psb_dbcastv
|
|
|
|
end subroutine psb_dbcastv
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_dbcastm(ictxt,dat,root)
|
|
|
|
subroutine psb_dbcastm(ictxt,dat,root)
|
|
|
|
integer, intent(in) :: ictxt,root
|
|
|
|
integer, intent(in) :: ictxt
|
|
|
|
real(kind(1.d0)), intent(inout) :: dat(:,:)
|
|
|
|
real(kind(1.d0)), intent(inout) :: dat(:,:)
|
|
|
|
|
|
|
|
integer, intent(in), optional :: root
|
|
|
|
|
|
|
|
|
|
|
|
integer :: iam, np
|
|
|
|
integer :: iam, np, root_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (present(root)) then
|
|
|
|
|
|
|
|
root_ = root
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
root_ = 0
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
|
|
|
|
|
|
|
|
if (iam==root) then
|
|
|
|
if (iam==root_) then
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root)
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root_)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
end subroutine psb_dbcastm
|
|
|
|
end subroutine psb_dbcastm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_zbcasts(ictxt,dat,root)
|
|
|
|
subroutine psb_zbcasts(ictxt,dat,root)
|
|
|
|
integer, intent(in) :: ictxt,root
|
|
|
|
integer, intent(in) :: ictxt
|
|
|
|
complex(kind(1.d0)), intent(inout) :: dat
|
|
|
|
complex(kind(1.d0)), intent(inout) :: dat
|
|
|
|
|
|
|
|
integer, intent(in), optional :: root
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
integer :: iam, np, root_
|
|
|
|
|
|
|
|
|
|
|
|
integer :: iam, np
|
|
|
|
if (present(root)) then
|
|
|
|
|
|
|
|
root_ = root
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
root_ = 0
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
|
|
|
|
|
|
|
|
if (iam==root) then
|
|
|
|
if (iam==root_) then
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root)
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root_)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
end subroutine psb_zbcasts
|
|
|
|
end subroutine psb_zbcasts
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_zbcastv(ictxt,dat,root)
|
|
|
|
subroutine psb_zbcastv(ictxt,dat,root)
|
|
|
|
integer, intent(in) :: ictxt,root
|
|
|
|
integer, intent(in) :: ictxt
|
|
|
|
complex(kind(1.d0)), intent(inout) :: dat(:)
|
|
|
|
complex(kind(1.d0)), intent(inout) :: dat(:)
|
|
|
|
|
|
|
|
integer, intent(in), optional :: root
|
|
|
|
|
|
|
|
|
|
|
|
integer :: iam, np
|
|
|
|
integer :: iam, np, root_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (present(root)) then
|
|
|
|
|
|
|
|
root_ = root
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
root_ = 0
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
|
|
|
|
|
|
|
|
if (iam==root) then
|
|
|
|
if (iam==root_) then
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root)
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root_)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
end subroutine psb_zbcastv
|
|
|
|
end subroutine psb_zbcastv
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_zbcastm(ictxt,dat,root)
|
|
|
|
subroutine psb_zbcastm(ictxt,dat,root)
|
|
|
|
integer, intent(in) :: ictxt,root
|
|
|
|
integer, intent(in) :: ictxt
|
|
|
|
complex(kind(1.d0)), intent(inout) :: dat(:,:)
|
|
|
|
complex(kind(1.d0)), intent(inout) :: dat(:,:)
|
|
|
|
|
|
|
|
integer, intent(in), optional :: root
|
|
|
|
|
|
|
|
|
|
|
|
integer :: iam, np
|
|
|
|
integer :: iam, np, root_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (present(root)) then
|
|
|
|
|
|
|
|
root_ = root
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
root_ = 0
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
|
|
|
|
|
|
|
|
if (iam==root) then
|
|
|
|
if (iam==root_) then
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
call gebs2d(ictxt,'A',dat)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root)
|
|
|
|
call gebr2d(ictxt,'A',dat,rrt=root_)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
end subroutine psb_zbcastm
|
|
|
|
end subroutine psb_zbcastm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_iamxs(ictxt,dat,rt,ia)
|
|
|
|
subroutine psb_iamxs(ictxt,dat,rt,ia)
|
|
|
|
integer, intent(in) :: ictxt
|
|
|
|
integer, intent(in) :: ictxt
|
|
|
|
integer, intent(inout) :: dat
|
|
|
|
integer, intent(inout) :: dat
|
|
|
|