Change default in CDALL with VL: no global checks.

Split psb_cd_choose_large_state with psb_cd_is_large.
pull/7/head
Salvatore Filippone 7 years ago
parent 22b97ccfc8
commit 9e90a04e31

@ -334,11 +334,23 @@ contains
val = cd_large_threshold
end function psb_cd_get_large_threshold
logical function psb_cd_choose_large_state(ictxt,m)
function psb_cd_is_large_size(m) result(val)
use psb_penv_mod
implicit none
integer(psb_ipk_), intent(in) :: ictxt,m
integer(psb_ipk_), intent(in) :: m
logical :: val
!locals
val = (m > psb_cd_get_large_threshold())
end function psb_cd_is_large_size
function psb_cd_choose_large_state(ictxt,m) result(val)
use psb_penv_mod
implicit none
integer(psb_ipk_), intent(in) :: ictxt
integer(psb_ipk_), intent(in) :: m
logical :: val
!locals
integer(psb_ipk_) :: np,me
@ -348,9 +360,7 @@ contains
! it makes no sense to use them if you don't have at least
! 3 processes, no matter what the size of the process.
!
psb_cd_choose_large_state = &
& (m > psb_cd_get_large_threshold()) .and. &
& (np > 2)
val = psb_cd_is_large_size(m) .and. (np > 2)
end function psb_cd_choose_large_state
subroutine psb_nullify_desc(desc)

@ -82,19 +82,15 @@ subroutine psb_cd_inloc(v, ictxt, desc, info, globalcheck,idx)
iictxt = ictxt
loc_row = size(v)
if (.false.) then
m = loc_row
call psb_sum(ictxt,m)
else
m = maxval(v)
nrt = loc_row
call psb_sum(ictxt,nrt)
call psb_max(ictxt,m)
end if
m = maxval(v)
nrt = loc_row
call psb_sum(ictxt,nrt)
call psb_max(ictxt,m)
if (present(globalcheck)) then
check_ = globalcheck
else
check_ = .true.
check_ = .false.
end if
n = m
@ -138,7 +134,7 @@ subroutine psb_cd_inloc(v, ictxt, desc, info, globalcheck,idx)
if (debug_level >= psb_debug_ext_) &
& write(debug_unit,*) me,' ',trim(name),': doing global checks'
islarge = psb_cd_choose_large_state(ictxt,m)
islarge = psb_cd_is_large_size(m)
allocate(vl(loc_row),ix(loc_row),stat=info)
if (info /= psb_success_) then

Loading…
Cancel
Save