Check and enforce allocation of indxmap%halo_owner

merge-paraggr
Salvatore Filippone 5 years ago
parent c54076ed97
commit d189083816

@ -1328,7 +1328,17 @@ contains
nr = idxmap%local_rows nr = idxmap%local_rows
nc = idxmap%local_cols nc = idxmap%local_cols
xout = -1 xout = -1
if ((nr<xin).and.(xin <= nc)) xout = idxmap%halo_owner(xin-nr) if (.not.allocated(idxmap%halo_owner)) then
!write(0,*) 'Halo_owner not allocated!', nr, nc, xin
return
end if
if ((nr<xin).and.(xin <= nc)) then
if (size(idxmap%halo_owner)<(xin-nr)) then
!write(0,*) 'Halo_owner bad size',xin,nr,xin-nr,size(idxmap%halo_owner)
return
end if
xout = idxmap%halo_owner(xin-nr)
end if
end subroutine base_fnd_halo_owner_s end subroutine base_fnd_halo_owner_s

@ -126,6 +126,8 @@ subroutine psb_cd_renum_block(desc_in, desc_out, info)
if (info == 0) call blck_map%gen_block_map_init(ictxt,n_row,info) if (info == 0) call blck_map%gen_block_map_init(ictxt,n_row,info)
if (info == 0) call blck_map%g2l_ins(gidx,lidx,info,lidx=reflidx) if (info == 0) call blck_map%g2l_ins(gidx,lidx,info,lidx=reflidx)
if (info == 0) call blck_map%asb(info) if (info == 0) call blck_map%asb(info)
if (info == 0) call &
& psb_safe_ab_cpy(desc_in%indxmap%halo_owner,blck_map%halo_owner,info)
if (info /= psb_success_) then if (info /= psb_success_) then
info = psb_err_from_subroutine_ info = psb_err_from_subroutine_

Loading…
Cancel
Save