Fix REINIT use of array constants with implicit loops using IPK/LPK

merge-paraggr
Salvatore Filippone 5 years ago
parent 768344d93f
commit 62c21836f0

@ -2135,9 +2135,11 @@ contains
implicit none
class(psb_gen_block_map), intent(inout) :: idxmap
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act, nr,nc,k, nl, ictxt
integer(psb_ipk_) :: err_act, ictxt
integer(psb_ipk_) :: k, nr, nc
integer(psb_lpk_) :: lk
integer(psb_ipk_), allocatable :: lidx(:)
integer(psb_lpk_), allocatable :: idx(:)
integer(psb_lpk_), allocatable :: gidx(:)
character(len=20) :: name='block_reinit'
logical, parameter :: debug=.false.
@ -2148,8 +2150,8 @@ contains
nc = idxmap%get_lc()
if (nc>nr) then
lidx = (/(k,k=nr+1,nc)/)
idx = (/(k,k=nr+1,nc)/)
call idxmap%l2gip(idx,info)
gidx = (/(lk,lk=nr+1,nc)/)
call idxmap%l2gip(gidx,info)
end if
if (info /= 0) &
& write(0,*) 'From l2gip',info
@ -2160,7 +2162,7 @@ contains
& write(0,*) 'From hash_init',info
call idxmap%set_state(psb_desc_bld_)
if (nc>nr) then
call idxmap%g2lip_ins(idx,info,lidx=lidx)
call idxmap%g2lip_ins(gidx,info,lidx=lidx)
end if

@ -1532,10 +1532,11 @@ contains
class(psb_hash_map), intent(inout) :: idxmap
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act, nr,nc,k, nl
integer(psb_lpk_) :: lk
integer(psb_lpk_) :: ntot
integer(psb_mpk_) :: ictxt, me, np
integer(psb_ipk_), allocatable :: lidx(:)
integer(psb_lpk_), allocatable :: idx(:)
integer(psb_lpk_), allocatable :: gidx(:)
character(len=20) :: name='hash_reinit'
logical, parameter :: debug=.false.
@ -1548,13 +1549,13 @@ contains
lidx = (/(k,k=1,nc)/)
idx = (/(k,k=1,nc)/)
call idxmap%l2gip(idx,info)
gidx = (/(lk,lk=1,nc)/)
call idxmap%l2gip(gidx,info)
call idxmap%free()
call hash_init_vlu(idxmap,ictxt,ntot,nr,idx(1:nr),info)
call hash_init_vlu(idxmap,ictxt,ntot,nr,gidx(1:nr),info)
if (nc>nr) then
call idxmap%g2lip_ins(idx(nr+1:nc),info,lidx=lidx(nr+1:nc))
call idxmap%g2lip_ins(gidx(nr+1:nc),info,lidx=lidx(nr+1:nc))
end if

@ -1234,8 +1234,6 @@ contains
implicit none
class(psb_list_map), intent(inout) :: idxmap
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act, nr,nc,k, nl
integer(psb_ipk_), allocatable :: idx(:),lidx(:)
character(len=20) :: name='list_reinit'
logical, parameter :: debug=.false.

@ -844,8 +844,6 @@ contains
implicit none
class(psb_repl_map), intent(inout) :: idxmap
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act, nr,nc,k, nl
integer(psb_ipk_), allocatable :: idx(:),lidx(:)
character(len=20) :: name='repl_reinit'
logical, parameter :: debug=.false.

Loading…
Cancel
Save