Changes for remote build interfaces. Implementation to be completed.

This commit is contained in:
Salvatore Filippone
2022-04-01 11:38:40 +02:00
parent b4c27ec4eb
commit fc81367fef
58 changed files with 1276 additions and 938 deletions
+19 -29
View File
@@ -41,20 +41,22 @@
! nnz - integer(optional). The number of nonzeroes in the matrix.
! (local, user estimate)
!
subroutine psb_sspalloc(a, desc_a, info, nnz, bldmode)
subroutine psb_sspalloc(a, desc_a, info, nnz, dupl, bldmode)
use psb_base_mod, psb_protect_name => psb_sspalloc
implicit none
!....parameters...
type(psb_desc_type), intent(in) :: desc_a
type(psb_sspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: nnz, bldmode
type(psb_desc_type), intent(in) :: desc_a
type(psb_sspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: nnz
integer(psb_ipk_), optional, intent(in) :: dupl, bldmode
!locals
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act
integer(psb_ipk_) :: loc_row,loc_col, nnz_, dectype, bldmode_
integer(psb_ipk_) :: loc_row,loc_col, nnz_, dectype
integer(psb_ipk_) :: dupl_, bldmode_
integer(psb_lpk_) :: m, n, nnzrmt_
integer(psb_ipk_) :: debug_level, debug_unit
character(len=20) :: name
@@ -96,11 +98,6 @@ subroutine psb_sspalloc(a, desc_a, info, nnz, bldmode)
else
nnz_ = max(1,5*loc_row)
endif
if (present(bldmode)) then
bldmode_ = bldmode
else
bldmode_ = psb_matbld_noremote_
end if
if (debug_level >= psb_debug_ext_) &
& write(debug_unit,*) me,' ',trim(name), &
@@ -114,8 +111,17 @@ subroutine psb_sspalloc(a, desc_a, info, nnz, bldmode)
goto 9999
end if
!!$ write(0,*) name,'Setting a%remote_build ',&
!!$ & bldmode_,psb_matbld_noremote_,psb_matbld_remote_
if (present(bldmode)) then
bldmode_ = bldmode
else
bldmode_ = psb_matbld_noremote_
end if
if (present(dupl)) then
dupl_ = dupl
else
dupl_ = psb_dupl_def_
end if
call a%set_dupl(dupl_)
call a%set_remote_build(bldmode_)
if (a%is_remote_build()) then
allocate(a%rmta)
@@ -123,22 +129,6 @@ subroutine psb_sspalloc(a, desc_a, info, nnz, bldmode)
call a%rmta%allocate(m,n,nnzrmt_)
end if
!!$ a%remote_build = bldmode_
!!$ select case(a%remote_build)
!!$ case (psb_matbld_noremote_)
!!$ ! nothing needed
!!$ !write(0,*) name,' matbld_noremote_ nothing needed'
!!$ case (psb_matbld_remote_)
!!$ !write(0,*) name,' matbld_remote_ start '
!!$ allocate(a%rmta)
!!$ nnzrmt_ = max(100,(nnz_/100))
!!$ call a%rmta%allocate(m,n,nnzrmt_)
!!$
!!$ case default
!!$ write(0,*) name,'Invalid value for remote_build '
!!$ a%remote_build = psb_matbld_noremote_
!!$ end select
if (debug_level >= psb_debug_ext_) &
& write(debug_unit,*) me,' ',trim(name),': ', &
& desc_a%get_dectype(),psb_desc_bld_