psb_gen_block_map_mod.f90

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

@ -480,7 +480,7 @@ 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)
@ -491,6 +491,11 @@ contains
idxmap%local_cols = nxt + idxmap%local_rows idxmap%local_cols = nxt + idxmap%local_rows
idxmap%loc_to_glob(nxt) = idx(i) idxmap%loc_to_glob(nxt) = idx(i)
end if end if
info = psb_success_
else
info = -5
return
end if
idx(i) = lip + idxmap%local_rows idx(i) = lip + idxmap%local_rows
else else
idx(i) = -1 idx(i) = -1
@ -511,6 +516,7 @@ 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 (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)
@ -521,6 +527,11 @@ contains
idxmap%local_cols = nxt + idxmap%local_rows idxmap%local_cols = nxt + idxmap%local_rows
idxmap%loc_to_glob(nxt) = idx(i) idxmap%loc_to_glob(nxt) = idx(i)
end if end if
info = psb_success_
else
info = -5
return
end if
idx(i) = lip + idxmap%local_rows idx(i) = lip + idxmap%local_rows
else else
idx(i) = -1 idx(i) = -1

Loading…
Cancel
Save