Merge branch 'fix-hash' into development

This commit is contained in:
sfilippone
2025-04-11 14:02:13 +02:00
29 changed files with 2558 additions and 2924 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ module psb_desc_const_mod
integer(psb_ipk_), parameter :: psb_max_hash_bits = 22
integer(psb_ipk_), parameter :: psb_hash_size = 2**psb_hash_bits, psb_hash_mask=psb_hash_size-1
integer(psb_ipk_), parameter :: psb_hpnt_nentries_ = 7
integer(psb_ipk_), parameter :: psb_default_large_threshold=1*1024*1024
integer(psb_ipk_), parameter :: psb_default_hash_threshold=1*1024*1024
!
! Choice of algorithm for sparse matrix A2AV
!
+17 -17
View File
@@ -285,14 +285,14 @@ module psb_desc_mod
module procedure psb_cdfree
end interface psb_free
interface psb_cd_set_large_threshold
module procedure psb_i_cd_set_large_threshold
end interface psb_cd_set_large_threshold
interface psb_cd_set_hash_threshold
module procedure psb_i_cd_set_hash_threshold
end interface psb_cd_set_hash_threshold
#if defined(PSB_IPK4) && defined(PSB_LPK8)
interface psb_cd_set_large_threshold
module procedure psb_l_cd_set_large_threshold
end interface psb_cd_set_large_threshold
interface psb_cd_set_hash_threshold
module procedure psb_l_cd_set_hash_threshold
end interface psb_cd_set_hash_threshold
#endif
interface psb_set_sp_a2av_alg
@@ -309,7 +309,7 @@ module psb_desc_mod
& cd_g2ls2_ins, cd_g2lv1_ins, cd_g2lv2_ins, cd_fnd_owner
integer(psb_lpk_), private, save :: cd_large_threshold = psb_default_large_threshold
integer(psb_lpk_), private, save :: cd_hash_threshold = psb_default_hash_threshold
integer(psb_ipk_), private, save :: sp_a2av_alg = psb_sp_a2av_smpl_triad_
contains
@@ -363,27 +363,27 @@ contains
subroutine psb_i_cd_set_large_threshold(ith)
subroutine psb_i_cd_set_hash_threshold(ith)
implicit none
integer(psb_ipk_), intent(in) :: ith
if (ith > 0) then
cd_large_threshold = ith
cd_hash_threshold = ith
end if
end subroutine psb_i_cd_set_large_threshold
end subroutine psb_i_cd_set_hash_threshold
subroutine psb_l_cd_set_large_threshold(ith)
subroutine psb_l_cd_set_hash_threshold(ith)
implicit none
integer(psb_lpk_), intent(in) :: ith
if (ith > 0) then
cd_large_threshold = ith
cd_hash_threshold = ith
end if
end subroutine psb_l_cd_set_large_threshold
end subroutine psb_l_cd_set_hash_threshold
function psb_cd_get_large_threshold() result(val)
function psb_cd_get_hash_threshold() result(val)
implicit none
integer(psb_lpk_) :: val
val = cd_large_threshold
end function psb_cd_get_large_threshold
val = cd_hash_threshold
end function psb_cd_get_hash_threshold
function psb_cd_is_large_size(m) result(val)
use psb_penv_mod
@@ -392,7 +392,7 @@ contains
integer(psb_lpk_), intent(in) :: m
logical :: val
!locals
val = (m > psb_cd_get_large_threshold())
val = (m > psb_cd_get_hash_threshold())
end function psb_cd_is_large_size
function psb_cd_choose_large_state(ctxt,m) result(val)
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -125,7 +125,7 @@ subroutine psb_cd_inloc(v, ctxt, desc, info, globalcheck,idx,usehash)
if (me == psb_root_) then
exch(1)=m
exch(2)=n
exch(3)=psb_cd_get_large_threshold()
exch(3)=psb_cd_get_hash_threshold()
call psb_bcast(ctxt,exch(1:3),root=psb_root_)
else
call psb_bcast(ctxt,exch(1:3),root=psb_root_)
@@ -140,7 +140,7 @@ subroutine psb_cd_inloc(v, ctxt, desc, info, globalcheck,idx,usehash)
call psb_errpush(err,name,l_err=l_err)
goto 9999
endif
call psb_cd_set_large_threshold(exch(3))
call psb_cd_set_hash_threshold(exch(3))
endif
if (debug_level >= psb_debug_ext_) &
& write(debug_unit,*) me,' ',trim(name),': doing global checks'
+2 -2
View File
@@ -99,7 +99,7 @@ subroutine psb_cdals(m, n, parts, ctxt, desc, info)
& write(debug_unit,*) me,' ',trim(name),': doing global checks'
!global check on m and n parameters
if (me == psb_root_) then
exch(1)=m; exch(2)=n; exch(3)=psb_cd_get_large_threshold()
exch(1)=m; exch(2)=n; exch(3)=psb_cd_get_hash_threshold()
call psb_bcast(ctxt,exch(1:3),root=psb_root_)
else
call psb_bcast(ctxt,exch(1:3),root=psb_root_)
@@ -112,7 +112,7 @@ subroutine psb_cdals(m, n, parts, ctxt, desc, info)
call psb_errpush(err,name,m_err=(/2/))
goto 9999
endif
call psb_cd_set_large_threshold(exch(3))
call psb_cd_set_hash_threshold(exch(3))
endif
call psb_nullify_desc(desc)
+2 -2
View File
@@ -102,7 +102,7 @@ subroutine psb_cdalv(v, ctxt, desc, info, flag)
if (me == psb_root_) then
exch(1)=m
exch(2)=n
exch(3)=psb_cd_get_large_threshold()
exch(3)=psb_cd_get_hash_threshold()
call psb_bcast(ctxt,exch(1:3),root=psb_root_)
else
call psb_bcast(ctxt,exch(1:3),root=psb_root_)
@@ -117,7 +117,7 @@ subroutine psb_cdalv(v, ctxt, desc, info, flag)
call psb_errpush(err,name,l_err=l_err)
goto 9999
endif
call psb_cd_set_large_threshold(exch(3))
call psb_cd_set_hash_threshold(exch(3))
endif
call psb_nullify_desc(desc)