psb_gen_block_map_mod.f90

Handle return from hash_searchinskey.
psblas3-type-indexed
Salvatore Filippone 13 years ago
parent 5c38432165
commit 7e70e3e785

@ -480,16 +480,21 @@ contains
nxt = nv + 1 nxt = nv + 1
ip = idx(i) ip = idx(i)
call psb_hash_searchinskey(ip,lip,nxt,idxmap%hash,info) call psb_hash_searchinskey(ip,lip,nxt,idxmap%hash,info)
if (info >= 0) then
if (lip == nxt) then if (lip == nxt) then
! We have added one item ! We have added one item
call psb_ensure_size(nxt,idxmap%loc_to_glob,info,addsz=500) call psb_ensure_size(nxt,idxmap%loc_to_glob,info,addsz=500)
if (info /= 0) then if (info /= 0) then
info = -4 info = -4
return return
end if
idxmap%local_cols = nxt + idxmap%local_rows
idxmap%loc_to_glob(nxt) = idx(i)
end if end if
idxmap%local_cols = nxt + idxmap%local_rows info = psb_success_
idxmap%loc_to_glob(nxt) = idx(i) else
info = -5
return
end if end if
idx(i) = lip + idxmap%local_rows idx(i) = lip + idxmap%local_rows
else else
@ -511,15 +516,21 @@ contains
ip = idx(i) ip = idx(i)
call psb_hash_searchinskey(ip,lip,nxt,idxmap%hash,info) call psb_hash_searchinskey(ip,lip,nxt,idxmap%hash,info)
if (lip == nxt) then if (info >= 0) then
! We have added one item if (lip == nxt) then
call psb_ensure_size(nxt,idxmap%loc_to_glob,info,addsz=500) ! We have added one item
if (info /= 0) then call psb_ensure_size(nxt,idxmap%loc_to_glob,info,addsz=500)
info = -4 if (info /= 0) then
return info = -4
return
end if
idxmap%local_cols = nxt + idxmap%local_rows
idxmap%loc_to_glob(nxt) = idx(i)
end if end if
idxmap%local_cols = nxt + idxmap%local_rows info = psb_success_
idxmap%loc_to_glob(nxt) = idx(i) else
info = -5
return
end if end if
idx(i) = lip + idxmap%local_rows idx(i) = lip + idxmap%local_rows
else else

Loading…
Cancel
Save