mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-12 08:59:04 +00:00
Deallocate output if needed in indxmap%clone.
This commit is contained in:
@@ -1029,8 +1029,8 @@ contains
|
||||
call psb_erractionsave(err_act)
|
||||
name = 'psb_cdcpy'
|
||||
|
||||
if (desc%is_valid()) then
|
||||
call desc_out%free(info)
|
||||
call desc_out%free(info)
|
||||
if ((info == psb_success_).and.desc%is_valid()) then
|
||||
ictxt = desc%get_context()
|
||||
|
||||
! check on blacs grid
|
||||
@@ -1061,14 +1061,8 @@ contains
|
||||
& call psb_safe_ab_cpy(desc%lprm,desc_out%lprm,info)
|
||||
if (info == psb_success_)&
|
||||
& call psb_safe_ab_cpy(desc%idx_space,desc_out%idx_space,info)
|
||||
!!$ if ((info == psb_success_).and.(allocated(desc%indxmap))) &
|
||||
!!$ & call desc%indxmap%clone(desc_out%indxmap,info)
|
||||
!!$ associate(indxin => desc%indxmap)
|
||||
!!$ if ((info == psb_success_).and.(allocated(desc%indxmap))) &
|
||||
!!$ & call indxin%clone(desc_out%indxmap,info)
|
||||
!!$ end associate
|
||||
if ((info == psb_success_).and.(allocated(desc%indxmap))) &
|
||||
& allocate(desc_out%indxmap,source=desc%indxmap,stat=info)
|
||||
& call desc%indxmap%clone(desc_out%indxmap,info)
|
||||
if (info == psb_success_) &
|
||||
& call desc%v_halo_index%clone(desc_out%v_halo_index,info)
|
||||
if (info == psb_success_) &
|
||||
@@ -1078,9 +1072,6 @@ contains
|
||||
if (info == psb_success_) &
|
||||
& call desc%v_ovr_mst_idx%clone(desc_out%v_ovr_mst_idx,info)
|
||||
|
||||
|
||||
else
|
||||
call desc_out%free(info)
|
||||
end if
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_from_subroutine_
|
||||
|
||||
@@ -2075,12 +2075,16 @@ contains
|
||||
|
||||
info = psb_success_
|
||||
call psb_get_erraction(err_act)
|
||||
if (allocated(outmap)) then
|
||||
write(0,*) 'Error: should not be allocated on input'
|
||||
if (allocated(outmap)) then
|
||||
call outmap%free()
|
||||
deallocate(outmap,stat=info)
|
||||
end if
|
||||
if (info /= 0) then
|
||||
write(0,*) 'Error: could not cleanup output'
|
||||
info = -87
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
|
||||
allocate(psb_gen_block_map :: outmap, stat=info)
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
|
||||
@@ -203,12 +203,17 @@ contains
|
||||
|
||||
info = psb_success_
|
||||
call psb_get_erraction(err_act)
|
||||
if (allocated(outmap)) then
|
||||
write(0,*) 'Error: should not be allocated on input'
|
||||
if (allocated(outmap)) then
|
||||
call outmap%free()
|
||||
deallocate(outmap,stat=info)
|
||||
end if
|
||||
if (info /= 0) then
|
||||
write(0,*) 'Error: could not cleanup output'
|
||||
info = -87
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
|
||||
allocate(psb_glist_map :: outmap, stat=info)
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
|
||||
@@ -1445,11 +1445,16 @@ contains
|
||||
|
||||
info = psb_success_
|
||||
call psb_get_erraction(err_act)
|
||||
if (allocated(outmap)) then
|
||||
write(0,*) 'Error: should not be allocated on input'
|
||||
if (allocated(outmap)) then
|
||||
call outmap%free()
|
||||
deallocate(outmap,stat=info)
|
||||
end if
|
||||
if (info /= 0) then
|
||||
write(0,*) 'Error: could not cleanup output'
|
||||
info = -87
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
|
||||
allocate(psb_hash_map :: outmap, stat=info )
|
||||
if (info /= psb_success_) then
|
||||
|
||||
@@ -1181,8 +1181,12 @@ contains
|
||||
|
||||
info = psb_success_
|
||||
call psb_get_erraction(err_act)
|
||||
if (allocated(outmap)) then
|
||||
write(0,*) 'Error: should not be allocated on input'
|
||||
if (allocated(outmap)) then
|
||||
call outmap%free()
|
||||
deallocate(outmap,stat=info)
|
||||
end if
|
||||
if (info /= 0) then
|
||||
write(0,*) 'Error: could not cleanup output'
|
||||
info = -87
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
@@ -799,8 +799,12 @@ contains
|
||||
|
||||
info = psb_success_
|
||||
call psb_get_erraction(err_act)
|
||||
if (allocated(outmap)) then
|
||||
write(0,*) 'Error: should not be allocated on input'
|
||||
if (allocated(outmap)) then
|
||||
call outmap%free()
|
||||
deallocate(outmap,stat=info)
|
||||
end if
|
||||
if (info /= 0) then
|
||||
write(0,*) 'Error: could not cleanup output'
|
||||
info = -87
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
Reference in New Issue
Block a user